From 252a8601a94c1d530d62c26531b039cbf68a9867 Mon Sep 17 00:00:00 2001 From: busya Date: Fri, 30 Jan 2026 11:10:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=80=D0=BE=D0=B4=D0=B5=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .kilocode/workflows/speckit.implement.md | 5 + .kilocode/workflows/speckit.test.md | 66 +++++ .specify/memory/constitution.md | 18 +- README.md | 158 ++++------ backend/git_repos/12 | 1 + backend/mappings.db | Bin 147456 -> 167936 bytes backend/requirements.txt | 5 +- backend/src/api/routes/git.py | 55 ++++ backend/src/api/routes/llm.py | 191 ++++++++++++ backend/src/api/routes/tasks.py | 21 +- backend/src/app.py | 3 +- backend/src/core/auth/config.py | 2 +- backend/src/core/database.py | 19 +- backend/src/models/llm.py | 46 +++ backend/src/plugins/git/llm_extension.py | 66 +++++ backend/src/plugins/llm_analysis/__init__.py | 11 + backend/src/plugins/llm_analysis/models.py | 61 ++++ backend/src/plugins/llm_analysis/plugin.py | 272 ++++++++++++++++++ backend/src/plugins/llm_analysis/scheduler.py | 56 ++++ backend/src/plugins/llm_analysis/service.py | 224 +++++++++++++++ backend/src/services/llm_provider.py | 117 ++++++++ .../screenshots/4_20260129_174429.png | Bin 0 -> 22932 bytes backend/tasks.db | Bin 172032 -> 172032 bytes frontend/src/components/DashboardGrid.svelte | 61 ++++ frontend/src/components/Navbar.svelte | 3 +- frontend/src/components/TaskHistory.svelte | 30 +- frontend/src/components/TaskRunner.svelte | 43 +-- .../src/components/auth/ProtectedRoute.svelte | 17 +- .../src/components/git/CommitModal.svelte | 40 ++- frontend/src/components/llm/DocPreview.svelte | 79 +++++ .../src/components/llm/ProviderConfig.svelte | 219 ++++++++++++++ .../components/llm/ValidationReport.svelte | 75 +++++ .../src/components/tools/MapperTool.svelte | 73 ++++- .../routes/admin/settings/llm/+page.svelte | 48 ++++ frontend/src/routes/login/+page.svelte | 15 +- frontend/src/routes/migration/+page.svelte | 1 + specs/015-frontend-nav-redesign/tasks.md | 1 + specs/016-multi-user-auth/tasks.md | 1 + .../checklists/data-integrity.md | 14 +- .../checklists/reliability-security.md | 10 +- .../checklists/ux-usability.md | 14 +- specs/017-llm-analysis-plugin/spec.md | 25 +- specs/017-llm-analysis-plugin/tasks.md | 91 +++--- 43 files changed, 1987 insertions(+), 270 deletions(-) create mode 100644 .kilocode/workflows/speckit.test.md create mode 160000 backend/git_repos/12 create mode 100644 backend/src/api/routes/llm.py create mode 100644 backend/src/models/llm.py create mode 100644 backend/src/plugins/git/llm_extension.py create mode 100644 backend/src/plugins/llm_analysis/__init__.py create mode 100644 backend/src/plugins/llm_analysis/models.py create mode 100644 backend/src/plugins/llm_analysis/plugin.py create mode 100644 backend/src/plugins/llm_analysis/scheduler.py create mode 100644 backend/src/plugins/llm_analysis/service.py create mode 100644 backend/src/services/llm_provider.py create mode 100644 backend/ss-tools-storage/screenshots/4_20260129_174429.png create mode 100644 frontend/src/components/llm/DocPreview.svelte create mode 100644 frontend/src/components/llm/ProviderConfig.svelte create mode 100644 frontend/src/components/llm/ValidationReport.svelte create mode 100644 frontend/src/routes/admin/settings/llm/+page.svelte diff --git a/.kilocode/workflows/speckit.implement.md b/.kilocode/workflows/speckit.implement.md index bab8eea..d2e2a47 100644 --- a/.kilocode/workflows/speckit.implement.md +++ b/.kilocode/workflows/speckit.implement.md @@ -1,5 +1,10 @@ --- description: Execute the implementation plan by processing and executing all tasks defined in tasks.md +handoffs: + - label: Verify Changes + agent: speckit.test + prompt: Verify the implementation of... + send: true --- ## User Input diff --git a/.kilocode/workflows/speckit.test.md b/.kilocode/workflows/speckit.test.md new file mode 100644 index 0000000..e25e166 --- /dev/null +++ b/.kilocode/workflows/speckit.test.md @@ -0,0 +1,66 @@ +--- +description: Run semantic validation and functional tests for a specific feature, module, or file. +handoffs: + - label: Fix Implementation + agent: speckit.implement + prompt: Fix the issues found during testing... + send: true +--- + +## User Input + +```text +$ARGUMENTS +``` + +**Input format:** Can be a file path, a directory, or a feature name. + +## Outline + +1. **Context Analysis**: + - Determine the target scope (Backend vs Frontend vs Full Feature). + - Read `semantic_protocol.md` to load validation rules. + +2. **Phase 1: Semantic Static Analysis (The "Compiler" Check)** + - **Command:** Use `grep` or script to verify Protocol compliance before running code. + - **Check:** + - Does the file start with `[DEF:...]` header? + - Are `@TIER` and `@PURPOSE` defined? + - Are imports located *after* the contracts? + - Do functions marked "Critical" have `@PRE`/`@POST` tags? + - **Action:** If this phase fails, **STOP** and report "Semantic Compilation Failed". Do not run runtime tests. + +3. **Phase 2: Environment Prep** + - Detect project type: + - **Python**: Check if `.venv` is active. + - **Svelte**: Check if `node_modules` exists. + - **Command:** Run linter (e.g., `ruff check`, `eslint`) to catch syntax errors immediately. + +4. **Phase 3: Test Execution (Runtime)** + - Select the test runner based on the file path: + - **Backend (`*.py`)**: + - Command: `pytest -v` + - If no specific test file exists, try to find it by convention: `tests/test_.py`. + - **Frontend (`*.svelte`, `*.ts`)**: + - Command: `npm run test -- ` + + - **Verification**: + - Analyze output logs. + - If tests fail, summarize the failure (AssertionError, Timeout, etc.). + +5. **Phase 4: Contract Coverage Check (Manual/LLM verify)** + - Review the test cases executed. + - **Question**: Do the tests explicitly verify the `@POST` guarantees defined in the module header? + - **Report**: Mark as "Weak Coverage" if contracts exist but aren't tested. + +## Execution Rules + +- **Fail Fast**: If semantic headers are missing, don't waste time running pytest. +- **No Silent Failures**: Always output the full error log if a command fails. +- **Auto-Correction Hint**: If a test fails, suggest the specific `speckit.implement` command to fix it. + +## Example Commands + +- **Python**: `pytest backend/tests/test_auth.py` +- **Svelte**: `npm run test:unit -- src/components/Button.svelte` +- **Lint**: `ruff check backend/src/api/` diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md index 0fe1e77..3e00c54 100644 --- a/.specify/memory/constitution.md +++ b/.specify/memory/constitution.md @@ -1,12 +1,9 @@
- -