-
Notifications
You must be signed in to change notification settings - Fork 1
feat(ambient): add agent orchestration to ambient mode #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,68 @@ | ||
| # devflow-ambient | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚠ Plugin README is entirely stale -- shows removed model This README still documents the old architecture:
The README was updated in the first commit but describes a model that doesn't match the actual code. Users reading this will see:
This is the primary user-facing documentation for ambient mode. Fix: Complete rewrite to match the new three-tier model (QUICK/GUIDED/ORCHESTRATED) with examples showing new behavior. Confidence: 100% (HIGH - Documentation) |
||
|
|
||
| Ambient mode — auto-loads relevant skills based on each prompt, no explicit commands needed. | ||
| Ambient mode — classifies intent and applies proportional effort via a `UserPromptSubmit` hook. No slash command — ambient mode activates automatically on every prompt when enabled. | ||
|
|
||
| ## Command | ||
|
|
||
| ### `/ambient` | ||
|
|
||
| Classify user intent and apply proportional skill enforcement to any prompt. | ||
|
|
||
| ```bash | ||
| /ambient add a login form # BUILD/GUIDED — loads TDD + implementation-patterns | ||
| /ambient fix the auth error # DEBUG/GUIDED — loads test-patterns + core-patterns | ||
| /ambient where is the config? # EXPLORE/QUICK — responds normally, zero overhead | ||
| /ambient refactor the auth system # BUILD/ELEVATE — suggests /implement | ||
| ``` | ||
|
|
||
| ## Always-On Mode | ||
|
|
||
| Enable ambient classification on every prompt without typing `/ambient`: | ||
| ## Activation | ||
|
|
||
| ```bash | ||
| devflow ambient --enable # Register UserPromptSubmit hook | ||
| devflow ambient --disable # Remove hook | ||
| devflow ambient --status # Check if enabled | ||
| ``` | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| ## How It Works | ||
|
|
||
| 1. **Classify intent** — BUILD, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT | ||
| 2. **Classify depth** — QUICK (zero overhead), GUIDED (2-3 skills), or ELEVATE (workflow nudge) | ||
| 1. **Classify intent** — IMPLEMENT, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT | ||
| 2. **Classify depth** — QUICK, GUIDED, or ORCHESTRATED (scope-based) | ||
| 3. **Apply proportionally**: | ||
| - QUICK: respond normally | ||
| - GUIDED: load relevant skills, enforce TDD for BUILD | ||
| - ELEVATE: respond + recommend full workflow command | ||
| - QUICK: respond normally (zero overhead) | ||
| - GUIDED: load skills, implement in main session, spawn Simplifier after code changes | ||
| - ORCHESTRATED: load skills, orchestrate full agent pipeline | ||
|
|
||
| ## Three-Tier Classification | ||
|
|
||
| | Depth | When | What Happens | | ||
| |-------|------|-------------| | ||
| | QUICK | Chat, exploration, git ops, config, trivial edits | Zero overhead — respond normally | | ||
| | GUIDED | Small-scope IMPLEMENT (≤2 files), clear DEBUG, focused PLAN, REVIEW | Load skills → main session works → Simplifier cleanup | | ||
| | ORCHESTRATED | Large-scope IMPLEMENT (>2 files), vague DEBUG, system-level PLAN | Load skills → spawn agent pipeline | | ||
|
|
||
| ### Intent × Depth Matrix | ||
|
|
||
| | Intent | GUIDED | ORCHESTRATED | | ||
| |--------|--------|-------------| | ||
| | IMPLEMENT | ≤2 files, single module | >2 files, multi-module | | ||
| | DEBUG | Clear error with stack trace/location | Vague/cross-cutting bug | | ||
| | PLAN | Focused design question | System-level architecture | | ||
| | REVIEW | Always GUIDED | — | | ||
|
|
||
| ## GUIDED Behavior | ||
|
|
||
| Skills are loaded via the Skill tool and work happens in the main session: | ||
|
|
||
| | Intent | Skills | Main Session Work | Post-Work | | ||
| |--------|--------|-------------------|-----------| | ||
| | IMPLEMENT | test-driven-development, implementation-patterns, search-first | Implement with TDD | `Task(subagent_type="Simplifier")` | | ||
| | DEBUG | core-patterns, test-patterns | Investigate, diagnose, fix | `Task(subagent_type="Simplifier")` | | ||
| | PLAN | implementation-patterns, core-patterns | Explore and design | — | | ||
| | REVIEW | self-review, core-patterns | Review directly | — | | ||
|
|
||
| ## ORCHESTRATED Pipelines | ||
|
|
||
| ## Depth Tiers | ||
| | Intent | Pipeline | | ||
| |--------|----------| | ||
| | IMPLEMENT | Pre-flight → Coder → Validator → Simplifier → Scrutinizer → Shepherd | | ||
| | DEBUG | Hypotheses → parallel Explores → convergence → report → offer fix | | ||
| | PLAN | Skimmer → Explores → Plan agent → gap validation | | ||
|
|
||
| | Depth | When | Overhead | | ||
| |-------|------|----------| | ||
| | QUICK | Chat, simple exploration, git/devops ops, single-word confirmations | ~0 tokens | | ||
| | GUIDED | BUILD/DEBUG/REVIEW/PLAN, 1-5 file scope | ~500-1000 tokens (skill reads) | | ||
| | ELEVATE | Multi-file, architectural, system-wide scope | ~0 extra tokens (nudge only) | | ||
| 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). | ||
|
|
||
| ## Skills | ||
|
|
||
| - `ambient-router` — Intent + depth classification, skill selection matrix | ||
| - `test-driven-development` — TDD enforcement for IMPLEMENT (GUIDED + ORCHESTRATED) | ||
| - `implementation-orchestration` — Agent pipeline for IMPLEMENT/ORCHESTRATED | ||
| - `debug-orchestration` — Agent pipeline for DEBUG/ORCHESTRATED | ||
| - `plan-orchestration` — Agent pipeline for PLAN/ORCHESTRATED | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Explore agent in plugin manifest ❌
The agents array lists: coder, validator, simplifier, scrutinizer, shepherd, skimmer, reviewer
But the orchestration skills explicitly reference Explore agents:
debug-orchestration/SKILL.md:34-- "Spawn one Explore agent per hypothesis"debug-orchestration/SKILL.md:46-- "Spawn 2-3 Explore agents"plan-orchestration/SKILL.md:33-- "spawn 2-3 Explore agents"These are ephemeral Task subagents, not declared shared agent definitions. However, the architectural contract is unclear. Either:
shared/agents/and include "explore" in the agents array, OROption 1 is stronger (single source of truth across all commands using Explore agents).
Confidence: 85% (HIGH - Architecture)