devflow-kit 1.5.0 → 1.6.1
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.
- package/CHANGELOG.md +51 -0
- package/README.md +9 -4
- package/dist/commands/ambient.js +1 -1
- package/dist/commands/init.js +8 -4
- package/dist/commands/uninstall.d.ts +9 -0
- package/dist/commands/uninstall.js +60 -4
- package/dist/plugins.js +23 -23
- package/dist/utils/post-install.js +6 -2
- package/package.json +1 -1
- package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-ambient/.claude-plugin/plugin.json +25 -4
- package/plugins/devflow-ambient/README.md +48 -29
- package/plugins/devflow-ambient/agents/coder.md +135 -0
- package/plugins/devflow-ambient/agents/reviewer.md +165 -0
- package/plugins/devflow-ambient/agents/scrutinizer.md +80 -0
- package/plugins/devflow-ambient/agents/shepherd.md +94 -0
- package/plugins/devflow-ambient/agents/simplifier.md +93 -0
- package/plugins/devflow-ambient/agents/skimmer.md +93 -0
- package/plugins/devflow-ambient/agents/validator.md +86 -0
- package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +76 -29
- package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +40 -35
- package/plugins/devflow-ambient/skills/debug-orchestration/SKILL.md +69 -0
- package/plugins/devflow-ambient/skills/implementation-orchestration/SKILL.md +92 -0
- package/plugins/devflow-ambient/skills/plan-orchestration/SKILL.md +71 -0
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +10 -1
- package/plugins/devflow-audit-claude/commands/audit-claude.md +4 -0
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +2 -1
- package/plugins/devflow-code-review/agents/reviewer.md +10 -9
- package/plugins/devflow-code-review/commands/code-review-teams.md +43 -30
- package/plugins/devflow-code-review/commands/code-review.md +10 -1
- package/plugins/devflow-code-review/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-code-review/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +7 -2
- package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +6 -5
- package/plugins/devflow-debug/.claude-plugin/plugin.json +5 -3
- package/plugins/devflow-debug/agents/synthesizer.md +211 -0
- package/plugins/devflow-debug/commands/debug-teams.md +28 -14
- package/plugins/devflow-debug/commands/debug.md +26 -12
- package/plugins/devflow-debug/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-debug/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-implement/.claude-plugin/plugin.json +2 -1
- package/plugins/devflow-implement/agents/coder.md +6 -1
- package/plugins/devflow-implement/agents/simplifier.md +32 -1
- package/plugins/devflow-implement/agents/skimmer.md +5 -0
- package/plugins/devflow-implement/commands/implement-teams.md +72 -55
- package/plugins/devflow-implement/commands/implement.md +44 -35
- package/plugins/devflow-implement/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-implement/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +4 -3
- package/plugins/devflow-resolve/agents/simplifier.md +32 -1
- package/plugins/devflow-resolve/commands/resolve-teams.md +16 -7
- package/plugins/devflow-resolve/commands/resolve.md +16 -7
- package/plugins/devflow-resolve/skills/knowledge-persistence/SKILL.md +128 -0
- package/plugins/devflow-resolve/skills/knowledge-persistence/references/examples.md +44 -0
- package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +10 -1
- package/plugins/devflow-self-review/agents/simplifier.md +32 -1
- package/plugins/devflow-self-review/commands/self-review.md +10 -4
- package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-specify/agents/skimmer.md +5 -0
- package/plugins/devflow-specify/commands/specify-teams.md +27 -20
- package/plugins/devflow-specify/commands/specify.md +26 -19
- package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
- package/scripts/hooks/ambient-prompt +10 -8
- package/scripts/hooks/background-memory-update +114 -85
- package/scripts/hooks/session-start-memory +34 -20
- package/shared/agents/coder.md +6 -1
- package/shared/agents/reviewer.md +10 -9
- package/shared/agents/simplifier.md +32 -1
- package/shared/agents/skimmer.md +5 -0
- package/shared/skills/ambient-router/SKILL.md +76 -29
- package/shared/skills/ambient-router/references/skill-catalog.md +40 -35
- package/shared/skills/debug-orchestration/SKILL.md +69 -0
- package/shared/skills/docs-framework/SKILL.md +7 -2
- package/shared/skills/implementation-orchestration/SKILL.md +92 -0
- package/shared/skills/knowledge-persistence/SKILL.md +128 -0
- package/shared/skills/knowledge-persistence/references/examples.md +44 -0
- package/shared/skills/plan-orchestration/SKILL.md +71 -0
- package/shared/skills/test-driven-development/SKILL.md +6 -5
- package/plugins/devflow-ambient/commands/ambient.md +0 -110
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# SessionStart Hook
|
|
4
4
|
# Injects working memory AND ambient skill content as additionalContext.
|
|
5
|
-
# Memory: restores .memory/WORKING-MEMORY.md +
|
|
5
|
+
# Memory: restores .memory/WORKING-MEMORY.md + git state + compact recovery.
|
|
6
6
|
# Ambient: injects ambient-router SKILL.md so Claude has it in context (no Read call needed).
|
|
7
7
|
# Either section can fire independently — ambient works even without memory files.
|
|
8
8
|
|
|
@@ -27,13 +27,6 @@ MEMORY_FILE="$CWD/.memory/WORKING-MEMORY.md"
|
|
|
27
27
|
if [ -f "$MEMORY_FILE" ]; then
|
|
28
28
|
MEMORY_CONTENT=$(cat "$MEMORY_FILE")
|
|
29
29
|
|
|
30
|
-
# Read accumulated patterns if they exist
|
|
31
|
-
PATTERNS_FILE="$CWD/.memory/PROJECT-PATTERNS.md"
|
|
32
|
-
PATTERNS_CONTENT=""
|
|
33
|
-
if [ -f "$PATTERNS_FILE" ]; then
|
|
34
|
-
PATTERNS_CONTENT=$(cat "$PATTERNS_FILE")
|
|
35
|
-
fi
|
|
36
|
-
|
|
37
30
|
# Compute staleness warning
|
|
38
31
|
if stat --version &>/dev/null 2>&1; then
|
|
39
32
|
FILE_MTIME=$(stat -c %Y "$MEMORY_FILE")
|
|
@@ -91,15 +84,6 @@ $BACKUP_MEMORY
|
|
|
91
84
|
|
|
92
85
|
${MEMORY_CONTENT}"
|
|
93
86
|
|
|
94
|
-
# Insert accumulated patterns between working memory and git state
|
|
95
|
-
if [ -n "$PATTERNS_CONTENT" ]; then
|
|
96
|
-
CONTEXT="${CONTEXT}
|
|
97
|
-
|
|
98
|
-
--- PROJECT PATTERNS (accumulated) ---
|
|
99
|
-
|
|
100
|
-
${PATTERNS_CONTENT}"
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
87
|
CONTEXT="${CONTEXT}
|
|
104
88
|
|
|
105
89
|
--- CURRENT GIT STATE ---
|
|
@@ -119,6 +103,31 @@ ${COMPACT_NOTE}"
|
|
|
119
103
|
fi
|
|
120
104
|
fi
|
|
121
105
|
|
|
106
|
+
# --- Section 1.5: Project Knowledge TL;DR ---
|
|
107
|
+
KNOWLEDGE_DIR="$CWD/.memory/knowledge"
|
|
108
|
+
if [ -d "$KNOWLEDGE_DIR" ]; then
|
|
109
|
+
KNOWLEDGE_TLDR=""
|
|
110
|
+
for kf in "$KNOWLEDGE_DIR"/decisions.md "$KNOWLEDGE_DIR"/pitfalls.md; do
|
|
111
|
+
if [ -f "$kf" ]; then
|
|
112
|
+
TLDR_LINE=$(sed -n '1s/<!-- TL;DR: \(.*\) -->/\1/p' "$kf")
|
|
113
|
+
if [ -n "$TLDR_LINE" ]; then
|
|
114
|
+
KNOWLEDGE_TLDR="${KNOWLEDGE_TLDR}${TLDR_LINE}\n"
|
|
115
|
+
fi
|
|
116
|
+
fi
|
|
117
|
+
done
|
|
118
|
+
if [ -n "$KNOWLEDGE_TLDR" ]; then
|
|
119
|
+
KNOWLEDGE_SECTION="--- PROJECT KNOWLEDGE (TL;DR) ---
|
|
120
|
+
$(printf '%b' "$KNOWLEDGE_TLDR")"
|
|
121
|
+
if [ -n "$CONTEXT" ]; then
|
|
122
|
+
CONTEXT="${CONTEXT}
|
|
123
|
+
|
|
124
|
+
${KNOWLEDGE_SECTION}"
|
|
125
|
+
else
|
|
126
|
+
CONTEXT="$KNOWLEDGE_SECTION"
|
|
127
|
+
fi
|
|
128
|
+
fi
|
|
129
|
+
fi
|
|
130
|
+
|
|
122
131
|
# --- Section 2: Ambient Skill Injection ---
|
|
123
132
|
|
|
124
133
|
# Inject ambient-router SKILL.md directly into context so Claude doesn't need a Read call.
|
|
@@ -129,10 +138,15 @@ AMBIENT_SKILL_PATH="$HOME/.claude/skills/ambient-router/SKILL.md"
|
|
|
129
138
|
SETTINGS_FILE="$HOME/.claude/settings.json"
|
|
130
139
|
if [ -f "$AMBIENT_SKILL_PATH" ] && [ -f "$SETTINGS_FILE" ] && grep -q "ambient-prompt" "$SETTINGS_FILE" 2>/dev/null; then
|
|
131
140
|
AMBIENT_SKILL_CONTENT=$(cat "$AMBIENT_SKILL_PATH")
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
--- AMBIENT ROUTER (auto-loaded) ---
|
|
141
|
+
AMBIENT_SECTION="--- AMBIENT ROUTER (auto-loaded) ---
|
|
135
142
|
${AMBIENT_SKILL_CONTENT}"
|
|
143
|
+
if [ -n "$CONTEXT" ]; then
|
|
144
|
+
CONTEXT="${CONTEXT}
|
|
145
|
+
|
|
146
|
+
${AMBIENT_SECTION}"
|
|
147
|
+
else
|
|
148
|
+
CONTEXT="$AMBIENT_SECTION"
|
|
149
|
+
fi
|
|
136
150
|
fi
|
|
137
151
|
|
|
138
152
|
# --- Output ---
|
package/shared/agents/coder.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: Coder
|
|
3
3
|
description: Autonomous task implementation on feature branch. Implements, tests, and commits.
|
|
4
4
|
model: inherit
|
|
5
|
-
skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, input-validation
|
|
5
|
+
skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, test-driven-development, search-first, input-validation
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Coder Agent
|
|
@@ -35,6 +35,8 @@ You receive from orchestrator:
|
|
|
35
35
|
- Cross-reference changed files against EXECUTION_PLAN to identify what's relevant to your task
|
|
36
36
|
- Read those relevant files to understand interfaces, types, naming conventions, error handling, and testing patterns established by prior work
|
|
37
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.
|
|
38
40
|
|
|
39
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:
|
|
40
42
|
- `backend` (TypeScript): Read `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/input-validation/SKILL.md`
|
|
@@ -89,6 +91,9 @@ Return structured completion status:
|
|
|
89
91
|
### PR (if created)
|
|
90
92
|
- URL: {pr_url}
|
|
91
93
|
|
|
94
|
+
### Key Decisions (if any)
|
|
95
|
+
- {Decision}: {rationale}
|
|
96
|
+
|
|
92
97
|
### Blockers (if any)
|
|
93
98
|
{Description of blocker or failure with recommendation}
|
|
94
99
|
```
|
|
@@ -42,15 +42,16 @@ The orchestrator provides:
|
|
|
42
42
|
## Responsibilities
|
|
43
43
|
|
|
44
44
|
1. **Load focus skill** - Read the pattern skill file for your focus area from the table above. This gives you detection rules and patterns specific to your review type.
|
|
45
|
-
2. **
|
|
46
|
-
3. **
|
|
47
|
-
4. **Apply
|
|
48
|
-
5. **
|
|
49
|
-
6. **
|
|
50
|
-
7. **
|
|
51
|
-
8. **
|
|
52
|
-
9. **
|
|
53
|
-
10. **
|
|
45
|
+
2. **Check known pitfalls** - If `.memory/knowledge/pitfalls.md` exists, read it. Check if any pitfall Areas overlap with files in the current diff. Verify the Resolution was applied. Flag if a known pitfall pattern is being reintroduced.
|
|
46
|
+
3. **Identify changed lines** - Get diff against base branch (main/master/develop)
|
|
47
|
+
4. **Apply 3-category classification** - Sort issues by where they occur
|
|
48
|
+
5. **Apply focus-specific analysis** - Use pattern skill detection rules from the loaded skill file
|
|
49
|
+
6. **Assign severity** - CRITICAL, HIGH, MEDIUM, LOW based on impact
|
|
50
|
+
7. **Assess confidence** - Assign 0-100% confidence to each finding (see Confidence Scale below)
|
|
51
|
+
8. **Filter by confidence** - Only report findings ≥80% in main sections; lower-confidence items go to Suggestions
|
|
52
|
+
9. **Consolidate similar issues** - Group related findings to reduce noise (see Consolidation Rules)
|
|
53
|
+
10. **Generate report** - File:line references with suggested fixes
|
|
54
|
+
11. **Determine merge recommendation** - Based on blocking issues
|
|
54
55
|
|
|
55
56
|
## Confidence Scale
|
|
56
57
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Simplifier
|
|
3
3
|
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
|
|
4
|
+
skills: core-patterns
|
|
4
5
|
model: inherit
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -59,4 +60,34 @@ Your refinement process:
|
|
|
59
60
|
5. Verify the refined code is simpler and more maintainable
|
|
60
61
|
6. Document only significant changes that affect understanding
|
|
61
62
|
|
|
62
|
-
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.
|
|
63
|
+
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.
|
|
64
|
+
|
|
65
|
+
## Output
|
|
66
|
+
|
|
67
|
+
Return structured completion status:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## Simplification Report
|
|
71
|
+
|
|
72
|
+
### Changes Applied
|
|
73
|
+
- {file}: {description of simplification}
|
|
74
|
+
|
|
75
|
+
### Changes Skipped
|
|
76
|
+
- {reason not simplified — would change behavior / already clean}
|
|
77
|
+
|
|
78
|
+
### Files Modified
|
|
79
|
+
- {file} ({change description})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Boundaries
|
|
83
|
+
|
|
84
|
+
**Escalate to orchestrator:**
|
|
85
|
+
- Changes that would alter observable behavior or break tests
|
|
86
|
+
- Simplifications requiring new dependencies or architectural changes
|
|
87
|
+
- Files outside the recently modified scope (unless instructed)
|
|
88
|
+
|
|
89
|
+
**Handle autonomously:**
|
|
90
|
+
- Naming improvements, dead code removal, nesting reduction
|
|
91
|
+
- Import sorting and organization
|
|
92
|
+
- Redundant abstraction elimination
|
|
93
|
+
- Comment cleanup (remove obvious, keep non-obvious)
|
package/shared/agents/skimmer.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Skimmer
|
|
3
3
|
description: Codebase orientation using skim to identify relevant files, functions, and patterns for a feature or task
|
|
4
|
+
skills: knowledge-persistence
|
|
4
5
|
model: inherit
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -20,6 +21,7 @@ You receive from orchestrator:
|
|
|
20
21
|
3. **Search for task-relevant code** - Find files matching task keywords
|
|
21
22
|
4. **Identify integration points** - Exports, entry points, import patterns
|
|
22
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.
|
|
23
25
|
|
|
24
26
|
## Tool Invocation
|
|
25
27
|
|
|
@@ -64,6 +66,9 @@ Always invoke skim via `npx rskim`. This works whether or not skim is globally i
|
|
|
64
66
|
### Patterns Observed
|
|
65
67
|
{Existing patterns to follow}
|
|
66
68
|
|
|
69
|
+
### Active Decisions
|
|
70
|
+
{Count and key decisions from `.memory/knowledge/decisions.md` TL;DR, or "None found" if file missing}
|
|
71
|
+
|
|
67
72
|
### Suggested Approach
|
|
68
73
|
{Brief recommendation based on codebase structure}
|
|
69
74
|
```
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ambient-router
|
|
3
|
-
description:
|
|
4
|
-
Classify user intent and response depth for ambient mode. Auto-loads relevant
|
|
5
|
-
skills without explicit command invocation. Used by /ambient command and
|
|
6
|
-
always-on UserPromptSubmit hook.
|
|
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.
|
|
7
4
|
user-invocable: false
|
|
8
|
-
allowed-tools:
|
|
5
|
+
# No allowed-tools: orchestrator requires unrestricted access (Skill, Agent, Edit, Write, Bash)
|
|
9
6
|
---
|
|
10
7
|
|
|
11
8
|
# Ambient Router
|
|
12
9
|
|
|
13
|
-
Classify user intent and auto-load relevant skills. Zero overhead for simple requests, skill
|
|
10
|
+
Classify user intent and auto-load relevant skills. Zero overhead for simple requests, skill loading + optional agent orchestration for substantive work.
|
|
14
11
|
|
|
15
12
|
## Iron Law
|
|
16
13
|
|
|
17
|
-
> **PROPORTIONAL RESPONSE**
|
|
14
|
+
> **PROPORTIONAL RESPONSE MATCHED TO SCOPE**
|
|
18
15
|
>
|
|
19
|
-
>
|
|
20
|
-
>
|
|
21
|
-
>
|
|
22
|
-
> is
|
|
16
|
+
> QUICK gets zero overhead. GUIDED gets skill loading + main session implementation
|
|
17
|
+
> with Simplifier cleanup. ORCHESTRATED gets full skill loading via the Skill tool plus
|
|
18
|
+
> agent pipeline execution. Misclassification in either direction is a failure —
|
|
19
|
+
> false-positive ORCHESTRATED is expensive (5-6 agent spawns), false-negative
|
|
20
|
+
> GUIDED leaves quality on the table.
|
|
23
21
|
|
|
24
22
|
---
|
|
25
23
|
|
|
@@ -29,14 +27,14 @@ Determine what the user is trying to do from their prompt.
|
|
|
29
27
|
|
|
30
28
|
| Intent | Signal Words / Patterns | Examples |
|
|
31
29
|
|--------|------------------------|---------|
|
|
32
|
-
| **
|
|
30
|
+
| **IMPLEMENT** | "add", "create", "implement", "build", "write", "make" | "add a login form", "create an API endpoint" |
|
|
33
31
|
| **DEBUG** | "fix", "bug", "broken", "failing", "error", "why does" | "fix the auth error", "why is this test failing" |
|
|
34
32
|
| **REVIEW** | "check", "look at", "review", "is this ok", "any issues" | "check this function", "any issues with this?" |
|
|
35
33
|
| **PLAN** | "how should", "design", "architecture", "approach", "strategy" | "how should I structure auth?", "what's the approach for caching?" |
|
|
36
34
|
| **EXPLORE** | "what is", "where is", "find", "show me", "explain", "how does" | "where is the config?", "explain this function" |
|
|
37
35
|
| **CHAT** | greetings, meta-questions, confirmations, short responses | "thanks", "yes", "what can you do?" |
|
|
38
36
|
|
|
39
|
-
**Ambiguous prompts:** Default to the lowest-overhead classification. "Update the README" →
|
|
37
|
+
**Ambiguous prompts:** Default to the lowest-overhead classification. "Update the README" → QUICK. Git operations like "commit this" → QUICK.
|
|
40
38
|
|
|
41
39
|
## Step 2: Classify Depth
|
|
42
40
|
|
|
@@ -44,44 +42,90 @@ Determine how much enforcement the prompt warrants.
|
|
|
44
42
|
|
|
45
43
|
| Depth | Criteria | Action |
|
|
46
44
|
|-------|----------|--------|
|
|
47
|
-
| **QUICK** | CHAT intent. EXPLORE
|
|
48
|
-
| **GUIDED** |
|
|
49
|
-
| **
|
|
45
|
+
| **QUICK** | CHAT intent. EXPLORE intent. Git/devops operations (commit, push, merge, branch, pr, deploy, reinstall). Single-word continuations. Small edits, config changes, trivial single-file tweaks. | Respond normally. Zero overhead. Do not state classification. |
|
|
46
|
+
| **GUIDED** | IMPLEMENT with small scope (≤2 files, single module). DEBUG with clear error location (stack trace, specific file, known function). PLAN for focused design questions (specific area/pattern). REVIEW (always GUIDED). | Load skills via Skill tool. Main session implements directly. Spawn Simplifier after code changes. State classification. |
|
|
47
|
+
| **ORCHESTRATED** | IMPLEMENT with larger scope (>2 files, multi-module, complex). DEBUG with vague/cross-cutting bug (no clear location, multiple possible causes). PLAN for system-level architecture (caching layer, auth system, multi-module design). | Load skills via Skill tool, then orchestrate agents per Step 5. State classification. |
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
**Scope-based decision criteria:**
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
| Intent | GUIDED (small scope) | ORCHESTRATED (large scope) |
|
|
52
|
+
|--------|---------------------|---------------------------|
|
|
53
|
+
| **IMPLEMENT** | ≤2 files, single module, clear task | >2 files, multi-module, complex |
|
|
54
|
+
| **DEBUG** | Clear error with known location (stack trace, specific file) | Vague/cross-cutting bug, multiple possible causes |
|
|
55
|
+
| **PLAN** | Focused question about specific area/pattern | System-level architecture, multi-module design |
|
|
56
|
+
| **REVIEW** | Always GUIDED | — |
|
|
57
|
+
|
|
58
|
+
**Classification conservatism:** Default to QUICK. Only classify GUIDED/ORCHESTRATED when the prompt has clear task scope. When choosing between GUIDED and ORCHESTRATED, prefer GUIDED — escalate only when scope clearly exceeds main-session capacity.
|
|
59
|
+
|
|
60
|
+
## Step 3: Select Skills
|
|
61
|
+
|
|
62
|
+
Based on classified intent and depth, invoke each selected skill using the Skill tool.
|
|
63
|
+
|
|
64
|
+
### GUIDED-depth skills
|
|
54
65
|
|
|
55
66
|
| Intent | Primary Skills | Secondary (if file type matches) |
|
|
56
67
|
|--------|---------------|----------------------------------|
|
|
57
|
-
| **
|
|
58
|
-
| **DEBUG** |
|
|
68
|
+
| **IMPLEMENT** | test-driven-development, implementation-patterns, search-first | typescript (.ts), react (.tsx/.jsx), go (.go), java (.java), python (.py), rust (.rs), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
|
|
69
|
+
| **DEBUG** | core-patterns, test-patterns | git-safety (if git operations involved) |
|
|
70
|
+
| **PLAN** | implementation-patterns, core-patterns | — |
|
|
59
71
|
| **REVIEW** | self-review, core-patterns | test-patterns |
|
|
60
|
-
| **PLAN** | implementation-patterns | core-patterns |
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
### ORCHESTRATED-depth skills
|
|
74
|
+
|
|
75
|
+
| Intent | Primary Skills | Secondary (if file type matches) |
|
|
76
|
+
|--------|---------------|----------------------------------|
|
|
77
|
+
| **IMPLEMENT** | implementation-orchestration, implementation-patterns | typescript (.ts), react (.tsx/.jsx), go (.go), java (.java), python (.py), rust (.rs), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
|
|
78
|
+
| **DEBUG** | debug-orchestration, core-patterns | git-safety (if git operations involved) |
|
|
79
|
+
| **PLAN** | plan-orchestration, implementation-patterns, core-patterns | — |
|
|
80
|
+
|
|
81
|
+
**Excluded from ambient** (review-command-only): review-methodology, complexity-patterns, consistency-patterns, database-patterns, dependencies-patterns, documentation-patterns, regression-patterns, architecture-patterns, accessibility, performance-patterns.
|
|
63
82
|
|
|
64
83
|
See `references/skill-catalog.md` for the full skill-to-intent mapping with file pattern triggers.
|
|
65
84
|
|
|
66
85
|
## Step 4: Apply
|
|
67
86
|
|
|
68
87
|
<IMPORTANT>
|
|
69
|
-
When classification is GUIDED or
|
|
88
|
+
When classification is GUIDED or ORCHESTRATED, skill loading is NON-NEGOTIABLE.
|
|
70
89
|
Do not rationalize skipping skills. Do not respond without loading them first.
|
|
71
|
-
|
|
90
|
+
BLOCKING REQUIREMENT: Invoke each selected skill using the Skill tool before proceeding.
|
|
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.
|
|
72
95
|
</IMPORTANT>
|
|
73
96
|
|
|
74
97
|
- **QUICK:** Respond directly. No preamble, no classification statement.
|
|
75
|
-
- **GUIDED:** State classification briefly: `Ambient:
|
|
76
|
-
- **
|
|
98
|
+
- **GUIDED:** State classification briefly: `Ambient: IMPLEMENT/GUIDED. Loading: implementation-patterns, search-first.` Then invoke each skill using the Skill tool and work directly in main session. After code changes, spawn Simplifier on changed files.
|
|
99
|
+
- **ORCHESTRATED:** State classification briefly: `Ambient: IMPLEMENT/ORCHESTRATED. Loading: implementation-orchestration, implementation-patterns.` Then invoke each skill using the Skill tool and follow Step 5 for agent orchestration.
|
|
100
|
+
|
|
101
|
+
### GUIDED Behavior by Intent
|
|
102
|
+
|
|
103
|
+
| Intent | Main Session Work | Post-Work |
|
|
104
|
+
|--------|------------------|-----------|
|
|
105
|
+
| **IMPLEMENT** | Implement directly with loaded skills. Follow TDD cycle. | Spawn Simplifier on changed files. |
|
|
106
|
+
| **DEBUG** | Investigate directly — reproduce bug, diagnose from stack trace/error, fix. | Spawn Simplifier on changed files. |
|
|
107
|
+
| **PLAN** | Explore relevant code and design directly. The area is focused enough for main session. | No Simplifier (no code changes). |
|
|
108
|
+
| **REVIEW** | Review directly with loaded skills. | No Simplifier. |
|
|
109
|
+
|
|
110
|
+
## Step 5: Orchestrate Agents (ORCHESTRATED depth only)
|
|
111
|
+
|
|
112
|
+
After loading skills via Step 3-4, execute the agent pipeline for the classified intent:
|
|
113
|
+
|
|
114
|
+
| Intent | Pipeline |
|
|
115
|
+
|--------|----------|
|
|
116
|
+
| **IMPLEMENT** | Follow implementation-orchestration skill pipeline: pre-flight → plan synthesis → Coder → quality gates |
|
|
117
|
+
| **DEBUG** | Follow debug-orchestration skill pipeline: hypotheses → parallel Explores → convergence → report → offer fix |
|
|
118
|
+
| **PLAN** | Follow plan-orchestration skill pipeline: Skimmer → Explores → Plan agent → gap validation |
|
|
119
|
+
| **EXPLORE** | No agents — respond in main session |
|
|
120
|
+
| **CHAT** | No agents — respond in main session |
|
|
77
121
|
|
|
78
122
|
---
|
|
79
123
|
|
|
80
124
|
## Transparency Rules
|
|
81
125
|
|
|
82
126
|
1. **QUICK → silent.** No classification output.
|
|
83
|
-
2. **GUIDED → brief statement + full skill enforcement.** One line: intent, depth, skills loaded. Then
|
|
84
|
-
3. **
|
|
127
|
+
2. **GUIDED → brief statement + full skill enforcement.** One line: intent, depth, skills loaded. Then implement in main session with skill patterns applied.
|
|
128
|
+
3. **ORCHESTRATED → brief statement + full skill enforcement + agent orchestration.** One line: intent, depth, skills loaded. Then follow every skill requirement and orchestrate agents per Step 5.
|
|
85
129
|
4. **Never lie about classification.** If uncertain, say so.
|
|
86
130
|
5. **Never over-classify.** When in doubt, go one tier lower.
|
|
87
131
|
6. **Never under-apply.** Rationalization is the enemy of quality. If a skill requires a step, do the step.
|
|
@@ -90,7 +134,10 @@ If test-driven-development is selected, you MUST write the failing test before A
|
|
|
90
134
|
|
|
91
135
|
| Case | Handling |
|
|
92
136
|
|------|----------|
|
|
93
|
-
| Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (
|
|
137
|
+
| Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (IMPLEMENT > DEBUG) |
|
|
94
138
|
| Continuation of previous conversation | Inherit previous classification unless prompt clearly shifts |
|
|
95
139
|
| User explicitly requests no enforcement | Respect immediately — classify as QUICK |
|
|
96
140
|
| Prompt references specific DevFlow command | Skip ambient — the command has its own orchestration |
|
|
141
|
+
| Scope ambiguous between GUIDED and ORCHESTRATED | Default to GUIDED; escalate if complexity emerges during work |
|
|
142
|
+
| REVIEW intent | Always GUIDED — single Reviewer focus, no orchestration pipeline |
|
|
143
|
+
| Multiple triggers per session | Each runs independently; context compaction handles accumulation |
|
|
@@ -4,47 +4,50 @@ Full mapping of DevFlow skills to ambient intents and file-type triggers. The am
|
|
|
4
4
|
|
|
5
5
|
## Skills Available for Ambient Loading
|
|
6
6
|
|
|
7
|
-
These skills may be loaded during GUIDED-depth ambient routing.
|
|
8
|
-
|
|
9
|
-
###
|
|
10
|
-
|
|
11
|
-
| Skill | When to Load | File Patterns |
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
7
|
+
These skills may be loaded during GUIDED and ORCHESTRATED-depth ambient routing.
|
|
8
|
+
|
|
9
|
+
### IMPLEMENT Intent
|
|
10
|
+
|
|
11
|
+
| Skill | When to Load | Depth | File Patterns |
|
|
12
|
+
|-------|-------------|-------|---------------|
|
|
13
|
+
| implementation-orchestration | ORCHESTRATED only | ORCHESTRATED | Any — orchestrates agent pipeline |
|
|
14
|
+
| test-driven-development | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any code file — enforces RED-GREEN-REFACTOR |
|
|
15
|
+
| implementation-patterns | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any code file |
|
|
16
|
+
| search-first | Always for IMPLEMENT | GUIDED + ORCHESTRATED | Any — enforces research before building |
|
|
17
|
+
| typescript | TypeScript files in scope | GUIDED + ORCHESTRATED | `*.ts`, `*.tsx` |
|
|
18
|
+
| react | React components in scope | GUIDED + ORCHESTRATED | `*.tsx`, `*.jsx` |
|
|
19
|
+
| frontend-design | UI/styling work | GUIDED + ORCHESTRATED | `*.css`, `*.scss`, `*.tsx` with styling keywords |
|
|
20
|
+
| input-validation | Forms, APIs, user input | GUIDED + ORCHESTRATED | Files with form/input/validation keywords |
|
|
21
|
+
| go | Go files in scope | GUIDED + ORCHESTRATED | `*.go` |
|
|
22
|
+
| java | Java files in scope | GUIDED + ORCHESTRATED | `*.java` |
|
|
23
|
+
| python | Python files in scope | GUIDED + ORCHESTRATED | `*.py` |
|
|
24
|
+
| rust | Rust files in scope | GUIDED + ORCHESTRATED | `*.rs` |
|
|
25
|
+
| security-patterns | Auth, crypto, secrets | GUIDED + ORCHESTRATED | Files with auth/token/crypto/password keywords |
|
|
25
26
|
|
|
26
27
|
### DEBUG Intent
|
|
27
28
|
|
|
28
|
-
| Skill | When to Load | File Patterns |
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
| core-patterns | Always for DEBUG | Any code file |
|
|
32
|
-
|
|
|
29
|
+
| Skill | When to Load | Depth | File Patterns |
|
|
30
|
+
|-------|-------------|-------|---------------|
|
|
31
|
+
| debug-orchestration | ORCHESTRATED only | ORCHESTRATED | Any — orchestrates investigation pipeline |
|
|
32
|
+
| core-patterns | Always for DEBUG | GUIDED + ORCHESTRATED | Any code file |
|
|
33
|
+
| test-patterns | Always for DEBUG (GUIDED) | GUIDED | Any code file |
|
|
34
|
+
| git-safety | Git operations involved | GUIDED + ORCHESTRATED | User mentions git, rebase, merge, etc. |
|
|
33
35
|
|
|
34
36
|
### REVIEW Intent
|
|
35
37
|
|
|
36
|
-
| Skill | When to Load | File Patterns |
|
|
37
|
-
|
|
38
|
-
| self-review | Always for REVIEW | Any code file |
|
|
39
|
-
| core-patterns | Always for REVIEW | Any code file |
|
|
40
|
-
| test-patterns | Test files in scope | `*.test.*`, `*.spec.*` |
|
|
38
|
+
| Skill | When to Load | Depth | File Patterns |
|
|
39
|
+
|-------|-------------|-------|---------------|
|
|
40
|
+
| self-review | Always for REVIEW | GUIDED | Any code file |
|
|
41
|
+
| core-patterns | Always for REVIEW | GUIDED | Any code file |
|
|
42
|
+
| test-patterns | Test files in scope | GUIDED | `*.test.*`, `*.spec.*` |
|
|
41
43
|
|
|
42
44
|
### PLAN Intent
|
|
43
45
|
|
|
44
|
-
| Skill | When to Load | File Patterns |
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
46
|
+
| Skill | When to Load | Depth | File Patterns |
|
|
47
|
+
|-------|-------------|-------|---------------|
|
|
48
|
+
| plan-orchestration | ORCHESTRATED only | ORCHESTRATED | Any — orchestrates design pipeline |
|
|
49
|
+
| implementation-patterns | Always for PLAN | GUIDED + ORCHESTRATED | Any planning context |
|
|
50
|
+
| core-patterns | Always for PLAN | GUIDED + ORCHESTRATED | System design discussions |
|
|
48
51
|
|
|
49
52
|
## Skills Excluded from Ambient
|
|
50
53
|
|
|
@@ -63,7 +66,9 @@ These skills are loaded only by explicit DevFlow commands (primarily `/code-revi
|
|
|
63
66
|
|
|
64
67
|
## Selection Limits
|
|
65
68
|
|
|
66
|
-
- **Maximum 3 skills** per ambient response (primary + up to 2 secondary)
|
|
67
|
-
- **
|
|
69
|
+
- **Maximum 3 knowledge skills** per ambient response (primary + up to 2 secondary)
|
|
70
|
+
- **Orchestration skills** (implementation-orchestration, debug-orchestration, plan-orchestration) are loaded only at ORCHESTRATED depth — they don't count toward the knowledge skill limit
|
|
71
|
+
- **Primary skills** are always loaded for the classified intent at both GUIDED and ORCHESTRATED depth
|
|
68
72
|
- **Secondary skills** are loaded only when file patterns match conversation context
|
|
69
|
-
-
|
|
73
|
+
- **GUIDED depth** loads knowledge skills only (no orchestration skills) — main session works directly
|
|
74
|
+
- **ORCHESTRATED depth** loads orchestration skill + knowledge skills — agents execute the pipeline
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-orchestration
|
|
3
|
+
description: Agent orchestration for DEBUG intent — hypothesis investigation, root cause analysis, optional fix
|
|
4
|
+
user-invocable: false
|
|
5
|
+
allowed-tools: Read, Grep, Glob, Bash, Task, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Debug Orchestration
|
|
9
|
+
|
|
10
|
+
Agent pipeline for DEBUG intent in ambient ORCHESTRATED mode. Competing hypothesis investigation, parallel evidence gathering, convergence validation, and optional fix.
|
|
11
|
+
|
|
12
|
+
This is a lightweight variant of `/debug` for ambient ORCHESTRATED mode. Excluded: knowledge persistence loading, GitHub issue fetching, pitfall recording.
|
|
13
|
+
|
|
14
|
+
## Iron Law
|
|
15
|
+
|
|
16
|
+
> **COMPETING HYPOTHESES BEFORE CONCLUSIONS**
|
|
17
|
+
>
|
|
18
|
+
> Never investigate a single theory. Generate 3-5 distinct hypotheses, investigate them
|
|
19
|
+
> in parallel, and let evidence determine the root cause. Confirmation bias is the enemy
|
|
20
|
+
> of debugging — multiple hypotheses are the antidote.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Phase 1: Hypothesize
|
|
25
|
+
|
|
26
|
+
Analyze the bug description, error messages, and conversation context. Generate 3-5 hypotheses that are:
|
|
27
|
+
|
|
28
|
+
- **Specific**: Points to a concrete mechanism (not "something is wrong with auth")
|
|
29
|
+
- **Testable**: Can be confirmed or disproved by examining specific files/logs
|
|
30
|
+
- **Distinct**: Each hypothesis proposes a different root cause
|
|
31
|
+
|
|
32
|
+
If fewer than 3 hypotheses are possible, proceed with 2.
|
|
33
|
+
|
|
34
|
+
## Phase 2: Investigate (Parallel)
|
|
35
|
+
|
|
36
|
+
Spawn one `Task(subagent_type="Explore")` per hypothesis **in a single message** (parallel execution):
|
|
37
|
+
|
|
38
|
+
- Each investigator searches for evidence FOR and AGAINST its hypothesis
|
|
39
|
+
- Must provide file:line references for all evidence
|
|
40
|
+
- Returns verdict: **CONFIRMED** | **DISPROVED** | **PARTIAL** (some evidence supports, some contradicts)
|
|
41
|
+
|
|
42
|
+
## Phase 3: Converge
|
|
43
|
+
|
|
44
|
+
Evaluate investigation results:
|
|
45
|
+
|
|
46
|
+
- **One CONFIRMED**: Spawn 1-2 additional `Task(subagent_type="Explore")` agents to validate from different angles (prevent confirmation bias)
|
|
47
|
+
- **Multiple PARTIAL**: Look for a unifying root cause that explains all partial evidence
|
|
48
|
+
- **All DISPROVED**: Report honestly — "No root cause identified from initial hypotheses." Generate 2-3 second-round hypotheses if conversation context suggests avenues not yet explored.
|
|
49
|
+
|
|
50
|
+
## Phase 4: Report
|
|
51
|
+
|
|
52
|
+
Present root cause analysis:
|
|
53
|
+
|
|
54
|
+
- **Confidence level**: HIGH (confirmed + validated) | MEDIUM (partial convergence) | LOW (best guess from incomplete evidence)
|
|
55
|
+
- **Evidence table**: Hypothesis → verdict → key evidence (file:line)
|
|
56
|
+
- **Root cause**: Clear statement of what's wrong and why
|
|
57
|
+
- **Recommended fix**: Specific changes with file references
|
|
58
|
+
|
|
59
|
+
## Phase 5: Offer Fix
|
|
60
|
+
|
|
61
|
+
Ask user via AskUserQuestion: "Want me to implement this fix?"
|
|
62
|
+
|
|
63
|
+
- **YES** → Implement the fix directly in main session using GUIDED approach: load implementation-patterns, search-first, and test-driven-development skills, then code the fix. Spawn `Task(subagent_type="Simplifier")` on changed files after.
|
|
64
|
+
- **NO** → Done. Report stands as documentation.
|
|
65
|
+
|
|
66
|
+
## Error Handling
|
|
67
|
+
|
|
68
|
+
- **All hypotheses disproved, no second-round ideas**: Report "No root cause identified" with summary of what was investigated and ruled out
|
|
69
|
+
- **Explore agents return insufficient evidence**: Report LOW confidence with available evidence, suggest manual investigation areas
|
|
@@ -38,8 +38,10 @@ 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
|
-
├──
|
|
42
|
-
└──
|
|
41
|
+
├── backup.json # Pre-compact git state snapshot
|
|
42
|
+
└── knowledge/
|
|
43
|
+
├── decisions.md # Architectural decisions (ADR-NNN format)
|
|
44
|
+
└── pitfalls.md # Known pitfalls (PF-NNN format)
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
---
|
|
@@ -97,6 +99,8 @@ source .devflow/scripts/docs-helpers.sh 2>/dev/null || {
|
|
|
97
99
|
|-------|-----------------|----------|
|
|
98
100
|
| Reviewer | `.docs/reviews/{branch-slug}/{type}-report.{timestamp}.md` | Creates new |
|
|
99
101
|
| Working Memory | `.memory/WORKING-MEMORY.md` | Overwrites (auto-maintained by Stop hook) |
|
|
102
|
+
| Knowledge (decisions) | `.memory/knowledge/decisions.md` | Append-only (ADR-NNN sequential IDs) |
|
|
103
|
+
| Knowledge (pitfalls) | `.memory/knowledge/pitfalls.md` | Append-only (PF-NNN sequential IDs) |
|
|
100
104
|
|
|
101
105
|
### Agents That Don't Persist
|
|
102
106
|
|
|
@@ -125,6 +129,7 @@ When creating or modifying persisting agents:
|
|
|
125
129
|
This framework is used by:
|
|
126
130
|
- **Review agents**: Creates review reports
|
|
127
131
|
- **Working Memory hooks**: Auto-maintains `.memory/WORKING-MEMORY.md`
|
|
132
|
+
- **Command flows**: `/implement` appends ADRs to `decisions.md`; `/code-review`, `/debug`, `/resolve` append PFs to `pitfalls.md`
|
|
128
133
|
|
|
129
134
|
All persisting agents should load this skill to ensure consistent documentation.
|
|
130
135
|
|