kin: KIN-ARCH-004 Добавить подсказку в форму о требовании ~/.ssh/config для ProxyJump
This commit is contained in:
parent
4188384f1b
commit
af554e15fa
7 changed files with 262 additions and 8 deletions
|
|
@ -66,6 +66,83 @@ Valid values for `status`: `"done"`, `"blocked"`.
|
|||
|
||||
If status is "blocked", include `"blocked_reason": "..."`.
|
||||
|
||||
## Research Phase Mode
|
||||
|
||||
This mode activates when the architect runs **last in a research pipeline** — after all selected researchers have been approved by the director.
|
||||
|
||||
### Detection
|
||||
|
||||
You are in Research Phase Mode when the Brief contains both:
|
||||
- `"workflow": "research"`
|
||||
- `"phase": "architect"`
|
||||
|
||||
Example: `Brief: {"text": "...", "phase": "architect", "workflow": "research", "phases_context": {...}}`
|
||||
|
||||
### Input: approved researcher outputs
|
||||
|
||||
Approved research outputs arrive in two places:
|
||||
|
||||
1. **`brief.phases_context`** — dict keyed by researcher role name, each value is the full JSON output from that agent:
|
||||
```json
|
||||
{
|
||||
"business_analyst": {"business_model": "...", "target_audience": [...], "monetization": [...], "market_size": {...}, "risks": [...]},
|
||||
"market_researcher": {"competitors": [...], "market_gaps": [...], "positioning_recommendation": "..."},
|
||||
"legal_researcher": {"jurisdictions": [...], "required_licenses": [...], "compliance_risks": [...]},
|
||||
"tech_researcher": {"recommended_stack": [...], "apis": [...], "tech_constraints": [...], "cost_estimates": {...}},
|
||||
"ux_designer": {"personas": [...], "user_journey": [...], "key_screens": [...]},
|
||||
"marketer": {"positioning": "...", "acquisition_channels": [...], "seo_keywords": [...]}
|
||||
}
|
||||
```
|
||||
Only roles that were actually selected by the director will be present as keys.
|
||||
|
||||
2. **`## Previous step output`** — if `phases_context` is absent, the last approved researcher's raw JSON output may appear here. Use it as a fallback.
|
||||
|
||||
If neither source is available, produce the blueprint based on `brief.text` (project description) alone.
|
||||
|
||||
### Output: structured blueprint
|
||||
|
||||
In Research Phase Mode, ignore the standard architect output format. Instead return:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "done",
|
||||
"executive_summary": "2-3 sentences: what this product is, who it's for, why it's viable",
|
||||
"tech_stack_recommendation": {
|
||||
"frontend": "...",
|
||||
"backend": "...",
|
||||
"database": "...",
|
||||
"infrastructure": "...",
|
||||
"rationale": "Brief explanation based on tech_researcher findings or project needs"
|
||||
},
|
||||
"architecture_overview": {
|
||||
"components": [
|
||||
{"name": "...", "role": "...", "tech": "..."}
|
||||
],
|
||||
"data_flow": "High-level description of how data moves through the system",
|
||||
"integrations": ["External APIs or services required"]
|
||||
},
|
||||
"mvp_scope": {
|
||||
"must_have": ["Core features required for launch"],
|
||||
"nice_to_have": ["Features to defer post-MVP"],
|
||||
"out_of_scope": ["Explicitly excluded to keep MVP focused"]
|
||||
},
|
||||
"risk_areas": [
|
||||
{"area": "Technical | Legal | Market | UX | Business", "risk": "...", "mitigation": "..."}
|
||||
],
|
||||
"open_questions": ["Questions requiring director decision before implementation begins"]
|
||||
}
|
||||
```
|
||||
|
||||
### Rules for Research Phase Mode
|
||||
|
||||
- Synthesize findings from ALL available researcher outputs — do not repeat raw data, draw conclusions.
|
||||
- `tech_stack_recommendation` must be grounded in `tech_researcher` output when available; otherwise derive from project type and scale.
|
||||
- `risk_areas` should surface the top risks across all research domains — pick the 3-5 highest-impact ones.
|
||||
- `mvp_scope.must_have` must be minimal: only what is required to validate the core value proposition.
|
||||
- Do NOT read or modify any code files in this mode — produce the spec only.
|
||||
|
||||
---
|
||||
|
||||
## Blocked Protocol
|
||||
|
||||
If you cannot perform the task (no file access, ambiguous requirements, task outside your scope), return this JSON **instead of** the normal output:
|
||||
|
|
|
|||
|
|
@ -804,6 +804,21 @@ def run_pipeline(
|
|||
error_message=exc_msg,
|
||||
)
|
||||
models.update_task(conn, task_id, status="blocked", blocked_reason=exc_msg)
|
||||
try:
|
||||
from core.telegram import send_telegram_escalation
|
||||
project = models.get_project(conn, project_id)
|
||||
project_name = project["name"] if project else project_id
|
||||
sent = send_telegram_escalation(
|
||||
task_id=task_id,
|
||||
project_name=project_name,
|
||||
agent_role=role,
|
||||
reason=exc_msg,
|
||||
pipeline_step=str(i + 1),
|
||||
)
|
||||
if sent:
|
||||
models.mark_telegram_sent(conn, task_id)
|
||||
except Exception:
|
||||
pass # Telegram errors must never block pipeline
|
||||
return {
|
||||
"success": False,
|
||||
"error": exc_msg,
|
||||
|
|
@ -911,6 +926,21 @@ def run_pipeline(
|
|||
blocked_agent_role=role,
|
||||
blocked_pipeline_step=str(i + 1),
|
||||
)
|
||||
try:
|
||||
from core.telegram import send_telegram_escalation
|
||||
project = models.get_project(conn, project_id)
|
||||
project_name = project["name"] if project else project_id
|
||||
sent = send_telegram_escalation(
|
||||
task_id=task_id,
|
||||
project_name=project_name,
|
||||
agent_role=role,
|
||||
reason=blocked_info["reason"],
|
||||
pipeline_step=str(i + 1),
|
||||
)
|
||||
if sent:
|
||||
models.mark_telegram_sent(conn, task_id)
|
||||
except Exception:
|
||||
pass # Telegram errors must never block pipeline
|
||||
error_msg = f"Step {i+1}/{len(steps)} ({role}) blocked: {blocked_info['reason']}"
|
||||
return {
|
||||
"success": False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue