kin: KIN-072 Добавить kanban вид в таски проекта. Канбан добавлен и работает.

This commit is contained in:
Gros Frumos 2026-03-16 09:58:51 +02:00
parent 5970118d12
commit 389b266bee
3 changed files with 10 additions and 2 deletions

View file

@ -7,6 +7,7 @@ Your job: decompose a task into a pipeline of specialist steps.
You receive:
- PROJECT: id, name, tech stack, project_type (development | operations | research)
- TASK: id, title, brief
- ACCEPTANCE CRITERIA: what the task output must satisfy (if provided — use this to verify task completeness, do NOT confuse with current task status)
- DECISIONS: known issues, gotchas, workarounds for this project
- MODULES: project module map
- ACTIVE TASKS: currently in-progress tasks (avoid conflicts)
@ -29,6 +30,7 @@ You receive:
- For features: architect first (if complex), then developer, then test + review.
- Don't assign specialists who aren't needed.
- If a task is blocked or unclear, say so — don't guess.
- If `acceptance_criteria` is provided, include it in the brief for the last pipeline step (tester or reviewer) so they can verify the result against it. Do NOT use acceptance_criteria to describe current task state.
## Project type routing

View file

@ -7,6 +7,7 @@ Your job: write or update tests that verify the implementation is correct and re
You receive:
- PROJECT: id, name, path, tech stack
- TASK: id, title, brief describing what was implemented
- ACCEPTANCE CRITERIA: what the task output must satisfy (if provided — verify tests cover these criteria explicitly)
- PREVIOUS STEP OUTPUT: dev agent output describing what was changed (required)
## Your responsibilities

View file

@ -501,6 +501,7 @@ class TaskCreate(BaseModel):
priority: int = 5
route_type: str | None = None
category: str | None = None
acceptance_criteria: str | None = None
@app.post("/api/tasks")
@ -519,7 +520,8 @@ def create_task(body: TaskCreate):
task_id = models.next_task_id(conn, body.project_id, category=category)
brief = {"route_type": body.route_type} if body.route_type else None
t = models.create_task(conn, task_id, body.project_id, body.title,
priority=body.priority, brief=brief, category=category)
priority=body.priority, brief=brief, category=category,
acceptance_criteria=body.acceptance_criteria)
conn.close()
return t
@ -534,6 +536,7 @@ class TaskPatch(BaseModel):
route_type: str | None = None
title: str | None = None
brief_text: str | None = None
acceptance_criteria: str | None = None
VALID_STATUSES = set(models.VALID_TASK_STATUSES)
@ -552,7 +555,7 @@ def patch_task(task_id: str, body: TaskPatch):
raise HTTPException(400, f"Invalid route_type '{body.route_type}'. Must be one of: {', '.join(sorted(VALID_ROUTE_TYPES))} or empty string to clear")
if body.title is not None and not body.title.strip():
raise HTTPException(400, "title must not be empty")
all_none = all(v is None for v in [body.status, body.execution_mode, body.priority, body.route_type, body.title, body.brief_text])
all_none = all(v is None for v in [body.status, body.execution_mode, body.priority, body.route_type, body.title, body.brief_text, body.acceptance_criteria])
if all_none:
raise HTTPException(400, "Nothing to update.")
conn = get_conn()
@ -581,6 +584,8 @@ def patch_task(task_id: str, body: TaskPatch):
if body.brief_text is not None:
current_brief = {**current_brief, "text": body.brief_text}
fields["brief"] = current_brief if current_brief else None
if body.acceptance_criteria is not None:
fields["acceptance_criteria"] = body.acceptance_criteria
models.update_task(conn, task_id, **fields)
t = models.get_task(conn, task_id)
conn.close()