diff --git a/agent-roadmap/ROADMAP.md b/agent-roadmap/ROADMAP.md index c444daf..a08aa6a 100644 --- a/agent-roadmap/ROADMAP.md +++ b/agent-roadmap/ROADMAP.md @@ -79,7 +79,7 @@ Phase는 실행 순서가 아니라 도메인/책임 영역의 구조적 지도 - [계획] 지식과 도구 최적화 확장 - 경로: [PHASE.md](phase/knowledge-tool-optimization-extension/PHASE.md) - - 요약: 단계 호출, tool/schema 강제, 검증/retry/fallback의 MVP 실행 모드를 먼저 스케치하고, caller-neutral 누적 요청 컨텍스트 최적화, RAG 장기 기억, Advisor와 Context Hook은 서로 책임이 다른 2차 기능으로 분리한다. + - 요약: 단계 호출, tool/schema 강제, 검증/retry/fallback의 MVP 실행 모드와 Gemini 3.6 Flash·RTX 5090 `ornith-fast`를 조합하는 독립 IOP Hot Path를 스케치하고, caller-neutral 누적 요청 컨텍스트 최적화, RAG 장기 기억, Advisor와 Context Hook은 서로 책임이 다른 2차 기능으로 분리한다. - [스케치] Personal Edge 패키징과 배포 프로파일 - 경로: [PHASE.md](phase/personal-edge-packaging-deployment/PHASE.md) diff --git a/agent-roadmap/phase/automation-runtime-bridge/PHASE.md b/agent-roadmap/phase/automation-runtime-bridge/PHASE.md index 4acf8e5..d3eb4b6 100644 --- a/agent-roadmap/phase/automation-runtime-bridge/PHASE.md +++ b/agent-roadmap/phase/automation-runtime-bridge/PHASE.md @@ -142,6 +142,7 @@ Phase를 가로지르는 실제 다음 작업 선택은 [전역 마일스톤 실 - NomadCode 지원을 위한 `metadata.workspace` 실행 계약은 provider 확장, Lemonade 추가, remote terminal bridge보다 먼저 닫는다. - Agent Task runtime은 사용자 workspace의 Milestone/Plan/Review/work-log 파일을 durable source of truth로 사용한다. repo-global 설정은 비밀정보 없는 공통 기본값·정책 템플릿을 버전 관리하고 runtime은 읽기만 하며, user-local store는 장비별 project registry·override·경로와 최소 checkpoint/lease/client process 상태를 소유한다. - 에이전트 작업 루프 오케스트레이션은 사용자가 agent-ops 스킬을 직접 실행하지 않은 일반 요청을 direct, Plan, Milestone으로 분류하고, Plan/Milestone이면 사용자 agent의 tool call로 작업 파일을 만들고 그 파일 상태를 연결하는 상위 IOP 기능으로 별도 소유한다. +- 외부 `model=iop`으로 명시 선택되는 [IOP Hot Path One-shot 실행 경로](../knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md)는 Gemini 3.6 Flash와 `ornith-fast`를 한 요청 안에서 조합하는 독립 경로다. 작업 루프 오케스트레이션의 direct/Plan/Milestone 분류, durable artifact, continuation과 완료 상태를 거치거나 공유하지 않는다. - 공통 Agent Task runtime은 위 오케스트레이션과 Node/`iop-agent` host가 공통으로 소비하는 provider 실행·선택·관측·복구 기반이며, 최초 요청 분류와 작업 파일 생성의 의미를 대체하지 않는다. - Python dispatcher/selector는 스킬 기반 1차 테스트를 거쳐 안정화된 동작·정책·오류 evidence의 참조로만 사용하며 production runtime에서 실행하거나 가져오지 않는다. Go parity와 cutover evidence를 확보한 뒤 IOP Agent CLI Runtime Milestone 완료 전환 시 Python 구현을 폐기한다. - provider 실행, quota/status, stream/session, failure와 AgentTaskManager는 공통 Go package가 단일 구현으로 소유한다. Node와 `iop-agent` host에 이를 복사하거나 중복 선언하지 않는다. Flutter와 Unity는 후속 client이며 이 실행 로직을 소유하지 않는다. diff --git a/agent-roadmap/phase/automation-runtime-bridge/milestones/agent-workflow-loop-orchestration-mvp.md b/agent-roadmap/phase/automation-runtime-bridge/milestones/agent-workflow-loop-orchestration-mvp.md index 9897a8c..b25a395 100644 --- a/agent-roadmap/phase/automation-runtime-bridge/milestones/agent-workflow-loop-orchestration-mvp.md +++ b/agent-roadmap/phase/automation-runtime-bridge/milestones/agent-workflow-loop-orchestration-mvp.md @@ -9,6 +9,7 @@ 사용자는 일반적인 바이브코딩처럼 한 번 요청하고, IOP는 코딩·저장소 조회·일반 질의를 direct, Plan, Milestone 단위로 분류해 필요한 작업 파일 생성, 실행 모델 라우팅, 상위 모델 리뷰, 후속 작업 연결을 자동으로 반복하는 방향을 스케치한다. MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, 지원 대상을 좁힌 agent-family protocol과 event-aware passthrough를 이용해 한 사이클이 완료될 때까지 이어지는 구조를 검증한다. 최초 요청 판정은 교체 가능한 독립 라우팅 모듈로 분리하고 초기에는 상위 cloud 모델을 사용하되, 구체적인 판단 계약과 구현 방식은 이 Milestone을 계획으로 승격할 때 재설계한다. +외부 `model=iop`으로 명시 선택되는 [IOP Hot Path One-shot 실행 경로](../../knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md)는 이 라우터를 거치거나 작업 루프로 승격되지 않는 별도 제품 경로다. ## 상태 @@ -22,7 +23,7 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, - [ ] terminal event 대체와 합성 tool call을 포함한 event-aware passthrough의 protocol별 동작과 실패 경계를 정한다. - [ ] Plan/Milestone 작업의 실행 모델 라우팅, 상위 모델 리뷰, 보완 반복의 횟수·비용·중단 기준을 정한다. - [ ] 최초 요청 라우터와 orchestration, agent-family codec, provider dispatch의 책임 경계를 정하고 라우팅 결과의 최소 의미 계약을 결정한다. -- [ ] direct 요청에서 local 실행 가능 시 저비용 local target을 우선하고, cloud 간 위임에서는 추가 hop의 비용·지연과 절감 효과를 비교하는 기준을 결정한다. +- [ ] direct가 작업 파일 없이 현재 호출에서 종료되는 경계와 Plan/Milestone 작업으로 전환되는 경계를 정하고, 별도 `model=iop` Hot Path 요청은 분류 대상에서 제외한다. - [ ] MVP 한 사이클과 후속 재개/복구 Milestone의 범위를 분리한다. - [ ] API/stream/tool/lifecycle 계약 구현으로 승격할 때 SDD와 후속 구현 Milestone 구성을 확정한다. @@ -38,7 +39,7 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, - 결정 필요: 아래 체크리스트 - [ ] MVP에서 우선 지원할 agent family 조합과 protocol capability 기준을 결정한다. - [ ] 사용자에게 그대로 노출할 중간 stream과 IOP가 교체할 terminal tail의 경계를 결정한다. - - [ ] direct 요청에서 local capability가 충족되면 local target을 우선하고, local 실행이 불가능한 경우 상위 cloud 모델의 같은 호출 응답과 저비용 cloud target 위임을 나누는 조건을 결정한다. + - [ ] direct 요청의 현재 호출 종료 조건과 Plan/Milestone 전환 조건을 결정하고, 별도 `model=iop` Hot Path 진입을 이 라우터가 재분류하지 않는 경계를 결정한다. - [ ] 라우팅 모듈이 반환할 분류, lane, grade, capability, confidence/abstain 의미와 invalid/low-confidence fallback 경계를 결정한다. - [ ] 자동 리뷰·보완 반복의 최대 횟수, 비용 예산, 사용자 중단 조건을 결정한다. - [ ] 완료 알림과 실패·부분 완료 상태를 사용자에게 표현하는 최소 UX를 결정한다. @@ -46,11 +47,11 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, ## 범위 - orchestration, agent-family codec, provider dispatch와 분리된 교체 가능한 진입 라우팅 모듈의 컨셉. 초기 구현은 성능이 좋은 cloud 모델을 사용하되 구체 계약과 내부 설계는 계획 승격 시 재검토한다. -- 최초 요청을 direct, Plan, Milestone으로 분류하고, 동시에 local/cloud lane, G0X grade, 필요한 capability와 위임 여부를 판정하는 방향 -- 작은 direct 작업은 Milestone/Plan 생성 없이 실행하되 local 모델이 처리 가능하면 저비용 local target으로 보내고, cloud 간 위임은 추가 hop의 비용·지연보다 절감 이득이 있을 때 선택하는 fast path +- 최초 요청을 direct, Plan, Milestone으로 분류하고, Plan/Milestone 작업에는 local/cloud lane, G0X grade, 필요한 capability와 위임 여부를 판정하는 방향 +- direct 요청은 Milestone/Plan 생성 없이 현재 호출의 선택된 응답으로 종료하며, Gemini와 `ornith-fast`를 조합하는 `model=iop` Hot Path의 등급·micro-plan·review/correction을 소유하지 않는 경계 - 코딩 작업뿐 아니라 저장소 단순 조회, 일반 지식 응답, web/tool capability가 필요한 요청을 direct 후보로 다루는 방향 - Plan/Milestone 작업은 IOP가 사용자 로컬 경로를 포함한 지시를 주입하고, 모델 stream과 write/edit tool call을 로컬 agent에 전달해 작업 파일을 로컬 workspace에 생성하는 경로 -- [Stream Evidence Gate Core](../../knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md)의 normalized event/release contract를 소비해 확정된 선행 stream은 지연 없이 전달하고 판정이 필요한 bounded tail만 보류한 뒤, 정상 terminal event를 억제하고 로컬 파일 read tool call로 대체할 수 있는 event-aware passthrough +- [Stream Evidence Gate Core](../../../archive/phase/knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md)의 normalized event/release contract를 소비해 확정된 선행 stream은 지연 없이 전달하고 판정이 필요한 bounded tail만 보류한 뒤, 정상 terminal event를 억제하고 로컬 파일 read tool call로 대체할 수 있는 event-aware passthrough - tool result가 새 HTTP 요청으로 돌아오더라도 같은 logical workflow/session으로 이어지는 continuation 경계 - `agent-task/m-*`, 순번 task directory, `PLAN-{lane}-GNN.md`, archive 이동을 이용한 filesystem-backed 작업 상태 판독 - IOP가 보유하는 session/call id 매핑과 active provider call 같은 최소 in-flight 상태 @@ -60,13 +61,13 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, ## 기능 -### Epic: [entry-route] 요청 분류와 Fast Path +### Epic: [entry-route] 요청 분류와 Direct 종료 -사용자가 orchestration 지식을 몰라도 요청 규모와 실행 경로를 자동으로 선택하는 진입 capability를 묶는다. +사용자가 orchestration 지식을 몰라도 요청 규모에 따라 현재 호출을 종료하거나 durable 작업 경로를 선택하는 진입 capability를 묶는다. - [ ] [router-boundary] 최초 요청 라우터가 orchestration, agent-family codec, provider dispatch와 분리된 교체 가능한 모듈이며 초기 cloud 구현과 후속 local 구현이 같은 의미 계약을 사용할 수 있는 방향이 정리되어 있다. - [ ] [request-triage] 상위 cloud 라우터가 코딩·저장소 조회·일반 요청을 direct, Plan, Milestone으로 분류하고 lane, grade, 필요한 capability, confidence/abstain을 함께 판정하는 컨셉이 정리되어 있다. -- [ ] [direct-fastpath] direct는 작업 파일을 만들지 않는 실행 방식으로 정의하고, local 실행 가능 시 저비용 local target을 우선하며 cloud 간 위임은 추가 hop의 비용·지연과 절감 효과를 비교하는 방향이 정리되어 있다. +- [ ] [direct-fastpath] direct는 작업 파일을 만들지 않고 현재 호출의 선택된 응답으로 종료하는 방식으로 정의하며, 별도 `model=iop` Hot Path의 Gemini triage, micro-plan, `ornith-fast` 실행과 review/correction을 재구현하지 않는 경계가 정리되어 있다. - [ ] [route-fallback] capability·privacy·tool·schema·context 제약과 invalid/low-confidence 판정을 안전하게 처리하고 상위 cloud 라우터로 fallback할 수 있는 방향이 정리되어 있다. - [ ] [work-decompose] Plan과 Milestone 요청은 로컬 작업 파일을 기준으로 task를 순차 실행할 수 있게 분해되는 구조가 정리되어 있다. @@ -75,7 +76,7 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, 로컬 agent가 파일과 tool 실행 주체로 남으면서 IOP가 다음 작업을 연결할 수 있는 통신 경계를 묶는다. - [ ] [family-codec] 지원 agent를 stream terminal, tool call/result, continuation capability family로 묶고 공통 workflow와 분리하는 경계가 정리되어 있다. -- [ ] [terminal-hook] `workflow_terminal_hook`이 [Stream Evidence Gate Core](../../knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md)의 `Filter`/normalized event/`FilterObservation` contract를 소비해 다른 활성 filter와 동일 terminal batch에서 병렬 평가되고 replacement decision과 sanitized reason만 반환하도록 정리되어 있다. 이미 보낸 content는 보존하고 terminal이 commit되기 전에만 protocol-safe replacement를 append하며, all-complete Arbiter, response staging/commit과 dispatch를 재구현하지 않는다. +- [ ] [terminal-hook] `workflow_terminal_hook`이 [Stream Evidence Gate Core](../../../archive/phase/knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md)의 `Filter`/normalized event/`FilterObservation` contract를 소비해 다른 활성 filter와 동일 terminal batch에서 병렬 평가되고 replacement decision과 sanitized reason만 반환하도록 정리되어 있다. 이미 보낸 content는 보존하고 terminal이 commit되기 전에만 protocol-safe replacement를 append하며, all-complete Arbiter, response staging/commit과 dispatch를 재구현하지 않는다. - [ ] [workspace-state] 로컬 workspace 파일이 durable source of truth가 되고 IOP는 최소 in-flight 상태만 보유하는 책임 경계가 정리되어 있다. ### Epic: [review-loop] 라우팅·리뷰·완료 루프 @@ -106,6 +107,7 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, - 라우터 teaching, shadow/canary, offline replay, 증류·튜닝과 특정 local model에 종속된 판단 구현 - weighted scorer 세부식, 분석기 조합, 모델별 threshold와 provider별 실행 정책의 조기 확정 - 세부 API field, event schema, 파일 위치, 패키지 구조의 구현 확정 +- 외부 `model=iop`에서 Gemini 3.6 Flash와 `ornith-fast`를 조합하는 [IOP Hot Path One-shot 실행 경로](../../knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md) ## 작업 컨텍스트 @@ -114,11 +116,12 @@ MVP는 사용자 로컬 workspace를 작업 상태의 원본으로 유지하고, - 표준선(선택): 이 consumer의 stable filter id는 `workflow_terminal_hook`이며 sanitized workflow decision/replacement reason만 Core `FilterObservation`에 제공한다. terminal hook은 raw stream buffer, ingress snapshot, request rebuild, retry loop, 공개 오류 사슬 직렬화를 소유하지 않는다. 후속 recovery dispatch가 필요한 기능으로 승격하면 Core `RecoveryPlan`과 strategy/request-total cap, bounded ingress snapshot을 사용하고, 실패는 sanitized `FailureCauseChain`으로 전달해 endpoint host가 외부 오류 하나만 직렬화한다. - 표준선(선택): durable workflow 상태는 사용자 로컬 workspace 파일에 두고, IOP는 재구성 가능한 내용을 별도 workflow DB나 파일 캐시로 복제하지 않는다. - 표준선(선택): SSE 연결 하나를 양방향 세션으로 가정하지 않는다. tool result는 새 HTTP 요청으로 돌아올 수 있으며 logical workflow/session identity로 연결한다. -- 표준선(선택): direct는 상위 모델 직접 실행을 뜻하지 않는다. local capability가 충족되면 저비용 local 실행을 우선하고, cloud 간 위임만 추가 hop의 비용·지연을 비교한다. +- 표준선(선택): direct는 작업 artifact와 continuation을 만들지 않고 현재 호출의 선택된 응답으로 종료한다. `model=iop` Hot Path는 이 라우터보다 먼저 별도 route로 확정되며 direct/Plan/Milestone으로 재분류하지 않는다. - 표준선(선택): 라우팅 모듈은 계획 승격 시 재설계하며, 현재 스케치에서는 교체 가능 경계와 분류·lane·grade·capability·confidence/abstain 의미만 후보로 둔다. - 표준선(선택): 생성된 Plan의 lane/grade는 다시 추론하지 않고 실행 라우팅 입력으로 소비하며, route outcome 관측은 별도 Usage Ledger가 소비할 수 있는 접점까지만 둔다. - 표준선(선택): provider/model 선택, CLI process, stream/session, quota, failure와 cancellation은 [IOP Agent CLI Runtime](iop-agent-cli-runtime.md)의 실행 경계를 소비한다. 이 Milestone은 일반 요청 분류, IOP 소유 Plan/Milestone 작업 의미, 사용자 agent tool call 주입과 workflow 단계 연결을 소유한다. +- 표준선(선택): [IOP Hot Path One-shot 실행 경로](../../knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md)와는 provider 호출·관측 같은 하위 capability만 공유할 수 있으며, Hot Path의 등급, micro-plan, 단일 review/correction과 terminal 결과는 이 작업 루프의 상태·artifact·review 의미에 포함하지 않는다. - 큐 배치: [IOP Agent CLI Runtime](iop-agent-cli-runtime.md) 뒤, [Provider 사용량 알림과 운영 표면](provider-usage-notification-operations-surface.md) 앞 -- 선행 작업: [IOP Agent CLI Runtime](iop-agent-cli-runtime.md), [CLI Agent Group Grade Routing](cli-agent-group-grade-routing.md), [Stream Evidence Gate Core](../../knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md), [OpenAI-compatible 출력 검증 필터](../../knowledge-tool-optimization-extension/milestones/openai-compatible-output-validation-filters.md) +- 선행 작업: [IOP Agent CLI Runtime](iop-agent-cli-runtime.md), [CLI Agent Group Grade Routing](cli-agent-group-grade-routing.md), [Stream Evidence Gate Core](../../../archive/phase/knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md), [OpenAI-compatible 출력 검증 필터](../../knowledge-tool-optimization-extension/milestones/openai-compatible-output-validation-filters.md) - 후속 작업: 중단 후 재개와 filesystem 정합성 복구, agent family 확대, 운영 관측과 비용 예산 정책 - 확인 필요: `구현 잠금 > 결정 필요`와 승격 조건 diff --git a/agent-roadmap/phase/knowledge-tool-optimization-extension/PHASE.md b/agent-roadmap/phase/knowledge-tool-optimization-extension/PHASE.md index 8339327..f96874a 100644 --- a/agent-roadmap/phase/knowledge-tool-optimization-extension/PHASE.md +++ b/agent-roadmap/phase/knowledge-tool-optimization-extension/PHASE.md @@ -8,6 +8,7 @@ Ollama serving 경로와 운영 기반이 안정화된 뒤, 단계 호출, tool/schema 강제, output validation, retry/fallback과 누적 요청 컨텍스트 구성을 IOP의 추론 최적화 계층으로 확장한다. 1차 MVP는 planner/generator/verifier 같은 단계 호출과 runtime schema 검증의 최소 실행 모드를 스케치하는 데 집중하고, caller-neutral 누적 요청 컨텍스트 최적화, RAG 장기 기억, advisor와 Context Hook은 서로 다른 2차 기능으로 분리한다. +별도 IOP Hot Path는 OpenAI-compatible `model=iop` 한 번의 요청 안에서 빠른 cloud `Gemini 3.6 Flash`와 RTX 5090 local target `ornith-fast`를 조합해 최대 속도와 실사용 품질 하한의 균형을 맞추며, durable 작업 루프와 독립된 one-shot 제품 경로로 둔다. 이 Phase는 특정 Agent Shell에 종속되지 않고 OpenAI-compatible, A2A, IOP native protocol 중 맞는 표면에서 공통 최적화 책임을 제공하는 방향을 다룬다. ## Milestone 흐름 @@ -53,6 +54,10 @@ Phase를 가로지르는 실제 다음 작업 선택은 [전역 마일스톤 실 - 경로: [knowledge-tool-validation-optimization](milestones/knowledge-tool-validation-optimization.md) - 요약: 요청 의도 분석, 실제 작업, 검증/schema 강제, 오류 시 회귀를 단계 호출 실행 모드의 MVP 후보로 스케치한다. +- [스케치] IOP Hot Path One-shot 실행 경로 + - 경로: [iop-hot-path-one-shot-execution](milestones/iop-hot-path-one-shot-execution.md) + - 요약: 외부 `model=iop` 요청을 Gemini 3.6 Flash 즉답 또는 micro-plan, RTX 5090 `ornith-fast` 실행, Gemini 단일 리뷰·보정으로 처리해 최대 속도와 실사용 품질의 균형을 맞추는 독립 one-shot 경로를 스케치한다. + - [스케치] Tool Call 판정 모델 Gate 리뷰 - 경로: [tool-call-validator-model-gate-review](milestones/tool-call-validator-model-gate-review.md) - 요약: 명시적 tool schema만으로 판정할 수 없는 자연어/텍스트/agent-specific tool call 후보를 별도 validator 모델로 분류할지, 어떤 조건에서 허용할지 사용자 리뷰가 필요한 결정 항목으로 스케치한다. @@ -76,4 +81,5 @@ Phase를 가로지르는 실제 다음 작업 선택은 [전역 마일스톤 실 - 기본 `/v1/models`, `/v1/chat/completions`, Edge-Node relay, Ollama option/API passthrough 안정화는 `Ollama 서빙 안정화 기반` Phase 책임이다. - 추가 추론 서버 provider의 adapter/config/target/model 매핑 표준화는 `추론 서버 provider 확장` Phase 책임이다. - 단계 호출, schema 강제, validation/fallback은 1차 MVP 후보로 검토하되, 누적 요청 컨텍스트 최적화, 장기 기억/RAG, advisor, Context Hook, cloud fallback, 품질 평가 feedback은 서로 책임이 다른 2차 또는 그 이후의 확장으로 둔다. -- direct/Plan/Milestone 분류와 workflow 실행 라우팅은 `Automation Runtime과 Bridge 확장` Phase 책임으로 두며, 이 Phase의 컨텍스트 최적화 계층은 선택된 target과 budget을 소비할 뿐 target을 고르지 않는다. +- direct/Plan/Milestone 분류와 workflow 실행 라우팅은 `Automation Runtime과 Bridge 확장` Phase 책임으로 둔다. +- 이 Phase의 일반 컨텍스트·검증 최적화 계층은 선택된 target과 budget을 소비할 뿐 target을 고르지 않는다. 예외적으로 IOP Hot Path는 외부 `model=iop`으로 명시 선택되는 제품 profile 안에서 Gemini 3.6 Flash와 `ornith-fast`의 고정 역할, stage budget과 one-shot 종료 조건을 소유하되 durable workflow로 전이하거나 그 상태를 공유하지 않는다. diff --git a/agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md b/agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md new file mode 100644 index 0000000..3ea33cf --- /dev/null +++ b/agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md @@ -0,0 +1,123 @@ +# Milestone: IOP Hot Path One-shot 실행 경로 + +## 위치 + +- Roadmap: [ROADMAP.md](../../../ROADMAP.md) +- Phase: [PHASE.md](../PHASE.md) + +## 목표 + +OpenAI-compatible 경계에 외부 `model=iop`으로 보이는 단일 one-shot 실행 표면을 제공하고, 내부에서는 빠른 cloud `Gemini 3.6 Flash`와 RTX 5090 local target `ornith-fast`를 조합하는 Hot Path를 스케치한다. +단순 요청은 Gemini가 즉시 완료하고, 일정 볼륨과 난이도가 있는 요청은 짧은 micro-plan, `ornith-fast` 실행, Gemini 리뷰와 최대 1회의 보정으로 끝낸다. +이 경로의 1차 목적은 최대 품질이 아니라 end-to-end 속도를 최대화하면서 실사용에 충분한 품질을 확보하는 것이며, durable Plan/Milestone 작업 루프와는 독립된 제품 경로로 유지한다. + +## 상태 + +[스케치] + +## 승격 조건 + +- [ ] Hot Path가 지원할 OpenAI-compatible endpoint, streaming 여부와 외부 `model=iop` 응답 계약을 확정한다. +- [ ] Gemini triage가 사용할 2~3단계 난이도·볼륨 등급, 등급별 허용 범위와 Hot Path 제외 조건을 확정한다. +- [ ] 사용자 요청을 `ornith-fast` 실행 입력으로 바꾸는 micro-plan의 최소 구조와 context 상한을 확정한다. +- [ ] Gemini 리뷰와 최대 1회 보정의 입력, 종료 판정, timeout·실패·부분 결과 처리 방식을 확정한다. +- [ ] 최대 속도를 1차 목표로 측정할 latency budget과 실사용 품질 하한을 함께 확정한다. +- [ ] provider/model alias, route policy, stage budget과 관측 항목의 설정 소유권을 확정한다. +- [ ] API/config/composite lifecycle 계약 구현으로 승격할 때 SDD와 후속 구현 단위를 확정한다. + +## 구현 잠금 + +- 상태: 잠금 +- SDD: 불필요 +- SDD 문서: 없음 +- SDD 사유: 현재는 Hot Path의 제품 목적과 후보 경계를 정리하는 스케치이며, OpenAI-compatible API, config와 복합 호출 lifecycle을 구현 가능한 계획으로 승격할 때 SDD가 필요하다. +- 잠금 해제 조건: 아래 체크리스트 + - [ ] 승격 조건의 미정 항목이 해소되어 있다. + - [ ] 구현 가능한 MVP 범위와 후속 확장 범위가 분리되어 있다. + - [ ] 계획 승격 시 필요한 SDD가 작성되고 잠금이 해제되어 있다. +- 결정 필요: 아래 체크리스트 + - [ ] Hot Path 내부 등급을 2단계와 3단계 중 어느 형태로 고정하고 각 경계를 어떤 신호로 판정할지 결정한다. + - [ ] 첫 MVP가 Chat Completions, Responses, streaming과 workspace/tool 실행 중 어디까지 지원할지 결정한다. + - [ ] Hot Path 범위 초과, target unavailable, timeout 또는 보정 실패 시 같은 요청 안에서 허용할 terminal fallback을 결정한다. 자동으로 durable 작업 루프에 진입시키지는 않는다. + - [ ] latency SLO, 요청·출력·context·도구 실행 상한과 대표 품질 평가의 최소 통과선을 결정한다. + +## 범위 + +- OpenAI-compatible 외부 `model=iop`을 실제 단일 provider 모델이 아니라 IOP가 소유하는 composite Hot Path route로 노출하는 방향 +- cloud target `Gemini 3.6 Flash`가 최초 triage, 단순 요청의 직접 응답, micro-plan 생성과 local 결과 리뷰를 담당하는 고정 baseline +- RTX 5090에서 제공되는 local target `ornith-fast`가 micro-plan에 따라 일정 볼륨의 one-shot 작업을 수행하는 고정 baseline +- 요청의 볼륨, 난이도, context, tool/workspace capability와 위험 신호를 이용한 2~3단계 내부 등급 후보 +- 단순 요청은 local hop과 review 없이 Gemini 응답으로 바로 종료하는 최단 경로 +- local 실행 요청은 durable Plan 문서가 아닌 bounded micro-plan prompt를 만들고 `ornith-fast` 결과를 Gemini가 리뷰한 뒤 필요한 경우 최대 1회만 보정하는 경로 +- 품질 향상을 위한 추가 model hop보다 end-to-end latency, time-to-first-useful-result와 bounded completion을 우선하는 stage budget +- 외부에는 한 번의 `iop` model 요청과 최종 응답으로 보이되 내부에는 triage, direct/local route, review, correction, latency와 terminal outcome을 안전하게 관측하는 방향 + +## 기능 + +### Epic: [hot-entry] IOP Model과 Hot Path 진입 + +외부의 단일 모델 호출을 내부 composite route와 속도 우선 등급 판정으로 연결하는 capability를 묶는다. + +- [ ] [iop-model-surface] OpenAI-compatible `model=iop`이 기존 model route 규칙을 보존하면서 Hot Path composite execution으로 진입하고 `/v1/models`와 성공·오류 응답에서 일관된 외부 identity를 제공한다. +- [ ] [gemini-triage] `Gemini 3.6 Flash`가 요청 볼륨, 난이도, context, capability와 위험 신호를 bounded 구조로 판정하고 direct 또는 local-work 등급과 판단 근거를 반환한다. +- [ ] [direct-complete] direct 등급은 local 호출과 별도 review 없이 같은 Gemini 호출의 결과를 최종 응답으로 사용해 가장 짧은 종료 경로를 제공한다. +- [ ] [route-boundary] invalid·불확실·범위 초과 판정이 Hot Path 안에서 무제한 추론이나 durable workflow 진입을 만들지 않고 계약된 terminal 결과로 끝난다. + +### Epic: [local-work] Micro-plan과 RTX 5090 실행 + +일정 볼륨의 요청을 긴 계획 없이 local model에 넘겨 속도와 작업 성능을 함께 확보하는 capability를 묶는다. + +- [ ] [micro-plan] Gemini가 목표, 필요한 입력, 산출물, 제약과 짧은 검증 기준만 포함한 bounded micro-plan을 만들며 이를 durable Plan/Milestone artifact로 저장하지 않는다. +- [ ] [ornith-execute] `ornith-fast`가 선택된 RTX 5090 local route에서 micro-plan과 허용된 요청 context를 받아 one-shot 결과를 생성한다. +- [ ] [execution-budget] local 실행은 요청별 context, 출력, 도구, timeout과 cancellation 상한 안에서 끝나며 session continuation이나 background task queue를 요구하지 않는다. + +### Epic: [review-correct] 단일 리뷰와 보정 + +추가 지연을 제한하면서 local 결과의 실사용 품질을 보완하는 capability를 묶는다. + +- [ ] [gemini-review] Gemini가 원 요청, micro-plan, `ornith-fast` 결과와 허용된 검증 evidence를 함께 보고 pass, correction 또는 terminal failure를 판정한다. +- [ ] [single-correction] correction이 필요하면 계약된 방식으로 최대 1회만 보정하고 추가 review loop나 재계획을 만들지 않는다. +- [ ] [terminal-result] pass, 보정 완료, timeout, unavailable과 실패가 하나의 외부 응답 또는 오류로 끝나며 내부 stage 상태가 사용자 응답에 누출되지 않는다. + +### Epic: [speed-balance] 속도 우선 품질·운영 기준 + +Hot Path가 최대 품질 경쟁이 아니라 빠른 실용 경로라는 목표를 측정하고 유지하는 capability를 묶는다. + +- [ ] [latency-budget] direct와 local-work 등급별 전체 latency, cloud/local stage timeout과 추가 hop 상한이 정의되고 속도 회귀를 검출할 수 있다. +- [ ] [quality-floor] 대표 one-shot 요청 세트에서 허용 가능한 정확성·완결성 하한을 정의하되 품질 점수를 높이기 위한 추가 stage는 latency budget을 넘지 않는다. +- [ ] [route-observability] target identity, 등급, stage timing, review/correction 여부와 terminal outcome을 raw prompt·output·credential 없이 관측할 수 있다. +- [ ] [hot-path-smoke] 실제 Gemini cloud target과 RTX 5090 `ornith-fast`를 사용해 direct, local pass, 단일 보정, 범위 초과와 target unavailable 경로를 검증한다. + +## 완료 리뷰 + +- 상태: 없음 +- 요청일: 없음 +- 완료 근거: 방향성 스케치이며 승격 조건, 기능 Task와 실제 검증이 아직 충족되지 않았다. +- 검토 항목: 없음 +- 리뷰 코멘트: 없음 + +## 범위 제외 + +- 최대 품질을 위해 강한 cloud 모델을 여러 번 호출하거나 reviewer ensemble, debate, self-consistency를 수행하는 경로 +- durable Plan/Milestone/CODE_REVIEW artifact 생성, 여러 task 연결, background 실행, 중단 후 재개와 완료 알림을 담당하는 에이전트 작업 루프 오케스트레이션 +- Hot Path 실패나 범위 초과 요청을 자동으로 Plan/Milestone 작업 루프에 편입하는 동작 +- 여러 번의 review·repair, 무제한 retry, 장기 session과 사람 승인 대기 상태 +- 모든 cloud/local model을 동적으로 조합하는 범용 planner/generator/verifier framework +- provider 설치, 모델 다운로드, RTX 5090 lifecycle·qualification과 credential 관리 +- RAG, 장기 기억, 누적 대화 context 최적화와 학습 기반 route threshold 자동 조정 + +## 작업 컨텍스트 + +- 관련 경로: `apps/edge/internal/openai`, `apps/edge/internal/service`, `packages/go/config`, `configs/edge.yaml`, `packages/go/streamgate` +- 관련 계약: [OpenAI-Compatible API Contract](../../../../agent-contract/outer/openai-compatible-api.md), [Edge Config And Runtime Refresh Contract](../../../../agent-contract/inner/edge-config-runtime-refresh.md) +- 표준선(선택): 외부 호출자는 OpenAI-compatible `model=iop`만 선택하고 내부 실행은 기존 원칙대로 `adapter + target + execution`으로 기록한다. Hot Path stage 선택을 위한 별도 root-level `iop` wrapper나 caller metadata selector를 요구하지 않는다. +- 표준선(선택): `Gemini 3.6 Flash`와 `ornith-fast`는 Hot Path baseline target으로 설정에서 명시하고, core 내부에는 외부 `model` id와 provider id, target 문자열의 의미를 섞어 하드코딩하지 않는다. +- 표준선(선택): end-to-end 속도와 bounded completion이 1차 최적화 목표이며, 품질은 정한 하한을 만족하는 범위에서 최대한 확보한다. 미미한 품질 향상을 위해 stage 수를 늘리지 않는다. +- 표준선(선택): micro-plan은 한 요청 안의 transient directive이며 durable Plan/Milestone artifact가 아니다. review와 correction을 포함해 전체 실행은 one-shot terminal lifecycle 안에서 닫힌다. +- 표준선(선택): Hot Path는 [에이전트 작업 루프 오케스트레이션 MVP](../../automation-runtime-bridge/milestones/agent-workflow-loop-orchestration-mvp.md)와 요청 분류, artifact, continuation, retry와 완료 상태를 공유하지 않는다. provider 호출, admission, cancellation, 출력 검증과 관측 같은 하위 runtime capability만 재사용할 수 있다. +- 표준선(선택): [단계 호출과 검증 최적화 MVP](knowledge-tool-validation-optimization.md)는 범용 staged validation mode 후보이고, Hot Path는 고정 target 조합과 latency budget을 소유하는 별도 제품 경로다. +- 큐 배치: 사용자 우선순위 미지정으로 전역 실행 순서 끝에 추가한다. +- 선행 작업: 없음 +- 참조·연결 작업: [단계 호출과 검증 최적화 MVP](knowledge-tool-validation-optimization.md), [요청 실행 로그와 Usage Ledger 기반](../../operational-observability-provider-management/milestones/request-execution-log-usage-ledger-foundation.md) +- 후속 작업: Hot Path 구현 계획과 SDD, target·endpoint 확대, 평가 기반 threshold 조정 +- 확인 필요: `구현 잠금 > 결정 필요` diff --git a/agent-roadmap/priority-queue.md b/agent-roadmap/priority-queue.md index 0c4cd3a..ee85f2c 100644 --- a/agent-roadmap/priority-queue.md +++ b/agent-roadmap/priority-queue.md @@ -78,3 +78,6 @@ 25. [Unity 3D Desktop Character](phase/automation-runtime-bridge/milestones/unity-3d-desktop-character.md) 같은 local proto-socket을 독립적으로 소비하고 작업 상태를 투명 배경 3D 캐릭터와 animation으로 표현하는 macOS Unity client를 제공한다. + +26. [IOP Hot Path One-shot 실행 경로](phase/knowledge-tool-optimization-extension/milestones/iop-hot-path-one-shot-execution.md) + 외부 `model=iop` 요청을 Gemini 3.6 Flash와 RTX 5090 `ornith-fast`의 bounded one-shot 경로로 처리해 최대 속도와 실사용 품질의 균형을 맞춘다.