Skip to content

Ai flow - #12

Merged
oksbwn merged 26 commits into
masterfrom
ai_flow
Jul 26, 2026
Merged

oksbwn merged 26 commits into
masterfrom
ai_flow

Conversation

@oksbwn

@oksbwn oksbwn commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator
  1. Persona System Unification (Markdown Source of Truth)
    Source of Truth: Set .md files as authoritative for personas (resources/prompts/personas/.md and appData/personas/.md).
    Lookup Order: PersonaManager.getPersona() inspects .md files via PromptLoader before falling back to DB.
    Custom Personas: createCustomPersona() writes formatted .md files on creation.
    Database Refactor: Stripped prompt column from PersonaDB table. SQLite stores index metadata only; _hydratePersonaRow() loads frontmatter/body from .md files at runtime.
    Auto Migration: Added automatic ALTER TABLE personas DROP COLUMN prompt migration in PersonaDB._createTables() for backwards compatibility with existing on-disk databases.
    Default ID Alignment: Aligned default persona ID to 'general' across ConversationStore and ContextEngine.
  2. Prompt Pipeline & System Policies
    Static Core Policies: Added response-policy.md, conversation-policy.md, and formatting-policy.md to PromptPipeline._getStaticCore().
    Tool Calling Discipline: Added tool parameter pre-extraction rules to planning-policy.md.
    Evidence Sanitation & Truncation: Stripped capability error strings from retrieved evidence and added newline-aware evidence budget truncation.
    Dev Hot-Reloading: Added clearPromptCache() to PromptPipeline and PromptLoader.
  3. Orchestrator & Execution Hardening
    Stream Fallback Duplication Fix: Emitted onChunk({ type: 'replace', ... }) during fallback retries to prevent duplicate UI text rendering.
    Groq Compatibility: Omitted toolChoice (undefined) when tool maps are empty to prevent Groq HTTP 400 errors on toolChoice: 'none'.
    Conversational Task Intent Routing: IntentAnalyzer infers needsTasks on conversational follow-ups (e.g. "Which task first") when prior turns discussed tasks. Targeted task questions bypass deterministic summary formatting to allow LLM synthesis.
    Grounding Citation Link Cleanup: Added regex replacement in GroundingEngine.cleanMarkdownLinkEscaping() to normalize nested double links ([label](file://...)).

oksbwn added 26 commits July 25, 2026 14:11
…t unlinked file references into clickable file links
Add dedicated SQLite TelemetryDB, disaggregate token details, record real tool execution timestamps, and surface raw provider errors.
…TelemetryDB

Direct telemetry log retrieval to TelemetryDB and auto-clear thread telemetry on conversation deletion.
…s, and cleanup tools

Add Telemetry DB status row, explicit caller badges (System vs LLM), token breakdown chips, and target log cleanup controls.
- Route task queries to workspace_task_summary with >0.80 confidence
- Restrict graph search for task queries unless explicitly requested
- Add fallback sequence for empty task queries & filter evidence < 0.25
- Log plannerDecision and retrievalQuality telemetry metrics
- Cache static prompt core and add multi-tier provider fallback
- Add pipelineRegression test suite and update VitePress docs
…lity

- Fix ReferenceError in ContextOrchestrator for outputStr & s2SpanId
- Add conversational_followup router for context reuse queries
- Enforce min relevance threshold (0.10) and early exit in _deriveNextSteps
- Emit Stage 4 and estimated tokens on LLM execution errors
- Synchronize planner confidence and expose prompt breakdown metrics
- Update Groq provider model mapping to supported models
- Add unit & integration regression tests (134/134 passing)
@oksbwn
oksbwn merged commit 84e599b into master Jul 26, 2026
1 check failed
@oksbwn
oksbwn deleted the ai_flow branch July 28, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant