Commit graph

52 commits

Author SHA1 Message Date
Gros Frumos
646d40366f kin: KIN-ARCH-023-backend_dev 2026-03-18 22:28:00 +02:00
Gros Frumos
2be94f0c68 kin: KIN-ARCH-023-debugger 2026-03-18 22:27:06 +02:00
Gros Frumos
11314a8c37 kin: KIN-128-backend_dev 2026-03-18 22:11:14 +02:00
Gros Frumos
57c08db964 kin: KIN-UI-019-backend_dev 2026-03-18 21:46:06 +02:00
Gros Frumos
d552b8bd45 kin: auto-commit after pipeline 2026-03-18 21:02:34 +02:00
Gros Frumos
b431d9358a kin: KIN-127-backend_dev 2026-03-18 20:55:35 +02:00
Gros Frumos
34c57bef86 kin: KIN-UI-015-backend_dev 2026-03-18 15:45:43 +02:00
Gros Frumos
d53c4096fd kin: auto-commit after pipeline 2026-03-17 21:25:12 +02:00
Gros Frumos
35d258935a KIN-103: Добавить поддержку worktrees_enabled в PATCH /api/projects/{project_id}
- Добавлено поле worktrees_enabled: bool | None = None в класс ProjectPatch
- Добавлена проверка в has_any для обнаружения изменений
- Добавлена обработка поля при преобразовании в целое число для БД

DB schema и runner уже содержат поддержку worktrees_enabled.
GET /api/projects/{id} возвращает поле автоматически через SELECT *.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-17 20:18:51 +02:00
Gros Frumos
0e522e54a9 kin: auto-commit after pipeline 2026-03-17 19:30:15 +02:00
Gros Frumos
e88387453a kin: KIN-OBS-023 Согласовать поведение /api/pipelines/{id}/logs для несуществующего pipeline 2026-03-17 18:33:03 +02:00
Gros Frumos
c30a4c0fc4 kin: KIN-INFRA-007 Рефакторинг: убрать дублирование VALID_RUNTIMES и перенести import'ы из функции 2026-03-17 18:30:26 +02:00
Gros Frumos
e63703ad33 kin: auto-commit after pipeline 2026-03-17 18:29:43 +02:00
Gros Frumos
3d9b5766ab kin: auto-commit after pipeline 2026-03-17 18:29:32 +02:00
Gros Frumos
a4e5497401 kin: KIN-OBS-021 Вынести raw SQL из cli/watch.py в core/models.py 2026-03-17 18:23:48 +02:00
Gros Frumos
eab9e951ab kin: auto-commit after pipeline 2026-03-17 17:26:31 +02:00
Gros Frumos
8fa2cc266c kin: auto-commit after pipeline 2026-03-17 16:36:52 +02:00
Gros Frumos
18160de45e kin: auto-commit after pipeline 2026-03-17 15:59:43 +02:00
Gros Frumos
6c2da26b6c kin: auto-commit after pipeline 2026-03-17 15:40:31 +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
1bf0125991 kin: KIN-095 При добавлении в среды серверов вылетает ошибка 500 Internal Server Error в модалке 2026-03-16 20:58:44 +02:00
Gros Frumos
8ebc6f1111 kin: KIN-BIZ-007 Post-MVP: шифрование credentials в project_environments через Fernet 2026-03-16 20:55:01 +02:00
Gros Frumos
4a65d90218 kin: KIN-089 При попытке добавить креды прод сервера для проекта corelock вылетает 500 Internal Server Error 2026-03-16 20:39:17 +02:00
Gros Frumos
bd9fbfbbcb kin: KIN-UI-007 Scroll to bottom при получении новых сообщений через polling 2026-03-16 19:41:38 +02:00
Gros Frumos
98d62266ba kin: KIN-BIZ-005 Убрать дублирование UI сред: SettingsView vs ProjectView 2026-03-16 19:27:55 +02:00
Gros Frumos
a58578bb9d kin: KIN-BIZ-006 Проверить промпт sysadmin.md на поддержку сценария env_scan 2026-03-16 19:26:51 +02:00
Gros Frumos
531275e4ce kin: KIN-UI-003 Консистентная обработка ошибок в del() — использовать throwApiError 2026-03-16 17:44:49 +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
389b266bee kin: KIN-072 Добавить kanban вид в таски проекта. Канбан добавлен и работает. 2026-03-16 09:58:51 +02:00
Gros Frumos
39acc9cc4b kin: KIN-BIZ-002 Исправить консистентность: approve через /tasks/{id}/approve не продвигает phase state machine 2026-03-16 09:47:56 +02:00
Gros Frumos
af554e15fa kin: KIN-ARCH-004 Добавить подсказку в форму о требовании ~/.ssh/config для ProxyJump 2026-03-16 09:43:26 +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
d50bd703ae kin: KIN-049 Кнопка Deploy на странице задачи после approve. Для каждого проекта настраивается deploy-команда (git push, scp, ssh restart). В Settings проекта. 2026-03-16 08:21:13 +02:00
Gros Frumos
77ed68c2b5 kin: KIN-020 UI для manual_task эскалации из auto_resolve_pending_actions 2026-03-16 07:14:32 +02:00
Gros Frumos
a0b0976d8d kin: KIN-021 Аудит-лог для --dangerously-skip-permissions в auto mode 2026-03-16 07:13:32 +02:00
Gros Frumos
756f9e65ab kin: KIN-054 Исправить race condition в loadMode() при инициализации ProjectView 2026-03-16 07:06:34 +02:00
Gros Frumos
ae21e48b65 kin: KIN-048 Post-pipeline hook: автокоммит после успешного завершения задачи. git add -A && git commit -m 'kin: TASK_ID TITLE'. Срабатывает автоматически как rebuild-frontend. 2026-03-16 06:59:46 +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
6e872121eb feat: status dropdown on task detail page 2026-03-15 18:17:57 +02:00
Gros Frumos
9cbb3cec37 Fix audit hanging: add auto_apply param + allow_write for tool access
Root cause: claude agent without --dangerously-skip-permissions
hangs on tool permission prompts when stdin=DEVNULL.

Fixes:
- run_audit() now passes allow_write=True so agent can use
  Read/Bash tools without interactive permission prompts
- Added auto_apply param: False for API (result only),
  CLI confirms with user then applies manually
- API explicitly passes auto_apply=False
- Tests for auto_apply=True/False behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 18:00:39 +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
3ef00bced1 Add SPA static serving and open CORS for Tailscale access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 17:11:38 +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
ab693d3c4d Add permission-aware follow-up flow with interactive resolution
When follow-up agent detects permission-blocked items ("ручное
применение", "permission denied", etc.), they become pending_actions
instead of auto-created tasks. User chooses per item:
  1. Rerun with --dangerously-skip-permissions
  2. Create manual task
  3. Skip

core/followup.py:
  _is_permission_blocked() — regex detection of 9 permission patterns
  generate_followups() returns {created, pending_actions}
  resolve_pending_action() — handles rerun/manual_task/skip

agents/runner.py:
  _run_claude(allow_write=True) adds --dangerously-skip-permissions
  run_agent/run_pipeline pass allow_write through

CLI: kin approve --followup — interactive 1/2/3 prompt per blocked item
API: POST /approve returns {needs_decision, pending_actions}
     POST /resolve resolves individual actions
Frontend: pending actions shown as cards with 3 buttons in approve modal

136 tests, all passing. Frontend builds clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 15:16:48 +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
f7830d484c Let pipeline subprocess stderr flow to uvicorn terminal
Removed stderr=subprocess.DEVNULL from POST /api/tasks/{id}/run
so errors from background kin run are visible in the API server log.

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