medicine-wheel

decomposition-strategies — RISE Specification

Companion capability spec for @medicine-wheel/prompt-decomposition. Defines a strategy framework that lets a single prompt be decomposed through several complementary approaches — a fast deterministic foundation, multi-pass LLM elaboration, and dual-framing reconciliation — each producing the same ontology-enriched decomposition shape.

Version: 0.1.0
Package: @medicine-wheel/prompt-decomposition (capability layer)
Document ID: rispec-decomposition-strategies-v1
Last Updated: 2026-06-04
Companion of: prompt-decomposition.spec.md


Desired Outcome

Users create ontologically grounded decompositions whose depth they choose — selecting, per prompt, how much elaboration the decomposition deserves:

Every strategy yields the same enriched decomposition shape, so anything downstream (narrative beats, relational enrichment, ceremony guidance) reads the result identically regardless of how deeply it was created.


Creative Intent

What this enables: A decomposition becomes a dial, not a fixed routine. A focused prompt resolves on the deterministic foundation in milliseconds. A sprawling, ambiguous prompt advances through elaboration passes or dual framings that draw out secondary intents, dependency ordering, and ambiguity flags the foundation alone would leave implicit. The depth of attention matches the weight of the prompt.

Structural Tension:

Lineage: The deterministic foundation grows from the Four Directions decomposer described in prompt-decomposition.spec.md. The multi-pass and dual-framing strategies generalize an LLM-driven decomposition lineage (mcp-pde → progressive-refinement PDE) into the Medicine Wheel ontology.


The Strategy Framework

A decomposition strategy is a named approach to turning one prompt into one enriched decomposition. Strategies are interchangeable: a caller selects one by name, and the framework guarantees the result conforms to the same decomposition shape.

Strategy Identity

Every strategy exposes:

Execution Context

A strategy receives everything it needs through a single context, so each strategy stays stateless and the framework keeps session and model concerns centralized:

Behavior: The deterministic foundation strategy ignores the pass-execution callback entirely — it computes its result directly from the prompt — which is exactly why it needs no external model and stays synchronous and reproducible.

Execution Result

Every strategy returns the same envelope:


Strategies

heuristic (default)

The deterministic Four Directions decomposition described in prompt-decomposition.spec.md, now addressable as a named strategy.

This is the default. Selecting no strategy is identical to selecting heuristic, preserving every current caller’s behavior exactly.

llm-standard

A single model-assisted pass that reads the whole prompt at once and emits the full enriched decomposition.

iterative-refinement

Four sequential, session-chained passes, each building on the last:

Pass Label What it draws out
1 coarse Primary intent + secondary intents
2 directions Four Directions mapping, context requirements, expected outputs
3 actions Ordered action stack with dependency edges
4 calibrate Ambiguity flags + recalibrated confidence scores

adversarial-consensus

Two parallel framings of the same prompt, then reconciled:

Framing Posture Confidence range Ambiguity stance
open Assumes clarity, draws maximum intents higher flags only the genuinely unclear
questioning Assumes ambiguity, stays conservative lower flags assumptions exhaustively

Strategy Selection

Behavior: A caller selects a strategy by name. An unknown name is declined with a message listing the available strategies, so selection mistakes surface immediately rather than silently falling back.

Behavior: Omitting the selector resolves to heuristic. The deterministic foundation is always the path of least surprise.

Decision Guidance

Prompt characteristic Strategy Why
Focused, single concern heuristic The foundation captures it instantly and reproducibly
Multi-concern, well-defined heuristic or llm-standard Foundation often suffices; a model reading adds nuance
Complex, interleaved concerns iterative-refinement Progressive passes draw out structure and dependency order
Ambiguous or underspecified adversarial-consensus The questioning framing surfaces hidden assumptions
Latency- or cost-sensitive heuristic One synchronous pass, no model
Reproducibility required heuristic Deterministic by construction

Behavior: Selection is explicit. The framework does not infer prompt complexity automatically; the caller chooses the depth, keeping decompositions predictable.


Two Decomposition Surfaces

The strategy framework adds an advancing layer beside the existing decomposer rather than replacing it.

Deterministic surface (unchanged)

Strategy-aware surface (new, optional)

This separation keeps the synchronous foundation intact while the strategy runner offers depth on demand.


MCP Manifestation

The decompose tool exposed by the Medicine Wheel MCP server gains strategy awareness while staying backward compatible.


Trace, Provenance & Relational Accountability

Multi-pass and dual-framing strategies create richer traces than a single deterministic pass. Because those traces may carry the original prompt and raw model text, the spec treats trace persistence as a relational-accountability concern aligned with OCAP® principles.


Strategy Metadata Persistence

When a decomposition is stored, the strategy that created it is recorded as additive metadata, so existing stored decompositions remain fully readable:


Creative Advancement Scenarios

Creative Advancement Scenario: Foundation settles a focused prompt Desired Outcome: A developer wants a quick, reproducible Four Directions reading of “Add pagination to the /users endpoint.” Current Reality: The prompt is focused and well-scoped; no deeper elaboration is warranted. Natural Progression: The developer selects no strategy. The deterministic foundation classifies the prompt synchronously, surfacing the primary intent, directional balance, and a small action stack. Resolution: A reproducible decomposition appears instantly, with no model invoked — the depth matches the simplicity of the prompt.

Creative Advancement Scenario: Elaboration deepens a sprawling prompt Desired Outcome: A developer wants a well-sequenced plan from “Redesign authentication to support OAuth2, SAML, and magic links while keeping the existing session-cookie flow.” Current Reality: The prompt carries several interleaved concerns; a single reading would under-sequence the work. Natural Progression: The developer selects iterative-refinement. The coarse pass names primary and secondary intents; the directions pass maps them across the Four Directions with context and outputs; the actions pass orders an action stack along dependency edges; the calibrate pass flags ambiguities and recalibrates confidence. A model hiccup on the calibrate pass is met with graceful continuation — the decomposition emerges with a warning naming the skipped pass. Resolution: A dependency-ordered, ambiguity-aware decomposition emerges, its depth proportional to the prompt’s complexity, and its trace records exactly how it was created.

Creative Advancement Scenario: Dual framing surfaces hidden assumptions Desired Outcome: A team wants the blind spots drawn out of “Migrate the monolith to microservices with zero downtime, preserving all API contracts.” Current Reality: The prompt reads as confident but rests on unstated assumptions about contracts, data, and rollout. Natural Progression: The team selects adversarial-consensus. An open framing and a questioning framing read the prompt in parallel; confidence-aware reconciliation composes them, leading with the questioning framing’s ambiguity flags. Resolution: One decomposition arrives that both names the work and foregrounds its assumptions, in roughly the wall-clock time of a single reading.


Advancing Patterns


Quality Criteria