Files
ss-tools/.agents/commands/speckit.specify.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

3.9 KiB

description, handoffs
description handoffs
Create or update the feature specification from a natural-language feature description for the superset-tools project (Python backend + Svelte frontend).
label agent prompt
Build Technical Plan speckit.plan Create a Python/Svelte implementation plan for the active feature
label agent prompt send
Clarify Spec Requirements speckit.clarify Clarify specification requirements true

User Input

$ARGUMENTS

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

Outline

The feature description is the text passed to /speckit.specify.

  1. Generate a concise short name (2-4 words) for the feature branch.
  2. Check existing branches/spec directories and run .specify/scripts/bash/create-new-feature.sh --json ... exactly once.
    • This step is the source of truth for the feature lifecycle.
    • It MUST create and checkout the git branch NNN-short-name when git is available.
    • It MUST create specs/NNN-short-name/ and initialize spec.md there.
    • Treat the returned SPEC_FILE path as authoritative and derive FEATURE_DIR from it.
  3. Load these sources before writing the spec:
    • .specify/templates/spec-template.md
    • .specify/templates/ux-reference-template.md
    • .specify/memory/constitution.md
    • .opencode/skills/semantics-core/SKILL.md — §VIII Attention Architecture for spec density rules
    • README.md
    • relevant docs/adr/* when the feature clearly touches an existing architectural lane
  4. Create or update the following artifacts inside FEATURE_DIR only:
    • spec.md
    • ux_reference.md
    • checklists/requirements.md
  5. Generate ux_reference.md as an interaction reference for operators, API callers, and (when applicable) browser-based UI flows. Capture result envelopes, warnings, and recovery behavior.
  6. Write spec.md focused on what the user/operator needs and why, not how Python or Svelte will implement it.
  7. Validate the spec against a requirements-quality checklist and iterate until major issues are resolved.

Specification Rules

  • Use domain language appropriate for this repository: Superset dashboards, datasets, migrations, Git operations, tasks, plugins, RBAC, WebSocket logging.
  • Avoid leaking implementation details such as module names, file-level refactors, Pydantic schemas, or Svelte component names.
  • Use [NEEDS CLARIFICATION: ...] only for truly blocking product ambiguities. Maximum 3 markers.
  • Prefer informed defaults grounded in repository context over unnecessary clarification.
  • Feature may be backend-only (Python/FastAPI), frontend-only (Svelte/Tailwind), or fullstack (both).
  • Do not write feature outputs to .kilo/plans/, .kilo/reports/, or any path outside specs/<feature>/....

UX / Interaction Reference Rules

  • ux_reference.md is mandatory.
  • For backend/API features: capture caller persona, happy-path invocation flow, result envelope expectations, warning/degraded states, failure recovery guidance, and canonical terminology.
  • For frontend features: additionally capture UI states, navigation flows, WebSocket feedback expectations, and browser-verifiable behavior.
  • Only include @UX_* guidance when the feature has a user interface component.

Quality Validation

Generate FEATURE_DIR/checklists/requirements.md and ensure it validates:

  • no implementation leakage into spec.md
  • compatibility with the Python/Svelte superset-tools stack
  • measurable success criteria
  • explicit edge cases and recovery paths
  • decision-memory readiness for downstream planning

If unresolved clarification markers remain, present them in a compact, high-impact format and stop for user input.

Completion Report

Report:

  • branch name
  • feature directory under specs/
  • spec.md path
  • ux_reference.md path
  • checklist path and status
  • readiness for /speckit.clarify or /speckit.plan