Skip to content

Refactor: Move Evaluator before Advancer in Daemon loop#752

Merged
kys0213 merged 1 commit intomainfrom
claude/review-spec-document-2J3TW
Apr 7, 2026
Merged

Refactor: Move Evaluator before Advancer in Daemon loop#752
kys0213 merged 1 commit intomainfrom
claude/review-spec-document-2J3TW

Conversation

@kys0213
Copy link
Copy Markdown
Owner

@kys0213 kys0213 commented Apr 7, 2026

Summary

Restructure the Daemon's main loop to execute the Evaluator (classification/judgment phase) before the Advancer (state transition phase), establishing a clearer Progressive Pipeline architecture. This change also updates terminology throughout the codebase from "evaluate cron" to "Evaluator" to reflect the new architectural role.

Key Changes

  • Daemon loop reordering: Moved evaluator.evaluate() to execute immediately after collection and before state advancement

    • Evaluator now runs as step 2 (was implicit/triggered via force_trigger)
    • Advancer moved to step 3
    • Executor moved to step 4
    • Cron engine tick moved to step 5
  • Removed force_trigger mechanism: Eliminated force_trigger("evaluate") call from Executor, as Evaluator now runs proactively in each Daemon tick

  • Terminology updates: Replaced "evaluate cron" with "Evaluator (Daemon tick)" throughout documentation to clarify that evaluation is now a first-class phase in the main loop, not a separate cron job

  • Updated architectural descriptions:

    • Daemon loop now explicitly documented as: "수집 → 분류 → 전이 → 실행 → 반영 루프" (collect → classify → transition → execute → reflect)
    • Cron engine redefined as quality loop (gap-detection, hitl-timeout, etc.) rather than evaluation trigger

Implementation Details

The change establishes a clearer separation of concerns:

  • Evaluator: Determines item classification (Done/HITL) before state transitions
  • Advancer: Manages state transitions based on queue policies
  • Executor: Runs handlers and triggers lifecycle hooks
  • Cron Engine: Handles periodic quality checks and maintenance tasks

This Progressive Pipeline ensures classification decisions are made before items advance to Running state, improving decision quality and reducing race conditions.

https://claude.ai/code/session_01Qfqe81zxg7nS4yhNeALiVP

…execute→cron

All spec documents now consistently follow the DESIGN.md canonical loop order.

Changes:
- daemon.md: add evaluator.evaluate() to summary loop pseudocode
- lifecycle-hook.md: insert evaluate step, renumber steps 2→5, remove
  stale force_trigger("evaluate") call
- queue-state-machine.md: replace "evaluate cron" with "Evaluator (Daemon tick)"
- DESIGN.md: fix Actor table to "수집→분류→전이→실행→반영" order
- Replace all v6 "evaluate cron" references with "Evaluator (Daemon tick)"

https://claude.ai/code/session_01Qfqe81zxg7nS4yhNeALiVP
@kys0213 kys0213 merged commit 10134a5 into main Apr 7, 2026
4 checks passed
@kys0213 kys0213 deleted the claude/review-spec-document-2J3TW branch April 7, 2026 07:18
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