docs(spec): restructure v6 draft with LifecycleHook, Evaluator, and Daemon=CPU#726
Merged
docs(spec): restructure v6 draft with LifecycleHook, Evaluator, and Daemon=CPU#726
Conversation
…aemon=CPU Major design changes to spec/draft based on review: - LifecycleHook trait: separate handler (work) from hook (reaction). Daemon triggers hooks on state transitions, Hook impl owns execution. Per-workspace binding, lazy loading for memory optimization. - Evaluator Pipeline: progressive evaluation (Mechanical → Semantic → Consensus). Evaluate before Execute in daemon tick. History-aware pre-check skips unnecessary handler execution. - Daemon = CPU: rename from Orchestrator. Daemon only triggers hooks, doesn't know what they do. Tick order: evaluate → advance → execute → cron. - PatternDetector trait: each detector queries DB directly instead of ExecutionHistory intermediate struct. v6 scope: Spinning + Oscillation. Phase 2: Drift + Diminishing (trait boundary defined, no impl). - Remove stale concepts: escalation acceleration, classify-policy.yaml, batch_size. Escalation and stagnation are orthogonal concerns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, L2/L3 boundary
Resolves High 6, Medium 8-10 from spec review:
- High 6: Add QueuePhase ↔ history.status mapping table to data-model.md
- Medium 8 (L2/L3 boundary): Remove algorithm details from flow docs
(CompositeSimilarity, ExecutionHistory, SQL DDL). Keep user-facing
descriptions, delegate internals to concern docs.
- Medium 9 (HITL UX): Replace fixed 4-choice enum with LLM-driven
contextual questions. LLM analyzes situation (lateral report, history,
HITL trigger) and generates recommended actions. User responds in
natural language, LLM translates to system action.
- Medium 10 (Error scenarios):
- flow-01: CLI immediate validation with specific error messages
- flow-02: New Analyzing state — LLM analyzes spec quality before
Active transition. Configurable via ~/.belt/config.yaml
- flow-03: Circuit breaker for infra errors (GitHub API, worktree).
Distinct from stagnation (handler logic failure). Source-level
isolation with backoff retry and dashboard visibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v6 spec draft 리뷰에서 도출된 구조적 설계 변경을 반영합니다.
신규 concern 문서
LifecycleHooktrait 정의. handler(작업)와 hook(반응) 분리. DataSource별 impl, workspace별 바인딩, lazy 로딩EvaluationStagetrait). Evaluate before Execute. Mechanical → Semantic → Consensus 단계적 판정주요 설계 변경
evaluate → advance → execute → cronExecutionHistory중간 구조체 제거, 각 detector가 DB 직접 조회변경된 파일 (11 modified + 2 new)
DESIGN-v6.md— 설계 철학, 상태 흐름, 내부 구조, OCP 확장점daemon.md— CPU 리네이밍, 실행 루프, handle_failure 의사코드datasource.md— 역할 재정의, hook 분리, 가속 문구 제거stagnation.md— PatternDetector trait, DB 직접 조회agent-workspace.md— classify-policy.yaml 제거, Evaluator 연동cron-engine.md— evaluate를 Daemon tick으로 이동data-model.md— event_type 통합, hook 반영queue-state-machine.md,flows/03,flows/04,README.md— 일관성 정리Test plan
🤖 Generated with Claude Code