Files
ss-tools/.agents/commands/speckit.semantics.md
busya 576fff8cc6 fix(agent-chat): streaming state leak, document parser magic bytes, HITL flow
### Bugfixes — Agent Chat 'Думаю' State Leak
- fix(agent-chat): loadHistory() now resets streamingState/idle + cancels stale
  submission — prevents 'Думаю' state leak across conversation switches
- fix(agent-chat): onDisconnected/onDisconnectedPermanent cascade to
  streamingState — prevents permanent hang on connection loss during stream
- fix(agent-chat):  guard on isLoadingHistory — prevents false commit
  of 'agent unavailable' fallback when switching conversations
- fix(agent-chat): remove race in _sendNow empty-response check vs Svelte
   microtask (duplicate logic removed,  handles correctly)
- fix(stream-processor): confirm_resolved now appends msg.text to partialText
  instead of dropping it

### Bugfixes — Backend PDF Upload
- fix(document-parser): _detect_format_by_magic() — reads file header magic
  bytes as fallback when Gradio loses filename
- fix(document-parser): improved name extraction — tries orig_name, path stem
- fix(document-parser): @RELATION AgentChatTypes -> AgentChat.Types

### HITL Flow & Agent Chat Improvements
- feat(agent): HITL resume confirm/deny with userId/userJwt/envId propagation
- feat(agent): confirm_required metadata fallback via aget_state() after
  'Event loop is closed' error during interrupt
- feat(agent): interrupt_before re-enabled via AGENT_CONFIRM_TOOLS env var
- feat(frontend): debug panel with connection/stream state monitoring
- feat(frontend): AgentChatModel constructor options + onBeforeSend callback
- feat(frontend): crypto.randomUUID() for local conversation ID on first send

### Backend Agent Refactoring
- refactor(agent): langgraph_setup — monkey-patch for PydanticSerializationError
- refactor(agent): tools.py — dual identity headers, expanded tool set
- refactor(agent): run.py — _find_free_port, Gradio server port fallback
- refactor(agent): app.py — file size validation, message truncation, HITL path

### Frontend
- feat(dashboard-hub): DashboardHubModel with filters, pagination, git actions
- feat(ui): DateRangeFilter component
- feat(i18n): new dashboard keys; cache tooltips fix
- fix(i18n): full run tooltips — cache is NOT ignored

### Semantic Protocol
- chore(agents): update all agents with canonical format
- chore(skills): sync semantics-core, semantics-contracts, molecular-cot-logging

### Housekeeping
- chore: remove stale semantic reports (10 files, Jan 2026)
- chore: update 033-gradio-agent-chat specs, contracts, UX, tasks, tests
- chore: add .agents/ directory (mirrors .opencode/ agent layouts)
- chore: update run.sh with DEV_MODE, port management
2026-06-29 17:15:25 +03:00

2.4 KiB

description
description
Maintain semantic integrity by reindexing, auditing, and reviewing the superset-tools repository through AXIOM MCP tools.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Goal

Ensure the repository adheres to the active GRACE semantic protocol using AXIOM MCP as the primary execution engine: reindex, measure semantic health, audit contracts, audit decision-memory continuity, and optionally route contract-safe fixes.

Operating Constraints

  1. ROLE: Orchestrator — coordinate semantic maintenance at the workflow level.
  2. MCP-FIRST — use AXIOM task-shaped tools for discovery, context, audit, impact analysis, and safe mutation planning.
  3. STRICT ADHERENCE — follow the local semantic authorities: MANDATORY USE skill({name="semantics-core"}), skill({name="semantics-contracts"}), skill({name="semantics-python"}), skill({name="semantics-svelte"}), skill({name="molecular-cot-logging"})
    • relevant docs/adr/*
  4. NON-DESTRUCTIVE — do not remove business logic; only add or correct semantic markup unless the user requested implementation changes.
  5. NO PSEUDO-CONTRACTS — do not mechanically inject fake semantic boilerplate.
  6. ID NAMING — use short domain-driven IDs, never full file paths or import paths as the semantic primary key.
  7. DECISION-MEMORY CONTINUITY — audit ADRs, preventive task guardrails, and local @RATIONALE / @REJECTED as a single chain.
  8. LANGUAGE-AWARE — Python uses # #region / # #endregion; Svelte HTML uses <!-- #region --> / <!-- #endregion -->; Svelte script uses // #region / // #endregion.

Execution Steps

  1. Reindex the semantic workspace.
  2. Measure workspace semantic health.
  3. Audit top issues:
    • broken anchors or malformed regions
    • missing complexity-required metadata
    • unresolved relations
    • isolated critical contracts
    • missing ADR continuity
    • restored rejected paths
    • retained workaround logic lacking local decision-memory tags
  4. Build remediation context for the top failing contracts.
  5. If $ARGUMENTS contains fix or apply, route to an implementation/curation agent instead of applying naive text edits.
  6. Re-run audit and report PASS/FAIL.

Output

Return:

  • health metrics
  • PASS/FAIL status
  • top issues
  • decision-memory summary
  • action taken or handoff initiated