# Intent Representation & Decomposition Strategies

**Cross-Reference**: `miaco decompose run --help`  
**Related Issue**: jgwill/Miadi#388 (View System)  
**Connection**: How the view system's three-mode content exposure mirrors decomposition strategy selection.

---

## The Insight

The view system (HTML, Markdown, raw) and `miaco decompose run`'s strategies (standard, iterative-refinement, adversarial-consensus) solve parallel problems:

| Layer | View System | Miaco Decompose | Problem Being Solved |
|-------|-------------|-----------------|----------------------|
| **Single Intent** | One file (source of truth) | One prompt | Original request |
| **Multiple Representations** | HTML (interactive), Markdown (readable), raw (programmable) | standard (direct), iterative-refinement (loop), adversarial-consensus (challenge) | Different consumption contexts require different perspectives |
| **Audience Selection** | User chooses mode | Strategy flag selects approach | Same intent, different audience/purpose |

---

## Three Decomposition Strategies in `miaco`

### 1. **Standard** (Default)
- Direct decomposition with no iteration
- Single-pass analysis
- Fastest, lowest cognitive load for decomposer
- **View System Analogue**: Rendered HTML mode (immediate, self-contained)

### 2. **Iterative-Refinement**
- Decompose → refine → decompose again
- Progressive deepening of insight
- Suitable for complex, multi-faceted prompts
- **View System Analogue**: Rendered Markdown mode (layered, formatted for reading progression)

### 3. **Adversarial-Consensus**
- Multiple decomposition perspectives considered in parallel
- Consensus-building across different framings
- Highest confidence but more expensive
- **View System Analogue**: Raw API mode (exposes underlying structure for external validation)

---

## Intent Representation Strategies

This field explores the deeper pattern: **how do we hold and expose intent across different consumers?**

### Current Implementation
- **View System**: Intent (file content) → three modes (HTML, Markdown, raw)
- **Miaco**: Intent (prompt) → three strategies (standard, iterative-refinement, adversarial-consensus)

### The Generalization
Both systems answer: *Given an intent, what are the ways to represent it for different audiences?*

**Audiences**:
- **Human (visual)**: Rendered, formatted, distraction-free (HTML in iframe or Markdown article)
- **Human (analytical)**: Structured, progressive (iterative-refinement strategy)
- **System (programmatic)**: Raw, unfiltered (raw API or adversarial-consensus alternatives)

### Design Pattern
```
Intent (source of truth)
  ├─ Audience: Visual Consumer
  │  └─ Representation: Rendered HTML or Formatted Markdown
  │
  ├─ Audience: Analytical Human
  │  └─ Representation: Progressive Disclosure, Iterative Refinement
  │
  └─ Audience: External System
     └─ Representation: Raw Content or Consensus Model
```

---

## Engineering Implications

### For View System
- Could extend beyond HTML/Markdown: add strategy-based rendering?
- Example: `/v?p=/path&strategy=iterative-refinement` could offer step-by-step reading guide
- Example: `/v?p=/path&strategy=adversarial-consensus` could show conflicting interpretations

### For Miaco
- Strategies should eventually be composable with other tools
- Intent representation vocabulary should bridge to content exposure patterns

### For Foundations Packet
- This field connects micro-level (view system) to macro-level (decomposition CLI)
- Both are implementing the same principle: **Intent → Multiple Representations → Audience Selection**

---

## Tension to Resolve

**How do we design systems where intent can flow across contexts—from human reading to machine processing to other machines—without losing fidelity?**

Current answer: Three-mode exposure (view system) + three-strategy decomposition (miaco).  
Future question: Can these be unified into a single intent-representation language?

---

## Related Artifacts

- **Spec**: `rispecs/view-system/view-system.spec.md`
- **Code**: `app/v/viewer.tsx`, `components/site-chrome.tsx`, `middleware.ts`
- **CLI**: `miaco decompose run --strategy={standard|iterative-refinement|adversarial-consensus}`
- **Foundations**: `foundations/content-visualization-and-exposure/` (this packet)

---

**Status**: 🌱 Initial insight — pattern identified, CLI grounding verified, further unification deferred.
