schema_version: operating_cadence.v2
updated_at: '2026-06-10T23:29:00+09:00'
goal: >
  주말 리밸런싱과 매월 1/11/21 중간점검 cadence를 release DAG input으로 연결한다.
  rebalance_required, mid_check_required는 final_decision_packet에 반드시 포함된다.
timezone: Asia/Seoul

cadence:
  weekly_rebalance:
    days: [Saturday, Sunday]
    trigger_field: rebalance_required       # final packet에 삽입되는 boolean 필드
    required_sections:
      - portfolio_rebalance_playbook
      - ticker_action_matrix
      - sell_priority_table                 # 매도 후보 2개 이상이면 반드시 포함
      - cash_and_risk_budget_snapshot
  interim_check:
    dates: [1, 11, 21]
    trigger_field: mid_check_required       # final packet에 삽입되는 boolean 필드
    required_sections:
      - engine_health_card
      - data_missing_and_harness_update_list
      - shadow_ledger_review
      - calibration_drift_report

release_dag_integration:
  input_node: build_operating_cadence_signal_v1
  output_fields:
    - name: rebalance_required
      type: bool
      description: 현재 일자가 Saturday 또는 Sunday이면 true
    - name: mid_check_required
      type: bool
      description: 현재 일자의 day가 1, 11, 21 중 하나이면 true
    - name: cadence_label
      type: str
      enum: [WEEKEND_REBALANCE, MID_MONTH_CHECK, NORMAL]
  downstream_nodes:
    - build_final_context            # context pack에 cadence 정보 삽입
    - build_final_decision_packet    # packet에 rebalance_required 삽입

rules:
  - id: RULE_WEEKEND_REBALANCE_CHECK
    condition: current_day in [Saturday, Sunday]
    action: Enforce rebalance review playbook. sell priority table must appear.
    packet_field: rebalance_required
  - id: RULE_INTERIM_CHECK
    condition: current_date.day in [1, 11, 21]
    action: Enforce interim quality check playbook. shadow ledger review mandatory.
    packet_field: mid_check_required
  - id: RULE_CADENCE_IN_PACKET
    condition: always
    action: >
      rebalance_required와 mid_check_required는 final_decision_packet_active에
      항상 포함된다. 값이 없으면 DATA_MISSING — 하네스 업데이트 필요.

owner: quant_architect
lifecycle_state: active
