Skip to content

feat(vu-001): Work Request Intake (Phase A) behind MAESTRO_WORKFLOW_ENABLED#12

Merged
redsunjin merged 1 commit into
mainfrom
feat/vu-001-phase-a-work-request-intake
Jul 16, 2026
Merged

feat(vu-001): Work Request Intake (Phase A) behind MAESTRO_WORKFLOW_ENABLED#12
redsunjin merged 1 commit into
mainfrom
feat/vu-001-phase-a-work-request-intake

Conversation

@redsunjin

Copy link
Copy Markdown
Owner

개요

VU-001 OpenClaw Work Orchestration의 첫 단계인 **Work Request Intake (Phase A)**를 도입합니다. 운영자가 작업 요청을 등록하고, 에이전트 착수 전에 요청 자체를 승인/반려/취소합니다. MAESTRO_WORKFLOW_ENABLED 플래그(기본 OFF) 뒤에 격리되어 플래그 OFF 시 기존 동작은 완전히 동일합니다.

서버 (maestro-server.js)

  • WorkRequest 스토어: 메모리 + 기존 .maestro-workflows.json(Session Core와 공유)에 workRequests 통합 영속화, 재시작 복구
  • GET/POST /api/work-requests, GET /:id, POST /:id/decision — 플래그 OFF 시 404 WORKFLOW_DISABLED
  • 검증 오류코드: WORK_REQUEST_INVALID, PROJECT_ID_INVALID, LANE_INDEX_INVALID, WORK_REQUEST_ALREADY_DECIDED(중복 결정 409)
  • WORK_REQUEST_CREATED / WORK_REQUEST_DECIDED WebSocket 브로드캐스트
  • /healthworkflow.enabled 노출 (UI 토글 게이팅용)

UI

  • useWorkRequests.js/health 플래그 감지 + CRUD + 소켓 동기화
  • WorkRequestPanel.jsx — 생성 폼 + 요청 카드 + 승인/반려/취소, aria-live 요약, aria-expanded/controls
  • 헤더 Requests 토글 (기존 Work(Console) 토글과 구분), 플래그 ON일 때만 노출

계획 대비 조정 (Phase A 플랜 문서에 기록)

  1. 저장: 별도 shared 모듈 → .maestro-workflows.json 통합 + 서버 인라인 (Session Core 파일 충돌 회피)
  2. 프로젝트 선택 UI는 다중 프로젝트 단계로 연기, 요청은 활성 프로젝트 기본값 사용

테스트 & 검증

  • 서버 회귀 5종(tests/server-regression.test.mjs) + UI 회귀 2종(src/App.work-request.ui.test.jsx)
  • npm run qa (server 47 + UI 28 + build) + npm run smoke:lanes 통과
  • 실서버 E2E 검증: 플래그 ON 서버 + vite + 브라우저로 플래그 게이팅 → 패널 오픈 → 폼 생성 → 카드 렌더 → 승인 → 상태 전이(request_approved) + 영속화 복구 확인. 서버 API는 curl로 create/approve/중복(409)/검증/영속화 전수 확인.

알려진 UX 관찰

  • Work Request 패널과 Work Console 패널이 모두 우측 도킹이라 동시에 열면 겹칩니다(Work Console z-45가 위). 후속 단계에서 도킹/레이아웃 조정 검토.

🤖 Generated with Claude Code

…OW_ENABLED

Introduces the first VU-001 work-orchestration step: operators register a
work request and approve/reject/cancel it before an agent starts, gated by
the MAESTRO_WORKFLOW_ENABLED flag (default OFF) so existing flows are
untouched when disabled.

Server (maestro-server.js):
- WorkRequest store (in-memory + persisted into the existing
  .maestro-workflows.json alongside work sessions; restored on restart)
- GET/POST /api/work-requests, GET /:id, POST /:id/decision — 404
  WORKFLOW_DISABLED when the flag is off
- Validation with the planned error codes (WORK_REQUEST_INVALID,
  PROJECT_ID_INVALID, LANE_INDEX_INVALID, WORK_REQUEST_ALREADY_DECIDED)
- WORK_REQUEST_CREATED / WORK_REQUEST_DECIDED websocket broadcasts
- /health exposes workflow.enabled so the UI can gate the toggle

UI:
- useWorkRequests hook (flag probe via /health, CRUD, socket sync)
- WorkRequestPanel (create form + request cards + approve/reject/cancel,
  aria-live summary, aria-expanded/controls)
- Header "Requests" toggle (distinct from the existing "Work" console
  toggle), shown only when the flag is enabled

Deviations from the 2026-03-15 plan (documented in PHASE_A plan):
- Store integrated into .maestro-workflows.json + inline in the server
  instead of separate shared modules, to avoid clobbering Session Core
- Project selector deferred to the multi-project phase; requests default
  to the active project

Tests: 5 server regression cases + 2 UI regression cases. npm run qa and
npm run smoke:lanes pass. Verified end-to-end against a live server
(flag gating, create, approve, duplicate 409, validation, persistence).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@redsunjin
redsunjin merged commit be383ce into main Jul 16, 2026
1 of 2 checks passed
@redsunjin
redsunjin deleted the feat/vu-001-phase-a-work-request-intake branch July 16, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants