Files
ss-tools/.agents/commands/speckit.implement.md
busya 12678c637b 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

3.1 KiB

description, handoffs
description handoffs
Execute the implementation plan by processing the active tasks.md for the superset-tools repository (Python backend + Svelte frontend).
label agent prompt send
Audit & Verify (Tester) qa-tester Perform semantic audit, executable verification, and contract checks for the completed task batch. true
label agent prompt send
Orchestration Control swarm-master Review tester feedback and coordinate next steps. true

User Input

$ARGUMENTS

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

Outline

  1. Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks and locate the active feature artifacts.
  2. If checklists/ exists, evaluate checklist completion status before implementation proceeds.
  3. Load implementation context from:
    • tasks.md
    • plan.md
    • spec.md
    • ux_reference.md
    • contracts/modules.md when present
    • research.md, data-model.md, quickstart.md when present
    • .specify/memory/constitution.md
    • README.md
    • relevant docs/adr/*.md
  4. Parse tasks by phase, dependencies, story ownership, and guardrails.
  5. Execute implementation phase-by-phase with strict semantic and verification discipline.

Repository Reality Rules

  • Source paths: backend/src/**/*.py and frontend/src/**/*.svelte.
  • Active feature docs always live under specs/<feature>/... and are discovered via the .specify/scripts/bash/* helpers.
  • Default verification stack:
    • Backend: cd backend && source .venv/bin/activate && python -m pytest -v
    • Backend lint: cd backend && python -m ruff check .
    • Frontend lint: cd frontend && npm run lint
    • Frontend: cd frontend && npm run test
    • Frontend build: cd frontend && npm run build
  • Do not fall back to Rust cargo/src/server/ conventions — this is a Python/Svelte project.

Semantic Execution Rules

  • Preserve and extend canonical anchor regions.
  • Match contract density to effective complexity.
  • Keep accepted-path and rejected-path memory intact.
  • Do not silently restore an ADR- or contract-rejected branch.
  • For C4/C5 Python orchestration flows, account for the belief runtime (JSON structured logging via reason(), reflect(), explore()).
  • For C4/C5 Svelte components, account for belief runtime (console markers [ComponentID][MARKER]).
  • Treat pseudo-semantic markup as invalid.

Progress and Acceptance

  • Mark tasks complete only after local verification succeeds.
  • Handoff to the tester must include touched files, declared complexity, contract expectations, ADR guardrails, and executed verifiers.
  • Final acceptance requires explicit evidence that verification was executed.
  • .kilo/plans/* may exist as internal assistant scratch context, but it is not part of the speckit feature output surface and must not replace specs/<feature>/... artifacts.

Completion Gate

No task batch is complete if any of the following remain in the touched scope:

  • broken or unclosed anchors
  • missing complexity-required metadata
  • unresolved critical contract gaps
  • rejected-path regression
  • required verification not executed