Skip to content

Context Modes: Behavioral Tuning Layer for Ambient Classification #109

@dean0x

Description

@dean0x

Summary

Add behavioral context modes (dev, research, review) that tune Claude's approach priorities on top of ambient intent classification. Inspired by Harness Alpha's context mode system.

Motivation

Ambient mode currently classifies intent (BUILD/DEBUG/REVIEW/PLAN/EXPLORE/CHAT) and depth (QUICK/GUIDED/ELEVATE), then loads relevant skills. But it doesn't change how Claude approaches the work — the behavioral posture stays the same regardless of whether you're actively building vs researching vs reviewing.

Harness Alpha implements 3 context modes that shift priorities:

The Three Modes

Dev Mode — "Write code first, explain after"

  • Priorities: Get working → Get right → Get clean
  • Tools emphasis: Edit, Write, Bash, Grep, Glob
  • Behavioral shift: Bias toward action, not explanation

Research Mode — "Read widely before concluding"

  • Process: Understand → Explore → Hypothesize → Verify → Summarize
  • Tools emphasis: Read, Grep, Glob, WebSearch, WebFetch, Task/Explore agent
  • Behavioral shift: Bias toward breadth, defer judgment

Review Mode — "Quality, security, maintainability"

  • Checklist: Logic, edge cases, error handling, security, performance, readability, coverage
  • Output: Group by file, severity-first
  • Behavioral shift: Bias toward critique, structured findings

Why This Matters for DevFlow

Ambient classification already detects intent. Context modes add a behavioral layer:

Ambient Class Mode Applied Effect
BUILD dev Jump to implementation, minimize explanation
DEBUG dev Hypothesize-and-test, don't over-explain
REVIEW review Structured critique, severity-ordered
PLAN research Explore broadly, defer commitment
EXPLORE research Read widely, comprehensive answer
CHAT (none) Respond naturally

The classification already exists. Modes would inject a behavioral preamble that shifts priorities without loading additional skills.

Technical Approach

1. Mode Definitions

Create 3 context mode files (could live as skills or as lightweight injections):

# Dev Context
When in dev mode:
- Lead with code, not explanation
- Make the smallest working change first
- Explain only when the user asks or the decision is non-obvious
- If something needs research, use a subagent — don't block the main session

2. Ambient Router Integration

After classifying intent+depth, inject the matching mode context before skill loading:

Classification: BUILD/GUIDED
Mode: dev (injected)
Skills: test-driven-development, implementation-patterns (loaded)

3. User Override

Allow explicit mode selection:

  • devflow context dev / devflow context research / devflow context review
  • Or detect from ambient classification (default)

Impact

  • Low effort: 3 short markdown files + ambient router injection logic
  • Measurable behavior change: dev mode produces less preamble, research mode explores more thoroughly, review mode produces structured findings
  • Composable: modes layer on top of existing ambient + skill infrastructure

Cross-Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpost-v1.0.0Deferred to post-v1.0.0 release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions