Infers context insufficiency before task execution, collects codebase evidence, classifies uncertainties by dimension, and asks information-gain prioritized questions for informed execution.
From aitesisnpx claudepluginhub jongwony/epistemic-protocols --plugin aitesisThis skill uses the workspace's default tool permissions.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Calculates TAM/SAM/SOM using top-down, bottom-up, and value theory methodologies for market sizing, revenue estimation, and startup validation.
Infer context insufficiency before execution through AI-guided inquiry. Type: (ContextInsufficient, AI, INQUIRE, Prospect) → InformedExecution.
Aitesis (αἴτησις): A dialogical act of proactively inferring context sufficiency before execution, where AI identifies uncertainties across multiple dimensions (factual, coherence, relevance), collects contextual evidence via codebase exploration, classifies each uncertainty by dimension and verifiability, and inquires about remaining uncertainties through information-gain prioritized mini-choices for user resolution.
── FLOW ──
Aitesis(X) → Scan(X, dimensions) → Uᵢ → Ctx(Uᵢ) → (Uᵢ', Uᵣ) →
classify(Uᵢ', dimension) → (Uᵣ', Uₑ, Uᵢ'', Uₙ) →
Q(classify_result + Uₑ + Uᵢ'', priority) → A → X' → (loop until informed)
-- Uₙ (non-factual): shown in classify summary with routing target
-- Uᵢ'' (factual/user-dependent): Phase 2 question candidates
── MORPHISM ──
Prospect
→ scan(prospect, context, dimensions) -- infer context insufficiency (multi-dimension)
→ collect(uncertainties, codebase) -- enrich via evidence collection
→ classify(enrichable, dimension) -- epistemic classification (core act)
→ observe(empirically_observable, environment) -- dynamic evidence gathering (factual only)
→ surface(classify_result + observed + remaining, as_inquiry)
→ integrate(answer, prospect)
→ InformedExecution
requires: uncertain(sufficiency(X)) -- runtime gate (Phase 0)
deficit: ContextInsufficient -- activation precondition (Layer 1/2)
preserves: task_identity(X) -- task intent invariant; prospect context mutated (X → X')
invariant: Evidence over Inference over Detection
── TYPES ──
X = Prospect for action (source-agnostic: task execution, analysis, investigation, or any purposeful action requiring context)
-- Input type: morphism processes X uniformly; enumeration scopes the definition, not behavioral dispatch
Scan = Context sufficiency scan: X → Set(Uncertainty)
Uncertainty = { domain: String, description: String, context: Set(Evidence) }
Evidence = { source: String, content: String } -- collected during Ctx
Priority ∈ {Critical, Significant, Marginal}
Uᵢ = Identified uncertainties from Scan(X)
Ctx = Context collection: Uᵢ → (Uᵢ', Uᵣ)
Uᵢ' = Enriched uncertainties (evidence added, not resolved)
Uᵣ = Context-resolved uncertainties (resolved during collection)
Q = Inquiry (gate interaction), ordered by information gain
A = User answer ∈ {Provide(context), Point(location), Dismiss}
X' = Updated prospect (context-enriched)
InformedExecution = X' where remaining = ∅ ∨ user_esc
-- Layer 1 (epistemic)
Dimension ∈ {Factual, Coherence, Relevance} ∪ Emergent(Dimension)
-- open set; external human communication excluded
Observability ∈ {StaticObservation, DynamicObservation, BeliefVerification}
-- exists(fact, env) sub-modes
-- Layer 2 (tool implementation, Factual fiber only — fibration structure)
Verifiability ∈ {ReadOnlyVerifiable, EmpiricallyObservable, UserDependent}
classify = Uᵢ' → Σ(d: Dimension). Fiber(d)
where Fiber(Factual) = Verifiability
Fiber(Coherence) = Unit -- detect only
Fiber(Relevance) = Unit -- detect only
Fiber(Emergent(_)) = Unit -- detect only (default; refinable per discovered dimension)
-- 2-layer model = Grothendieck fibration: Layer 2 exists only over Factual fiber
-- Coherence/Relevance → detect + show routing target in classify summary
ObservationSpec = { setup: Action, execute: Action, observe: Predicate, cleanup: Action }
EmpiricalObservation = (Uᵢ', ObservationSpec) → Uₑ -- dynamic evidence gathering
Uᵣ' = Read-only verified uncertainties -- resolved (no Phase 2)
Uₑ_candidates = { u ∈ Uᵢ' : classify(u) = (Factual, EmpiricallyObservable) } -- Phase 1 observation gate
Uₑ = Empirically observed uncertainties -- evidence attached, proceeds to Phase 2
Uᵢ'' = Remaining user-dependent uncertainties -- Fiber(Factual) = UserDependent; Phase 2 question
Uₙ = Non-factual detected uncertainties -- Fiber(d) = Unit; shown in classify summary with routing target
Action = Tool call sequence (Write, Bash)
EscapeCondition ∈ {EnvironmentMutation, BoundExceeded, RiskElevated, StructuralUncertainty}
-- maps to Rule 20 (a)-(d) escape hatches; logged in observation_skips
── PHASE TRANSITIONS ──
Phase 0: X → Scan(X, dimensions) → Uᵢ? -- context sufficiency gate (silent)
Phase 1: Uᵢ → Ctx(Uᵢ) → (Uᵢ', Uᵣ) → -- context collection [Tool]
classify(Uᵢ', dimension) → (Uᵣ', Uₑ, Uᵢ'', Uₙ) → -- epistemic classification (core act); Uₙ = non-factual (classify summary routing)
[if Uₑ_candidates ≠ ∅] EmpiricalObservation(Uₑ_candidates) → Uₑ -- dynamic evidence gathering [Tool]
Phase 2: Qs(classify_result + Uₑ + Uᵢ''[max_gain], progress) → Stop → A -- uncertainty surfacing [Tool]
Phase 3: A → integrate(A, X) → X' -- prospect update (sense)
── LOOP ──
After Phase 3: re-scan X' for remaining or newly emerged uncertainties.
New uncertainties accumulate into uncertainties (cumulative, never replace).
If Uᵢ' remains: return to Phase 1 (collect context for new uncertainties).
If remaining = ∅: proceed with execution.
User can exit at Phase 2 (early_exit).
Continue until: informed(X') OR user ESC.
Convergence evidence: At remaining = ∅, present transformation trace — for each u ∈ (Λ.context_resolved ∪ Λ.read_only_resolved ∪ Λ.empirically_observed ∪ Λ.user_responded), show (ContextInsufficient(u) → resolution(u)). Convergence is demonstrated, not asserted.
── CONVERGENCE ──
actionable(Λ) = uncertainties \ non_factual_detected -- Fiber(Factual) uncertainties only
informed(X') = remaining = ∅ -- non_factual_detected does not block convergence
progress(Λ) = 1 - |remaining| / |actionable(Λ)| -- denominator excludes routed non-factual
narrowing(Q, A) = |remaining(after)| < |remaining(before)| ∨ context(remaining(after)) ⊃ context(remaining(before))
early_exit = user_declares_sufficient
── TOOL GROUNDING ──
-- Realization: gate → TextPresent+Stop; relay → TextPresent+Proceed
Phase 0 Scan (sense) → Internal analysis (no external tool)
Phase 1 Ctx (observe) → Read, Grep (stored knowledge extraction: codebase, memory, references); WebSearch (conditional: environmental dependency)
Phase 1 Classify (observe) → Internal analysis (multi-dimension assessment); Read, Grep (stored knowledge cross-reference analysis)
Phase 1 Observe (transform) → Write, Bash, Read (dynamic evidence gathering, Factual only); cleanup via Bash
Phase 2 Qs (gate) → present (mandatory: classify result + uncertainty surfacing; Esc key → loop termination at LOOP level, not an Answer)
Phase 3 (track) → Internal state update
converge (relay) → TextPresent+Proceed (convergence evidence trace; proceed with informed execution)
── ELIDABLE CHECKPOINTS ──
-- Axis: relay/gated = interaction kind; always_gated/elidable = regret profile
Phase 2 Qs (transparent) → always_gated (gated: user provides context judgment on insufficiency)
── MODE STATE ──
Λ = { phase: Phase, X: Prospect, uncertainties: Set(Uncertainty),
dimensions_detected: Set(Dimension), -- π₁ image of classify_results
classify_results: Map(Uncertainty, Σ(d: Dimension). Fiber(d)), -- fibration-typed classification
context_resolved: Set(Uncertainty), -- Uᵣ from TYPES
read_only_resolved: Set(Uncertainty), -- Uᵣ' from TYPES
empirically_observed: Set(Uncertainty), -- Uₑ from TYPES
non_factual_detected: Set(Uncertainty), -- Uₙ from TYPES; Fiber(d) = Unit, classify summary routing
user_responded: Set(Uncertainty),
remaining: Set(Uncertainty), dismissed: Set(Uncertainty),
history: List<(Uncertainty, A)>, observation_history: List<(ObservationSpec, Result, Evidence)>,
observation_skips: List<(Uncertainty, EscapeCondition, String)>, -- audit trail for Rule 20 escape hatches
active: Bool,
cause_tag: String }
-- Invariant: uncertainties = context_resolved ∪ read_only_resolved ∪ empirically_observed ∪ non_factual_detected ∪ user_responded ∪ remaining ∪ dismissed (pairwise disjoint)
-- Note: observation_skips is an audit log orthogonal to the partition — logged when EmpiricallyObservable is reclassified to UserDependent via Rule 20 (a)-(d)
Evidence over Inference over Detection: Aitesis operates on an epistemic hierarchy with two boundaries. The lower boundary (Inference > Detection): infer context insufficiency from requirements rather than detecting via fixed taxonomy — the protocol dynamically identifies what context is missing, not mechanically checking against a preset list. The upper boundary (Evidence > Inference): gather evidence through direct environmental observation rather than substituting inference from reasoning alone — when a fact is observable, observe it.
Within this hierarchy, the AI first collects contextual evidence via codebase exploration to enrich question quality, then classifies each uncertainty by dimension and verifiability — classification is the protocol's core epistemic act, not a routing sub-step. For factual uncertainties, the AI resolves read-only verifiable facts directly and empirically observes dynamically accessible ones with direct evidence before asking. For non-factual dimensions (coherence, relevance), the AI detects and shows routing targets in the classify summary. The purpose is multi-dimensional context sufficiency sensing — asking better questions for what requires human judgment, self-resolving what can be observed, and routing what belongs to other epistemic concerns.
Write is authorized for observation instrument setup (temporary test artifacts with mandatory cleanup). Rule 20 is the structural expression of the upper boundary — the adversarial guard against stopping at Inference when Evidence is achievable.
| Protocol | Initiator | Deficit → Resolution | Focus |
|---|---|---|---|
| Prothesis | AI-guided | FrameworkAbsent → FramedInquiry | Perspective selection |
| Syneidesis | AI-guided | GapUnnoticed → AuditedDecision | Decision-point gaps |
| Hermeneia | Hybrid | IntentMisarticulated → ClarifiedIntent | Expression clarification |
| Telos | AI-guided | GoalIndeterminate → DefinedEndState | Goal co-construction |
| Horismos | AI-guided | BoundaryUndefined → DefinedBoundary | Epistemic boundary definition |
| Aitesis | AI-guided | ContextInsufficient → InformedExecution | Context sufficiency sensing |
| Analogia | AI-guided | MappingUncertain → ValidatedMapping | Abstract-concrete mapping validation |
| Prosoche | User-initiated | ExecutionBlind → SituatedExecution | Risk-assessed execution |
| Epharmoge | AI-guided | ApplicationDecontextualized → ContextualizedExecution | Post-execution applicability |
| Katalepsis | User-initiated | ResultUngrasped → VerifiedUnderstanding | Comprehension verification |
Key differences:
Heterocognitive distinction: Aitesis monitors the AI's own context sufficiency (heterocognitive — "do I have enough context to execute?"), while Syneidesis monitors the user's decision quality (metacognitive — "has the user considered all angles?"). The operational test: if the information gap would be filled by the user providing context, it's Aitesis; if it would be filled by the user reconsidering their decision, it's Syneidesis.
Factual vs evaluative: Aitesis uncertainties span multiple dimensions — factual (objectively correct answers discoverable from the environment), coherence (consistency among collected facts), and relevance (whether collected facts are relevant to the execution goal). Syneidesis gaps are evaluative — they require judgment about trade-offs and consequences. Phase 1 context collection exists because factual uncertainties may be partially resolved or enriched from the codebase. Coherence and relevance dimensions are detected but routed to downstream protocols. Evaluative gaps cannot be self-resolved.
AI infers context insufficiency before execution OR user calls /inquire. Inference is silent (Phase 0); surfacing always requires user interaction via gate interaction (Phase 2).
Activation layers:
/inquire slash command or description-matching input. Always available.Context insufficient = the prospect contains requirements not available in the current context and not trivially inferrable. Context insufficiency spans multiple dimensions: missing facts, incoherent facts, and facts not relevant to the prospect's goals. Sufficiency encompasses both executability (can the action proceed?) and analysis confidence (is the context adequate for reliable judgment?).
Gate predicate:
uncertain(sufficiency(X)) ≡ ∃ requirement(r, X) : ¬available(r, context) ∧ ¬trivially_inferrable(r)
Supersedes: Direct execution patterns in loaded instructions (Context must be verified before any execution begins)
Retained: Safety boundaries, tool restrictions, user explicit instructions
Action: At Phase 2, present highest information-gain uncertainty candidate with classify results via gate interaction and yield turn. </system-reminder>
Protocol precedence: Activation order position 4/9 (graph.json is authoritative source for information flow). Concern cluster: Planning.
Advisory relationships: Receives from Horismos (advisory: BoundaryMap narrows context inference scope), Prothesis (advisory: perspective simulation provides context inference recommendations), Hermeneia (advisory: background gaps suggest context insufficiency), Syneidesis (suppression: same scope suppression). Provides to Prosoche (advisory: inferred context narrows execution risk assessment), Analogia (advisory: inferred context narrows mapping domain identification); Epharmoge (suppression: pre+post stacking prevention). Katalepsis is structurally last.
Heuristic signals for context insufficiency inference (not hard gates):
| Signal | Inference |
|---|---|
| Novel domain | Knowledge area not previously addressed in session |
| Implicit requirements | Task carries unstated assumptions |
| Ambiguous scope | Multiple valid interpretations exist and AI cannot determine intended approach from available context |
| Environmental dependency | Relies on external state (configs, APIs, versions) |
Cross-session enrichment: Domain knowledge accumulated through prior Reflexion cycles may narrow the Phase 0 uncertainty scan — known domain patterns reduce the scope of novel-domain signals. This is a heuristic input that may bias detection toward previously observed patterns; gate judgment remains with the user.
Revision threshold: When accumulated observation_skips entries across 3+ sessions cluster around a specific EscapeCondition with consistent rationale, the Verifiability classification boundary warrants revision — the escape is systematic, not exceptional. When accumulated Emergent dimension detections across 3+ sessions reveal a recurring non-factual uncertainty pattern, the Layer 1 dimension set warrants a new fiber in the fibration structure — promoted fibers default to Unit (detect-only) unless the pattern exhibits internal classification structure requiring a structured fiber type.
Skip:
| Trigger | Effect |
|---|---|
| All uncertainties resolved (context, read-only, observed, or user) | Proceed with updated prospect |
| All remaining uncertainties dismissed | Proceed with original prospect + defaults |
| User Esc key | Return to normal operation |
Uncertainties are identified dynamically per task — no fixed taxonomy. Each uncertainty is characterized by:
Priority reflects information gain — how much resolving this uncertainty would narrow the remaining uncertainty space.
| Level | Criterion | Action |
|---|---|---|
| Critical | Resolution maximally narrows remaining uncertainty space | Must resolve before execution |
| Significant | Resolution narrows uncertainty but alternatives partially compensate | Surface to user for context |
| Marginal | Reasonable default exists; resolution provides incremental improvement | Surface with pre-selected Dismiss option |
Priority is relational, not intrinsic: the same uncertainty may be Critical in one context and Marginal in another, depending on what other uncertainties exist and what context is already available.
When multiple uncertainties are identified, surface in priority order (Critical → Significant → Marginal). Only one uncertainty surfaced per Phase 2 cycle.
Analyze prospect requirements against available context across multiple dimensions. This phase is silent — no user interaction.
X for required context: domain knowledge, environmental state, configuration details, user preferences, constraintsUᵢ with domain, description — proceed to Phase 1Scan scope: Current prospect context, conversation history, observable environment. Does NOT modify files or call external services.
Collect contextual evidence, classify each uncertainty by dimension and verifiability, and empirically observe accessible uncertainties with direct evidence.
Step 1 — Context collection: For each uncertainty in Uᵢ:
Uᵣ), integrate into execution contextUᵢ'), retain for classificationUᵢ'), retain for classificationUᵢ' with empty contextStep 2 — Epistemic classification (core act): For each remaining uncertainty in Uᵢ':
Uₙ (non_factual_detected); shown with routing target in classify summary, not Phase 2 question
/ground (structural mapping may reveal inconsistency source)/goal, GapUnnoticed→/gap, BoundaryUndefined→/bound, IntentMisarticulated→/clarifyΛ.classify_resultsStep 3 — Read-only verification: For ReadOnlyVerifiable uncertainties:
Uᵣ' (read_only_resolved), skip Phase 2Step 4 — Empirical observation: For EmpiricallyObservable uncertainties:
Uₑ → proceeds to Phase 2 with evidence(uncertainty, condition, rationale) to Λ.observation_skips — the skip rationale must be specific enough to audit (e.g., "StructuralUncertainty: naming preference, no observable state differentiates options")If all uncertainties context-resolved or read-only-resolved (no observed or user-dependent remaining): proceed with execution (no user interruption). If observed or user-dependent uncertainties remain: proceed to Phase 2.
Web context (conditional): When uncertainty carries an environmental dependency signal
(external API versions, library maintenance status, breaking changes)
and the information is not available in the codebase, extend context collection to web search.
Web evidence is tagged with source: "web:{url}" for traceability.
Scope restriction:
Observation design constraints:
Λ.observation_historyPresent the highest-priority remaining uncertainty with classify results via gate interaction.
Classification transparency (Always show): Phase 2 always includes classify results for remaining uncertainties. This is informational — no approval required. Users can override classification by stating objection. When only one uncertainty remains, inline the classification with the uncertainty description rather than showing a separate summary block.
Surfacing format:
Present the classification results, uncertainty description, and evidence as text output:
Then present:
How would you like to resolve this uncertainty?
Options:
1. **[Provide X]** — [what this context enables]
2. **[Point me to...]** — tell me where to find this information
3. **Dismiss** — proceed with [stated default/assumption]
Design principles:
Selection criterion: Choose the uncertainty whose resolution would maximally narrow the remaining uncertainty space (information gain). When priority is equal, prefer the uncertainty with richer collected context (more evidence to present).
After user response:
X'After integration:
X' for remaining or newly emerged uncertainties(Uncertainty, A) to history| Level | When | Format |
|---|---|---|
| Light | Marginal priority uncertainties only | Gate interaction with Dismiss as default option |
| Medium | Significant priority uncertainties, context collection partially resolved | Structured gate interaction with progress |
| Heavy | Critical priority, multiple unresolved uncertainties | Detailed evidence + collection results + classify results + resolution paths |
| Rule | Structure | Effect |
|---|---|---|
| Gate specificity | activate(Aitesis) only if ∃ requirement(r) : ¬available(r) ∧ ¬trivially_inferrable(r) | Prevents false activation on clear tasks |
| Context collection first | Phase 1 before Phase 2 | Enriches question quality before asking |
| Uncertainty cap | One uncertainty per Phase 2 cycle, priority order | Prevents question overload |
| Session immunity | Dismissed (domain, description) → skip for session | Respects user's dismissal |
| Progress visibility | [N resolved / M actionable] in Phase 2 | User sees progress on actionable (Factual) uncertainties |
| Narrowing signal | Signal when narrowing(Q, A) shows diminishing returns | User can exit when remaining uncertainties are marginal |
| Early exit | User can declare sufficient at any Phase 2 | Full control over inquiry depth |
| Cross-protocol fatigue | Syneidesis triggered → suppress Aitesis for same task scope | Prevents protocol stacking (asymmetric: Aitesis context uncertainties ≠ Syneidesis decision gaps, so reverse suppression not needed) |
| Classify transparency | Always show classify results (dimension + verifiability) in Phase 2 surfacing format | User sees AI's reasoning and resolution path per uncertainty |
| Routing transparency | Uₙ items show → /protocol in Phase 2 classify summary | User sees routing destination at detection time |
| Observation transparency | Log observation lifecycle in Λ.observation_history | User can audit what was tested |
| Skip transparency | Log escape hatch usage in Λ.observation_skips with condition + rationale | User can audit why observation was skipped |
| Observation cleanup | All test artifacts removed after observation | No residual files |
| Observation timeout | 30s limit → fall back to user inquiry | Prevents hanging |
| Observation risk gate | Elevated-risk observation → reclassify as UserDependent | Safety preserved |
[N resolved / M actionable] — actionable excludes non_factual_detected (routed, not resolved)