Commit graph

28 commits

Author SHA1 Message Date
Gros Frumos
6eea439c16 kin: KIN-ARCH-008 Конфигурируемая test_command на уровне проекта 2026-03-17 16:01:40 +02:00
Gros Frumos
538af5b799 kin: auto-commit after pipeline 2026-03-17 16:00:54 +02:00
Gros Frumos
04cbbc563b kin: auto-commit after pipeline 2026-03-16 23:34:22 +02:00
Gros Frumos
0ccd451b4b kin: KIN-091 Улучшения из исследования рынка: (1) Revise button с feedback loop, (2) auto-test before review — агент сам прогоняет тесты и фиксит до review, (3) spec-driven workflow для новых проектов — constitution → spec → plan → tasks, (4) git worktrees для параллельных агентов без конфликтов, (5) auto-trigger pipeline при создании задачи с label auto 2026-03-16 22:35:31 +02:00
Gros Frumos
a58578bb9d kin: KIN-BIZ-006 Проверить промпт sysadmin.md на поддержку сценария env_scan 2026-03-16 19:26:51 +02:00
Gros Frumos
bfc8f1c0bb kin: KIN-083 Healthcheck claude CLI auth: перед запуском pipeline проверять что claude залогинен (быстрый claude -p 'ok' --output-format json, проверить is_error и 'Not logged in'). Если не залогинен — не запускать pipeline, а показать ошибку 'Claude CLI requires login' в GUI с инструкцией. 2026-03-16 15:48:09 +02:00
Gros Frumos
cc592bfbbc kin: KIN-078 Канбан доска не отображается в в полную ширину экрана. Проверить был ли вызван хук перезагрузки после выполнения задачи. 2026-03-16 10:59:09 +02:00
Gros Frumos
394301c7a7 kin: KIN-075 Расширить канбан-вид до ширины экрана, сейчас он ограничен центром. + добавить кнопки Тас Аудит Автокомит Авто в канбан вид 2026-03-16 10:28:06 +02:00
Gros Frumos
7f8e0e2238 kin: KIN-FIX-002 Унифицировать localStorage значения execution_mode с 'auto_complete'
Заменены все вхождения 'auto' на 'auto_complete' как значение execution_mode в localStorage-операциях:

web/frontend/src/views/TaskDetail.vue:
- Line 46: localStorage.getItem сравнение
- Line 53: localStorage.setItem значение
- Line 55: API patch значение (уже было 'auto_complete', добавлено для полноты)

web/frontend/src/views/ProjectView.vue:
- Line 171: execution_mode === 'auto' → 'auto_complete'
- Line 173: localStorage.getItem сравнение
- Line 179: localStorage.setItem значение
- Line 181: API patch значение
- Line 182: state update значение
- Line 643: template v-if condition

web/frontend/src/__tests__/filter-persistence.test.ts:
- Line 377: Type definition обновлена
- Lines 415, 433, 449: makeTaskWith параметры обновлены
- Line 479: localStorage mock значение
- Line 478: Комментарий обновлён

Все 37 тестов в filter-persistence.test.ts пройдены.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-16 10:14:24 +02:00
Gros Frumos
ff69d24acc kin: KIN-UI-002 Исправить падающие тесты миграции (регрессия KIN-ARCH-003) в core/db.py 2026-03-16 10:04:01 +02:00
Gros Frumos
4188384f1b kin: KIN-059 Workflow new_project с выбором команды. При создании нового проекта через GUI или CLI директор описывает проект свободным текстом и выбирает галочками какие этапы research нужны: ☐ Business analyst (бизнес-модель, аудитория, монетизация) ☐ Market researcher (конкуренты, ниша, отзывы, сильные/слабые стороны) ☐ Legal researcher (юрисдикция, лицензии, KYC/AML, GDPR) ☐ Tech researcher (API, ограничения, стоимость, альтернативы) ☐ UX designer (анализ UX конкурентов, user journey, wireframes) ☐ Marketer (стратегия продвижения, SEO, conversion-паттерны) ☐ Architect (blueprint на основе одобренных research'ей) — всегда последний Architect включается автоматически если выбран хотя бы один researcher. Каждый выбранный этап — отдельная задача на review. Директор одобряет, отклоняет, или просит доисследовать (Revise). Следующий этап только после approve предыдущего. GUI: форма 'New Project' с описанием + чекбоксы ролей + кнопка 'Start Research'. CLI: kin new-project 'описание' --roles 'business,market,tech,architect' 2026-03-16 09:30:00 +02:00
Gros Frumos
d9172fc17c kin: KIN-016 Агенты должны уметь говорить 'не могу'. Если агент не может выполнить задачу (нет доступа, не понимает, выходит за компетенцию) — он должен вернуть status: blocked с причиной, а не пытаться угадывать. PM при получении blocked от агента — эскалирует к человеку через GUI (уведомление) и Telegram (когда будет). 2026-03-16 09:13:34 +02:00
Gros Frumos
d627c1ba77 kin: KIN-FIX-001 Исправить ImportError '_next_task_id' в test_followup.py 2026-03-16 08:40:19 +02:00
Gros Frumos
993362341b kin: KIN-067 При попытке сохранить настройки и синхронизироваться с обсидианом через настройки ошибка 'Sync error: Error: 400 Bad Request'. Разобраться с проблемой. Синхронизация работает в обе стороны. 2026-03-16 08:38:49 +02:00
Gros Frumos
81f974e6d3 kin: KIN-OBS-009 Task ID по категориям: PROJ-CAT-NUM (VDOL-SEC-001, VDOL-UI-003, VDOL-API-002, VDOL-INFRA-001, VDOL-BIZ-001). PM назначает категорию при создании задачи. 2026-03-16 08:34:30 +02:00
Gros Frumos
a0b0976d8d kin: KIN-021 Аудит-лог для --dangerously-skip-permissions в auto mode 2026-03-16 07:13:32 +02:00
Gros Frumos
67071c757d kin: KIN-064 Починить флакующий тест test_build_claude_env_no_duplicate_paths 2026-03-16 07:06:53 +02:00
Gros Frumos
756f9e65ab kin: KIN-054 Исправить race condition в loadMode() при инициализации ProjectView 2026-03-16 07:06:34 +02:00
Gros Frumos
8a6f280cbd day 1: Kin from zero to production - agents, GUI, autopilot, 352 tests 2026-03-15 23:22:49 +02:00
Gros Frumos
4a27bf0693 feat(KIN-012): UI auto/review mode toggle, autopilot indicator, persist project mode in DB
- TaskDetail: hide Approve/Reject buttons in auto mode, show "Автопилот активен" badge
- TaskDetail: execution_mode persisted per-task via PATCH /api/tasks/{id}
- TaskDetail: loadMode reads DB value, falls back to localStorage per project
- TaskDetail: back navigation preserves status filter via ?back_status query param
- ProjectView: toggleMode now persists to DB via PATCH /api/projects/{id}
- ProjectView: loadMode reads project.execution_mode from DB first
- ProjectView: task list shows 🔓 badge for auto-mode tasks
- ProjectView: status filter synced to URL query param ?status=
- api.ts: add patchProject(), execution_mode field on Project interface
- core/db.py, core/models.py: execution_mode columns + migration for projects & tasks
- web/api.py: PATCH /api/projects/{id} and PATCH /api/tasks/{id} support execution_mode
- tests: 256 tests pass, new test_auto_mode.py with 60+ auto mode tests
- frontend: vitest config added for component tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:02:01 +02:00
Gros Frumos
bf38532f59 Add cancelled status for tasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 18:22:17 +02:00
Gros Frumos
96509dcafc Add backlog audit and task update command
- agents/prompts/backlog_audit.md: QA analyst prompt for checking
  which pending tasks are already implemented in the codebase
- agents/runner.py: run_audit() — project-level agent that reads
  all pending tasks, inspects code, returns classification
- cli/main.py: kin audit <project_id> — runs audit, offers to mark
  done tasks; kin task update <id> --status --priority
- web/api.py: POST /api/projects/{id}/audit (runs audit inline),
  POST /api/projects/{id}/audit/apply (batch mark as done)
- Frontend: "Audit backlog" button on ProjectView with results
  modal showing already_done/still_pending/unclear categories

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 17:44:16 +02:00
Gros Frumos
e755a19633 Add Auto/Review mode toggle and non-interactive runner
- GUI: Auto/Review toggle on TaskDetail and ProjectView
  persisted per-project in localStorage
- Runner: noninteractive param (stdin=DEVNULL, 300s timeout)
  activated by KIN_NONINTERACTIVE=1 env or param
- CLI: --allow-write flag for kin run command
- API: POST /run accepts {allow_write: bool}, sets
  KIN_NONINTERACTIVE=1 and stdin=DEVNULL for subprocess
- Fixes pipeline hanging on interactive claude input (VDOL-002)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 17:35:08 +02:00
Gros Frumos
03961500e6 Use relative API paths for Tailscale access
Replaced hardcoded http://localhost:8420/api with /api so the
frontend works from any host (Tailscale, LAN, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 17:13:37 +02:00
johnfrum1234
db1729730f Full pipeline flow through web interface with live updates
API:
  POST /api/tasks/{id}/run — sets task to in_progress immediately,
    launches subprocess with error handling and logging.
  GET /api/tasks/{id}/running — checks pipelines table for active run.
  Fixed --db flag position in subprocess command.

TaskDetail (live pipeline):
  - Run button starts pipeline, auto-starts 3s polling
  - Pipeline cards update in real-time as agent_logs appear
  - Pulsing blue dot on header while in_progress
  - Spinner on run button during execution
  - Auto-stops polling when status changes from in_progress
  - Cleanup on component unmount (no leaked timers)

ProjectView (run from list):
  - [>] button on each pending task row
  - Confirm dialog before starting
  - Pulsing blue dot for in_progress tasks
  - Click task row → /task/:id with live view

Dashboard (live statuses):
  - Pulsing blue dot next to active task count
  - Auto-poll every 5s when any project has active tasks
  - Stops polling when no active tasks

5 new API tests (running endpoint, run sets status, not found).
141 tests total, all passing. Frontend builds clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 15:29:05 +02:00
johnfrum1234
9264415776 Add follow-up task generation on approve
When approving a task, PM agent analyzes pipeline output and creates
follow-up tasks automatically (e.g. security audit → 8 fix tasks).

core/followup.py:
  generate_followups() — collects pipeline output, runs followup agent,
  parses JSON task list, creates tasks with parent_task_id linkage.
  Handles: bare arrays, {tasks:[...]} wrappers, invalid JSON, empty.

agents/prompts/followup.md — PM prompt for analyzing results and
  creating actionable follow-up tasks with priority from severity.

CLI: kin approve <task_id> [--followup] [--decision "text"]
API: POST /api/tasks/{id}/approve {create_followups: true}
  Returns {status, decision, followup_tasks: [...]}

Frontend (TaskDetail approve modal):
  - Checkbox "Create follow-up tasks" (default ON)
  - Loading state during generation
  - Results view: list of created tasks with links to /task/:id

ProjectView: tasks show "from VDOL-001" for follow-ups.

13 new tests (followup), 125 total, all passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 15:02:58 +02:00
johnfrum1234
38c252fc1b Add task detail view, pipeline visualization, approve/reject workflow
API (web/api.py) — 5 new endpoints:
  GET  /api/tasks/{id}/pipeline — agent_logs as pipeline steps
  GET  /api/tasks/{id}/full — task + steps + related decisions
  POST /api/tasks/{id}/approve — mark done, optionally add decision
  POST /api/tasks/{id}/reject — return to pending with reason
  POST /api/tasks/{id}/run — launch pipeline in background (202)

Frontend:
  TaskDetail (/task/:id) — full task page with:
    - Pipeline graph: role cards with icons, arrows, status colors
    - Click step → expand output (pre-formatted, JSON detected)
    - Action bar: Approve (with optional decision), Reject, Run Pipeline
    - Polling for live pipeline updates
  Dashboard: review_tasks badge ("awaiting review" in yellow)
  ProjectView: task rows are now clickable links to /task/:id

Runner: output_summary no longer truncated (full output for GUI).
Models: get_project_summary includes review_tasks count.

13 new API tests, 105 total, all passing. Frontend builds clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 14:32:29 +02:00
johnfrum1234
86e5b8febf Add web GUI: FastAPI API + Vue 3 frontend with dark theme
API (web/api.py):
  GET  /api/projects, /api/projects/{id}, /api/tasks/{id}
  GET  /api/decisions?project=X, /api/cost?days=7, /api/support/tickets
  POST /api/projects, /api/tasks, /api/decisions, /api/bootstrap
  CORS for localhost:5173, all queries via models.py

Frontend (web/frontend/):
  Vue 3 + TypeScript + Vite + Tailwind CSS v3
  Dashboard: project cards with task counters, cost, status badges
  ProjectView: tabs for Tasks/Decisions/Modules with filters
  Modals: Add Project, Add Task, Add Decision, Bootstrap
  Dark theme, monospace font, minimal clean design

Startup:
  API:  cd web && uvicorn api:app --reload --port 8420
  Web:  cd web/frontend && npm install && npm run dev

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 13:50:15 +02:00