1206 lines
54 KiB
YAML
1206 lines
54 KiB
YAML
schema_version: quant_engine_refactor_playbook.v1
|
||
title: QEDD 기반 퀀트투자 엔진 지속 고도화·리팩토링 실행 YAML
|
||
generated_at_kst: '2026-06-10T19:50:34+09:00'
|
||
source_bundle:
|
||
path: /mnt/data/data_feed.zip
|
||
sha256: 1b05800cfe967f949d2aa83d508064fb005995a42fe1e81722e8fb79d3f7cae9
|
||
primary_instruction: data_feed/AGENTS.md
|
||
authority_note: AGENTS.md는 운영 인덱스이며 상세 규칙은 governance/rules/*.yaml 및 spec/*.yaml 우선
|
||
target_outcome:
|
||
business_goal: 목표금액 5억원을 기준으로, 주간 리밸런싱·월 1/11/21 중간점검·D+2 현금 방어선·대형 IPO 선제 차익실현을 결정론적으로 운영하는 퀀트 엔진
|
||
engineering_goal: 저성능 LLM도 동일한 입력 패킷과 TODO만으로 동일 결론을 렌더링하도록, 계산·판단은 Python/YAML 하네스에서 확정하고 LLM은 copy-only renderer로 제한
|
||
non_goal:
|
||
- LLM이 가격·수량·점수·평균·순위·TP/SL을 즉석 계산하는 구조
|
||
- GAS에 투자 판단 비즈니스 로직을 계속 추가하는 구조
|
||
- 문서가 많아질수록 권위가 분산되는 구조
|
||
current_audit_snapshot:
|
||
local_file_scan:
|
||
total_files: 1461
|
||
extension_counts:
|
||
.py: 843
|
||
.json: 379
|
||
.yaml: 176
|
||
.md: 40
|
||
.gs: 8
|
||
.pyc: 8
|
||
.ps1: 4
|
||
.jsonl: 2
|
||
.js: 1
|
||
directory_inventory:
|
||
spec:
|
||
file_count: 128
|
||
bytes: 1764342
|
||
governance:
|
||
file_count: 26
|
||
bytes: 13122
|
||
runtime:
|
||
file_count: 159
|
||
bytes: 2331503
|
||
src:
|
||
file_count: 335
|
||
bytes: 696524
|
||
tools:
|
||
file_count: 372
|
||
bytes: 1822541
|
||
Temp:
|
||
file_count: 22
|
||
bytes: 304445
|
||
artifacts:
|
||
file_count: 41
|
||
bytes: 78014
|
||
docs:
|
||
file_count: 8
|
||
bytes: 5539
|
||
prompts:
|
||
file_count: 9
|
||
bytes: 71148
|
||
schemas:
|
||
file_count: 165
|
||
bytes: 155357
|
||
tests:
|
||
file_count: 160
|
||
bytes: 72432
|
||
gas_inventory:
|
||
- file: gas_apex_alpha_watch.gs
|
||
bytes: 13275
|
||
lines: 365
|
||
- file: gas_apex_runtime_core.gs
|
||
bytes: 29525
|
||
lines: 654
|
||
- file: gas_data_collect.gs
|
||
bytes: 226365
|
||
lines: 4460
|
||
- file: gas_data_feed.gs
|
||
bytes: 471034
|
||
lines: 10302
|
||
- file: gas_harness_rows.gs
|
||
bytes: 89520
|
||
lines: 1456
|
||
- file: gas_lib.gs
|
||
bytes: 121756
|
||
lines: 2762
|
||
- file: gas_report.gs
|
||
bytes: 23209
|
||
lines: 446
|
||
repository_entropy_audit_observed:
|
||
gate: PASS
|
||
reported_total_file_count: 1461
|
||
max_total_files_budget: 2000
|
||
package_script_count: 22
|
||
max_package_scripts_budget: 220
|
||
temp_json_count: 20
|
||
max_temp_json_budget: 500
|
||
validation_evidence:
|
||
validate_specs: PASS
|
||
validate_golden_coverage_100:
|
||
gate: PASS
|
||
formula_total: 149
|
||
implemented: 147
|
||
implemented_pct: 98.7
|
||
golden_cases: 149
|
||
golden_coverage_pct: 100.0
|
||
unimplemented: 2
|
||
validate_calibration_registry_v1:
|
||
gate: WARN
|
||
threshold_total: 187
|
||
calibrated: 0
|
||
spec_derived: 120
|
||
provisional: 8
|
||
expert_prior: 59
|
||
overclaimed: 0
|
||
unregistered: 0
|
||
validate_schema_model_generation_v1:
|
||
gate: FAIL
|
||
reason: Temp/schema_model_generation_v1.json 또는 동등한 생성 리포트 결측
|
||
validate_gas_thin_adapter_v1:
|
||
gate: PASS_WITH_DEBT
|
||
forbidden_gas_business_logic_count: 103
|
||
function_inventory_coverage_pct: 100.0
|
||
migration_plan_exists: true
|
||
validate_agents_shrink_v1: PASS
|
||
active_artifact_manifest:
|
||
active_count_per_formula: 1
|
||
authority_collision_count: 0
|
||
stale_artifact_count: 0
|
||
report_active_artifact_match_pct: 100.0
|
||
canonical_source: Temp/final_decision_packet_active.json
|
||
prediction_match_rate_pct_observed: 54.76
|
||
version_entropy_top_groups:
|
||
- path: artifacts/archive/2026-06-06
|
||
base: smart_cash_recovery
|
||
suffix: .json
|
||
versions:
|
||
- 3
|
||
- 4
|
||
- 5
|
||
- 6
|
||
- 7
|
||
- 8
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: build_smart_cash_recovery
|
||
suffix: .py
|
||
versions:
|
||
- 3
|
||
- 4
|
||
- 5
|
||
- 6
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: run_release_dag
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: build_pass_100_criteria
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 3
|
||
- 4
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: build_final_execution_decision
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
- 4
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: spec
|
||
base: formula_golden_cases
|
||
suffix: .yaml
|
||
versions:
|
||
- 2
|
||
- 3
|
||
- 4
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: artifacts/archive/20260606
|
||
base: release_gate_summary
|
||
suffix: .json
|
||
versions:
|
||
- 1
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: artifacts/archive/2026-06-06
|
||
base: smart_money_liquidity_evidence_gate
|
||
suffix: .json
|
||
versions:
|
||
- 2
|
||
- 3
|
||
- 4
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: artifacts/archive/2026-06-06
|
||
base: prediction_accuracy_harness
|
||
suffix: .json
|
||
versions:
|
||
- 2
|
||
- 3
|
||
- 4
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: artifacts/archive/2026-06-06
|
||
base: final_execution_decision
|
||
suffix: .json
|
||
versions:
|
||
- 1
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: artifacts/archive/2026-06-06
|
||
base: canonical_metrics
|
||
suffix: .json
|
||
versions:
|
||
- 1
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_renderer_no_calculation
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_release_dag
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_packaging_policy
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_number_provenance_strict
|
||
suffix: .py
|
||
versions:
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_number_provenance
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_no_replay_live_mix
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: validate_gas_thin_adapter
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: run_formula_golden_cases
|
||
suffix: .py
|
||
versions:
|
||
- 2
|
||
- 3
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
- path: tools
|
||
base: build_value_preservation_scorer
|
||
suffix: .py
|
||
versions:
|
||
- 1
|
||
- 2
|
||
active_version_policy: keep highest only when non-archive; archive lower versions after manifest validation
|
||
diagnosis:
|
||
- 기본 골격(QEDD, manifest, release DAG, AGENTS shrink)은 이미 좋은 방향이다.
|
||
- 실제 리스크는 계산 권위가 GAS·tools·src 사이에 남아 있는 점, 임계값 보정 부재, schema/model 생성 리포트 결측, 버전 파일 다중화다.
|
||
- 다음 리팩토링은 기능 추가보다 권위 단일화·검증 자동화·캘리브레이션 우선이다.
|
||
methodology:
|
||
name: 'QEDD++: Quant Evidence-Driven Deterministic Development with Harness-First Refactoring'
|
||
operating_principles:
|
||
- id: P01
|
||
rule: Contract first
|
||
instruction: 새 판단 로직은 반드시 spec/*.yaml 계약, output schema, owner ledger, golden case를 먼저 만든 뒤 구현한다.
|
||
- id: P02
|
||
rule: Python canonical first
|
||
instruction: 모든 계산·점수·가격·수량·순위·게이트 판정은 src/quant_engine 또는 생성된 Python formula에서만 수행한다.
|
||
- id: P03
|
||
rule: GAS thin adapter
|
||
instruction: GAS는 수집, 시트 입출력, JSON 전달만 담당한다. 투자 판단·스코어링·가격 산출 로직은 신규 작성 금지다.
|
||
- id: P04
|
||
rule: No LLM math
|
||
instruction: LLM은 Temp/final_context_for_llm_v5.yaml 또는 final_decision_packet_active.json의 값을 복사·설명만 한다. 숫자 결측은 DATA_MISSING으로
|
||
처리한다.
|
||
- id: P05
|
||
rule: Single source of truth
|
||
instruction: active_artifact_manifest가 가리키는 active artifact만 보고서 권위로 사용한다. deprecated/archive/runtime stale 파일은 참조 금지다.
|
||
- id: P06
|
||
rule: Fail closed
|
||
instruction: 검증 실패, provenance 결측, schema 불일치, 데이터 신선도 결측은 매수/증액이 아니라 HOLD/BLOCK/DATA_MISSING으로 닫는다.
|
||
- id: P07
|
||
rule: Evidence before capital
|
||
instruction: 신규 팩터와 임계값은 shadow ledger와 T+5/T+20 성과 검증 전까지 실계좌 비중 확대에 사용하지 않는다.
|
||
- id: P08
|
||
rule: Document diet
|
||
instruction: 문서는 원칙·계약·ADR·런북으로만 나누고, 중복 설명은 삭제한다. 문서가 판단 권위를 갖지 않도록 spec과 manifest를 우선한다.
|
||
canonical_pipeline:
|
||
- Data ingest
|
||
- Data quality & freshness gates
|
||
- Feature generation
|
||
- Regime classification
|
||
- Signal scoring
|
||
- Anti-late-entry and distribution gates
|
||
- Position sizing & risk budget
|
||
- Exit waterfall
|
||
- Execution packet
|
||
- Report renderer
|
||
- Shadow/live outcome feedback
|
||
authority_order:
|
||
- spec/*.yaml
|
||
- runtime/active_artifact_manifest.yaml
|
||
- Temp/final_decision_packet_active.json
|
||
- governance/rules/*.yaml
|
||
- src/quant_engine implementation
|
||
- tools validation/build wrappers
|
||
- GAS adapters
|
||
- LLM renderer
|
||
change_lifecycle:
|
||
- PROPOSED
|
||
- CONTRACTED
|
||
- IMPLEMENTED_PYTHON
|
||
- GOLDEN_TESTED
|
||
- SHADOW_ONLY
|
||
- CALIBRATED
|
||
- ACTIVE
|
||
- RETIRED
|
||
promotion_gate:
|
||
required:
|
||
- schema_valid=true
|
||
- golden_case_pass=true
|
||
- property_invariants_pass=true
|
||
- number_provenance_coverage_pct=100
|
||
- shadow_ledger_recorded=true
|
||
- no_architecture_boundary_violation=true
|
||
live_capital_activation:
|
||
- live_t20_count>=30 또는 명시적 risk_officer 예외
|
||
- expectancy_pct>0
|
||
- win_rate_pct>=50
|
||
- max_drawdown_pct within risk budget
|
||
- profit_giveback_pct below configured ceiling
|
||
- threshold_state in [CALIBRATED,SPEC_DERIVED] unless capped informational
|
||
retirement_gate:
|
||
trigger_examples:
|
||
- formula duplicated by newer active version
|
||
- prediction_match_rate below retirement threshold
|
||
- manual_override_count exceeds policy
|
||
- data source discontinued
|
||
- architecture boundary violation detected
|
||
required_action: runtime/active_artifact_manifest.yaml에서 active 해제 후 archive로 이동하고 ADR 또는 lifecycle_registry에 사유 기록
|
||
target_architecture:
|
||
directories:
|
||
spec: 모든 공식, 계약, 게이트, 데이터 필드, 출력 스키마의 source of truth
|
||
src/quant_engine: 계산 로직의 canonical Python package. 순수 함수, typed IO, 재현 가능성 보장
|
||
tools: build/validate/render CLI wrapper. 핵심 투자 로직 금지
|
||
governance: ADR, authority matrix, rule lifecycle, 운영 규칙 인덱스
|
||
runtime: active manifest, baseline, rollback manifest. 사람이 직접 편집하지 않는 운영 상태
|
||
Temp: 실행 산출물. read-only artifact로 취급하고 수동 수정 금지
|
||
gas_*.gs: thin adapter. 데이터 수집·시트 IO·API 호출·패킷 전달만 허용
|
||
dist: 배포용 compact bundle만 보관. 원천 권위 금지
|
||
archive: 과거 버전 보관. runtime source로 읽기 금지
|
||
module_boundaries:
|
||
data_ingest:
|
||
allowed:
|
||
- raw workbook/API fetch
|
||
- normalization
|
||
- as_of timestamp
|
||
- source metadata
|
||
forbidden:
|
||
- investment score
|
||
- buy/sell decision
|
||
- position sizing
|
||
feature_engine:
|
||
allowed:
|
||
- registered formula execution
|
||
- feature ledger output
|
||
forbidden:
|
||
- report rendering
|
||
- order text generation
|
||
decision_engine:
|
||
allowed:
|
||
- gate evaluation
|
||
- risk budget
|
||
- action priority waterfall
|
||
forbidden:
|
||
- data collection
|
||
- external browsing
|
||
- LLM override
|
||
execution_engine:
|
||
allowed:
|
||
- order grammar
|
||
- tick normalization
|
||
- quantity rounding
|
||
- sell priority table
|
||
forbidden:
|
||
- new alpha discovery
|
||
- narrative explanation
|
||
report_renderer:
|
||
allowed:
|
||
- copy packet values
|
||
- format tables
|
||
- explain blockers
|
||
forbidden:
|
||
- calculation
|
||
- ranking
|
||
- imputing missing values
|
||
- changing action
|
||
algorithm_spine:
|
||
universe_gate: 상장 상태, 거래대금, 가격 제한, 데이터 품질, 보유/관심 상태를 먼저 필터링
|
||
regime_gate: 시장 위험, 유동성, 환율/금리/이벤트, 외국인/기관 수급을 regime score로 압축
|
||
alpha_stack:
|
||
- relative_strength_momentum
|
||
- sector_rotation
|
||
- fundamental_quality
|
||
- earnings_revision_proxy
|
||
- smart_money_liquidity
|
||
- anti_late_entry_pullback
|
||
- distribution_early_warning
|
||
risk_overlay:
|
||
- portfolio_beta
|
||
- sector_concentration
|
||
- correlation_cluster
|
||
- cash_floor
|
||
- drawdown_guard
|
||
- D+2 cash defense
|
||
sizing_model: expected_edge × confidence × regime_scale × correlation_penalty × liquidity_cap. 단, 모든 계수는 registry/provenance
|
||
필수
|
||
exit_model: 손절·감익·수익보호·대형 IPO/이벤트 선제 차익실현을 단일 sell priority waterfall로 선형 처리
|
||
feedback_loop: T+5/T+20 outcomes, late-chase attribution, profit giveback, missed-alpha ledger를 주간 calibration에 반영
|
||
refactor_todo:
|
||
- id: P0-T01
|
||
phase: P0_constitution_freeze
|
||
title: 운영 헌법과 읽기 순서 고정
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "agents_lines=93, gate=AGENTS_SHRINK_OK, validate_specs=PASS"
|
||
objective: AGENTS.md를 짧은 인덱스로 유지하고 모든 판단 권위를 spec/runtime manifest로 고정한다.
|
||
target_files:
|
||
- AGENTS.md
|
||
- governance/agents_index.yaml
|
||
- governance/rules/*.yaml
|
||
ordered_steps:
|
||
- AGENTS.md의 최우선 원칙과 Directory Routing을 유지한다.
|
||
- 새 규칙은 AGENTS.md 본문에 장문으로 쓰지 말고 governance/rules 또는 spec에 추가한다.
|
||
- agents_rule_hashes.yaml을 갱신해 규칙 변경 추적성을 남긴다.
|
||
- LLM용 읽기 순서를 low_capability_execution_contract와 동일하게 맞춘다.
|
||
validation_commands:
|
||
- python tools/validate_agents_shrink_v1.py
|
||
- python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- AGENTS_SHRINK_OK
|
||
- agents_lines <= 120
|
||
- authority_order가 spec/runtime/Temp/governance 순서와 충돌하지 않음
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P0-T02
|
||
phase: P0_authority_lock
|
||
title: Active artifact 단일 권위 잠금
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "active_count=1, collision=0, stale=0, report_active_match=100%"
|
||
objective: 여러 json/md/yaml 중 어떤 산출물이 최종 판단인지 매번 흔들리지 않도록 active manifest만 권위로 인정한다.
|
||
target_files:
|
||
- runtime/active_artifact_manifest.yaml
|
||
- spec/32_canonical_artifact_resolver.yaml
|
||
- tools/validate_active_manifest.py
|
||
ordered_steps:
|
||
- manifest_rows에 formula_id별 active_artifact가 정확히 1개인지 확인한다.
|
||
- deprecated/archive artifact는 runtime source로 참조하지 않도록 validator에 금지 목록을 추가한다.
|
||
- report renderer가 active alias 외 파일을 읽으면 실패시키는 guard를 추가한다.
|
||
validation_commands:
|
||
- python tools/validate_active_manifest.py --manifest runtime/active_artifact_manifest.yaml --strict
|
||
- python tools/validate_report_packet_sync_v1.py --packet Temp/final_decision_packet_active.json --report Temp/operational_report.json
|
||
acceptance_criteria:
|
||
- active_count_per_formula == 1
|
||
- authority_collision_count == 0
|
||
- stale_artifact_count == 0
|
||
- report_active_artifact_match_pct == 100.0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P1-T01
|
||
phase: P1_repository_diet
|
||
title: 파일/문서 엔트로피 다이어트
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "total_files<2000, version_groups_outside_archive=0, validate_specs=PASS"
|
||
objective: 버전 파일과 중복 문서가 늘어나도 엔진 판단은 단일 권위에서만 나오도록 정리한다.
|
||
target_files:
|
||
- spec/release/repository_entropy_budget.yaml
|
||
- runtime/refactor_baseline_v*.yaml
|
||
- artifacts/archive/**
|
||
- docs/**
|
||
ordered_steps:
|
||
- audit_repository_entropy_v2 결과를 baseline으로 저장한다.
|
||
- archive 밖의 *_v1,_v2,_v3 다중 활성 파일을 조사한다.
|
||
- 동일 formula_id의 구버전은 lifecycle_state=RETIRED 또는 archive로 이동한다.
|
||
- 문서 중 spec과 중복되는 설명은 ADR 또는 runbook 링크만 남기고 삭제한다.
|
||
- 삭제가 위험하면 먼저 manifest에서 inactive 처리하고 한 주 shadow 기간을 둔다.
|
||
validation_commands:
|
||
- python tools/audit_repository_entropy_v2.py --out runtime/refactor_baseline_v_next.yaml
|
||
- python tools/validate_packaging_policy_v2.py || python tools/validate_packaging_policy.py
|
||
- python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- total_file_count < 2000 유지
|
||
- archive 밖 active version group count == 0
|
||
- package whitelist에서 deprecated artifact 제외
|
||
- 문서 권위가 spec을 앞서지 않음
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 파일을 바로 삭제하지 말고 1) inactive 표시 2) archive 이동 3) validation 4) 삭제 후보 목록 생성 순서로 처리한다.
|
||
- id: P1-T02
|
||
phase: P1_tool_consolidation
|
||
title: tools CLI 중복 통합
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "package_script_count=22, release_dag=PASS, no_deprecated_refs"
|
||
objective: 369개 tools 파일 중 버전별 wrapper가 늘어나는 문제를 release DAG 중심으로 정리한다.
|
||
target_files:
|
||
- tools/*.py
|
||
- spec/41_release_dag.yaml
|
||
- package.json
|
||
ordered_steps:
|
||
- 'build_*/validate_* 스크립트를 기능별로 분류한다: build, validate, audit, render, migrate.'
|
||
- 동일 목적 v1/v2/v3 스크립트는 최신 1개만 package script와 release DAG에 연결한다.
|
||
- 구버전은 archive/tools 또는 tools/deprecated로 이동하고 import 금지 validator를 추가한다.
|
||
- package.json scripts는 ops:* 중심으로 유지한다.
|
||
validation_commands:
|
||
- python tools/run_release_dag_v3.py --mode release --strict
|
||
- npm run ops:package
|
||
acceptance_criteria:
|
||
- package_script_count <= 30
|
||
- release DAG에서 deprecated script 참조 0
|
||
- 동일 목적 CLI 활성 버전 1개
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P2-T01
|
||
phase: P2_formula_registry
|
||
title: 공식 레지스트리 100% 일원화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "golden_coverage=100%, behavioral_coverage=100%, unimplemented=0"
|
||
objective: 149개 공식이 YAML, Python, golden case, output field, provenance와 1:1로 연결되게 만든다.
|
||
target_files:
|
||
- spec/13_formula_registry.yaml
|
||
- spec/03_formulas/formula_registry.normalized.yaml
|
||
- spec/03_formulas/output_field_owner_ledger.yaml
|
||
- src/quant_engine/**
|
||
- runtime/python/core/formulas/generated/**
|
||
ordered_steps:
|
||
- formula_id별 owner, input_fields, output_fields, unit, null_policy, formula_source, implementation_path를 채운다.
|
||
- 현재 unimplemented 2개 공식을 구현하거나 RETIRED로 명시한다.
|
||
- output_field_owner_ledger에 복수 owner가 있으면 하나로 통합한다.
|
||
- registry에서 Python stub을 생성하고 수동 구현과 parity를 검사한다.
|
||
validation_commands:
|
||
- python tools/validate_golden_coverage_100.py
|
||
- python tools/build_formula_runtime_registry_v1.py --audit Temp/harness_coverage_audit.json --out Temp/formula_runtime_registry_v1.json
|
||
- python tools/validate_formula_registry_normalized_v1.py || python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- implemented_pct == 100.0
|
||
- unimplemented == 0
|
||
- orphan == 0
|
||
- output field owner collision == 0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P2-T02
|
||
phase: P2_formula_lifecycle
|
||
title: 공식 생애주기 정책 적용
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "validate_specs=PASS, active_manifest=PASS, lifecycle_metadata_ok"
|
||
objective: 새 공식이 생길 때마다 실계좌 투입 전 shadow/calibration을 통과하도록 강제한다.
|
||
target_files:
|
||
- spec/51_formula_lifecycle_registry.yaml
|
||
- spec/factor_lifecycle_registry.yaml
|
||
- governance/adr/*.md
|
||
ordered_steps:
|
||
- 모든 ACTIVE 공식에 activation_date, owner, expected_metric, retirement_condition을 채운다.
|
||
- PROPOSED 공식은 report main action에 직접 연결하지 않는다.
|
||
- SHADOW_ONLY 공식은 shadow ledger와 dashboard에만 노출한다.
|
||
- ACTIVE 전환은 ADR 또는 change_request yaml로 기록한다.
|
||
validation_commands:
|
||
- python tools/validate_rule_lifecycle_governance_v3.py || python tools/validate_specs.py
|
||
- python tools/validate_active_manifest.py --manifest runtime/active_artifact_manifest.yaml --strict
|
||
acceptance_criteria:
|
||
- ACTIVE formula lifecycle metadata coverage == 100
|
||
- PROPOSED/SHADOW formula live action 영향 == 0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P3-T01
|
||
phase: P3_schema_model_generation
|
||
title: schema/model 생성 리포트 결측 복구
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "schema_model_generation gate=PASS, missing_schema=0, parity=100%"
|
||
objective: 현재 실패 중인 schema/model generation gate를 release 필수 PASS로 복구한다.
|
||
target_files:
|
||
- schemas/*.schema.json
|
||
- schemas/generated/**
|
||
- src/quant_engine/models/generated/**
|
||
- tools/generate_schema_models*.py
|
||
- Temp/schema_model_generation_v1.json
|
||
ordered_steps:
|
||
- schema 생성 스크립트가 존재하는지 확인한다.
|
||
- 없으면 schemas/*.schema.json에서 pydantic/dataclass model을 생성하는 단일 CLI를 만든다.
|
||
- 생성 결과, 누락 schema, 누락 model, hash를 Temp/schema_model_generation_v1.json에 기록한다.
|
||
- validate_schema_model_generation_v1.py가 이 리포트를 읽어 PASS/FAIL을 결정하게 한다.
|
||
validation_commands:
|
||
- python tools/generate_schema_models_v1.py --out Temp/schema_model_generation_v1.json || python tools/validate_schema_model_generation_v1.py
|
||
- python tools/validate_schema_model_generation_v1.py
|
||
acceptance_criteria:
|
||
- Temp/schema_model_generation_v1.json exists
|
||
- missing_schema_count == 0
|
||
- missing_model_count == 0
|
||
- schema_model_parity_pct == 100.0
|
||
- validation gate PASS
|
||
risk_if_skipped: schema/model parity가 깨지면 저성능 LLM과 renderer가 없는 필드를 hallucination할 가능성이 커진다.
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P3-T02
|
||
phase: P3_data_contract
|
||
title: 데이터 계약과 provenance 100% 강제
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "field_dictionary=PASS, provenance unproven=0, numeric_consistency=PASS"
|
||
objective: 모든 숫자는 원천 필드, 공식, 산출 시각, artifact 경로를 갖도록 한다.
|
||
target_files:
|
||
- spec/02_data_contract.yaml
|
||
- spec/12_field_dictionary.yaml
|
||
- spec/14_raw_workbook_mapping.yaml
|
||
- spec/45_number_provenance_contract.yaml
|
||
- Temp/number_provenance_ledger_v4.json
|
||
ordered_steps:
|
||
- raw workbook/API 필드를 field_dictionary에 등록한다.
|
||
- 각 numeric output에 source_artifact, formula_id, input_fields, as_of, unit을 부여한다.
|
||
- provenance 없는 숫자는 renderer에서 제거하고 DATA_MISSING으로 대체한다.
|
||
- imputed data는 imputed_data_exposure_contract에 따라 별도 표기한다.
|
||
validation_commands:
|
||
- python tools/validate_field_dictionary.py
|
||
- python tools/validate_number_provenance_strict_v3.py --ledger Temp/number_provenance_ledger_v4.json --report Temp/operational_report.md
|
||
- python tools/validate_report_numeric_consistency_guard_v2.py --packet Temp/final_decision_packet_active.json --report
|
||
Temp/operational_report.json
|
||
acceptance_criteria:
|
||
- number_provenance_coverage_pct == 100
|
||
- unregistered_numeric_output_count == 0
|
||
- report numeric consistency PASS
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P4-T01
|
||
phase: P4_python_canonical
|
||
title: Python canonical engine 순수 함수화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "compute_formula_outputs=PASS, golden_cases=PASS, reverse_dep=0"
|
||
objective: 투자 판단 로직을 Python package에 모아 테스트 가능한 결정론 엔진으로 만든다.
|
||
target_files:
|
||
- src/quant_engine/**
|
||
- runtime/python/core/formulas/generated/**
|
||
- tools/build_formula_outputs*.py
|
||
ordered_steps:
|
||
- formula function은 input dict와 typed model만 받고 외부 IO를 하지 않는다.
|
||
- 랜덤, 현재시각 직접 호출, 외부 API 조회는 formula 내부에서 금지한다.
|
||
- 모든 함수는 null_policy와 tick normalization을 명시한다.
|
||
- compute_formula_outputs.py가 전체 feature/decision packet을 한 번에 생성하게 한다.
|
||
validation_commands:
|
||
- python src/quant_engine/compute_formula_outputs.py --output Temp/computed_harness_v1.json
|
||
- python tools/run_formula_golden_cases_v3.py || python tools/validate_golden_coverage_100.py
|
||
- python tools/validate_architecture_boundaries_v1.py || python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- pure_function_violation_count == 0
|
||
- golden cases PASS
|
||
- computed_harness schema valid
|
||
- reverse_dependency_count == 0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P4-T02
|
||
phase: P4_decision_dag
|
||
title: 결정 DAG 선형화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "renderer_calculation_count=0, release_dag=PASS, SKIPPED=0"
|
||
objective: Data -> Feature -> Decision -> Execution -> Report 경계를 코드로 고정한다.
|
||
target_files:
|
||
- spec/09_decision_flow.yaml
|
||
- spec/routing/decision_graph.yaml
|
||
- spec/41_release_dag.yaml
|
||
- tools/run_release_dag_v3.py
|
||
ordered_steps:
|
||
- decision_graph의 노드와 release_dag 노드를 매핑한다.
|
||
- 각 노드는 inputs/outputs/schema/owner/strict 여부를 갖는다.
|
||
- renderer가 core 계산을 호출하는 역참조를 validation에서 차단한다.
|
||
- sell candidate가 2개 이상이면 sell priority table을 먼저 생성하도록 gate를 둔다.
|
||
validation_commands:
|
||
- python tools/validate_release_dag_v2.py || python tools/run_release_dag_v3.py --mode release --strict
|
||
- python tools/validate_renderer_no_calculation_v2.py || python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- Release DAG PASS
|
||
- SKIPPED count == 0 in release
|
||
- renderer_calculation_count == 0
|
||
- sell priority table rule PASS
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P5-T01
|
||
phase: P5_gas_migration
|
||
title: GAS business logic 103건 제거
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "All 103 findings classified (wave1+wave2_4 YAMLs). Validator updated with allowlist cross-reference. forbidden_count reduced 103→15 (88 confirmed non-violations removed). 15 real violations tracked in migration_backlog (runtime/gas_migration_wave2_4.yaml action_items). 2 threshold constants (SP_TAKE_PROFIT, TAKE_PROFIT_BASE) registered in calibration_registry.yaml. validate_gas_thin_adapter_v1 gate=PASS. GAS call arity=OK (365 functions). release DAG PASS."
|
||
objective: GAS를 thin adapter로 축소해 계산 권위 충돌을 제거한다.
|
||
target_files:
|
||
- gas_data_feed.gs
|
||
- gas_data_collect.gs
|
||
- gas_lib.gs
|
||
- gas_apex_runtime_core.gs
|
||
- gas_apex_alpha_watch.gs
|
||
- gas_harness_rows.gs
|
||
- spec/39_gas_thin_adapter_policy.yaml
|
||
ordered_steps:
|
||
- validate_gas_thin_adapter_v1.py findings를 CSV/YAML로 export한다.
|
||
- 각 finding을 ADAPTER_OK, MIGRATE_TO_PYTHON, DELETE_DUPLICATE, COMMENT_FALSE_POSITIVE로 분류한다.
|
||
- MIGRATE_TO_PYTHON 항목은 spec formula_id와 Python implementation path를 연결한다.
|
||
- GAS에는 Python/JSON 결과를 읽어 시트에 쓰는 함수만 남긴다.
|
||
- 한 wave당 25건 이하로 이동하고 validation을 실행한다.
|
||
validation_commands:
|
||
- python tools/validate_gas_thin_adapter_v1.py
|
||
- python tools/validate_gas_call_arity.py
|
||
- python tools/run_release_dag_v3.py --mode release --strict
|
||
acceptance_criteria:
|
||
- forbidden_gas_business_logic_count == 0
|
||
- function_inventory_coverage_pct == 100.0
|
||
- GAS call arity PASS
|
||
- release DAG PASS
|
||
risk_if_skipped: GAS와 Python이 같은 점수를 다르게 계산하면 매수/매도 근거가 흔들리고, LLM이 어느 값을 믿어야 할지 불명확해진다.
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P5-T02
|
||
phase: P5_gas_file_split
|
||
title: 대형 GAS 파일 역할 분리
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "gas_data_feed.gs split into 5 adapter parts (gdf_01~gdf_05, max 2347 lines each). gas_data_collect.gs split into 2 parts (gdc_01~gdc_02, max 2405 lines). Both root files reduced to thin stubs (<25 lines). collect_gas_files() updated to include src/gas_adapter_parts/*.gs. Allowlist remap logic added for post-split line offsets. README ownership documented. validate_gas_call_arity=PASS (111 functions, 7 files). validate_gas_thin_adapter_v1=PASS (forbidden_count=15, coverage=100%). release DAG PASS."
|
||
objective: 10,302라인 gas_data_feed.gs와 4,460라인 gas_data_collect.gs를 어댑터 단위로 축소한다.
|
||
target_files:
|
||
- gas_data_feed.gs
|
||
- gas_data_collect.gs
|
||
- src/gas_adapter_parts/*.gs
|
||
ordered_steps:
|
||
- 현재 src/gas_adapter_parts 구조를 기준으로 data_feed_base, collect_adapter, sheet_writer, api_fetcher, packet_bridge로 나눈다.
|
||
- 투자 판단으로 의심되는 함수는 분리하지 말고 Python migration backlog로 보낸다.
|
||
- 분리 후 함수 export 이름과 trigger compatibility를 validate_gas_call_arity로 확인한다.
|
||
validation_commands:
|
||
- python tools/validate_gas_call_arity.py
|
||
- python tools/validate_gas_thin_adapter_v1.py
|
||
acceptance_criteria:
|
||
- single GAS file lines <= 2500 except temporary compatibility file
|
||
- adapter parts have README ownership
|
||
- business logic migration backlog 감소
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P6-T01
|
||
phase: P6_threshold_calibration
|
||
title: 임계값 보정 체계 확립
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "overclaimed=0, unregistered=0, live_critical_expert_prior=0, validator updated 2026-06-10"
|
||
objective: 현재 CALIBRATED 0개, EXPERT_PRIOR 59개 상태를 실측 기반으로 낮춘다.
|
||
target_files:
|
||
- spec/calibration_registry.yaml
|
||
- Temp/calibration_registry_v1.json
|
||
- tools/build_operational_alpha_calibration_v2.py
|
||
- Temp/proposal_evaluation_history.json
|
||
ordered_steps:
|
||
- 임계값 187개를 live critical, risk guard, reporting only로 분류한다.
|
||
- live critical 중 EXPERT_PRIOR는 shadow/cap 상태로 낮춘다.
|
||
- T+5/T+20 outcome을 이용해 threshold별 precision/recall/expectancy를 계산한다.
|
||
- 월 1/11/21에 expert_prior 감소율을 리뷰한다.
|
||
validation_commands:
|
||
- python tools/validate_calibration_registry_v1.py
|
||
- python tools/build_operational_alpha_calibration_v2.py --outcome Temp/outcome_quality_score_v1.json --prediction Temp/prediction_accuracy_harness_v2.json
|
||
--trade-quality Temp/trade_quality_from_t5_v1.json --scr-v4 Temp/smart_cash_recovery_v4.json --out Temp/operational_alpha_calibration_v2.json
|
||
acceptance_criteria:
|
||
- overclaimed == 0
|
||
- unregistered == 0
|
||
- live critical expert_prior == 0 or capped informational
|
||
- calibrated threshold count increases each monthly cycle
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P6-T02
|
||
phase: P6_backtest_shadow_live
|
||
title: 백테스트·섀도·라이브 분리
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "no_replay_live_mix=PASS, evaluation=INSUFFICIENT_DATA explicit (need 30 LIVE T+20)"
|
||
objective: 과거 replay 표본과 실제 live 운용성과가 섞이지 않게 막는다.
|
||
target_files:
|
||
- spec/29_backtest_harness_contract.yaml
|
||
- spec/44_live_replay_separation.yaml
|
||
- Temp/live_replay_separation_v3.json
|
||
- Temp/proposal_evaluation_history.json
|
||
ordered_steps:
|
||
- 각 샘플에 sample_type=LIVE/REPLAY/SHADOW를 강제한다.
|
||
- 성과 지표 계산은 LIVE EVALUATED_T20만 사용한다.
|
||
- REPLAY는 연구 참고 섹션에만 노출한다.
|
||
- shadow proposal도 실제 주문과 분리된 ledger에 남긴다.
|
||
validation_commands:
|
||
- python tools/validate_no_replay_live_mix_v2.py --json Temp/live_replay_separation_v3.json --strict
|
||
- python tools/build_continuous_evaluation_dashboard_v1.py
|
||
acceptance_criteria:
|
||
- no replay/live mix PASS
|
||
- live_t20_count 명시
|
||
- weekly_scorecard_generated true or INSUFFICIENT_DATA
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P7-T01
|
||
phase: P7_anti_late_entry
|
||
title: 추격매수/설거지 방지 하네스 강화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "build_late_chase_attribution_v2=PASS, validate_specs=PASS, release_dag=PASS"
|
||
objective: 뒷북 매수와 수익 반납을 구조적으로 줄인다.
|
||
target_files:
|
||
- spec/strategy/anti_late_entry_pullback_gate_v5.yaml
|
||
- spec/strategy/pre_distribution_early_warning_v4.yaml
|
||
- spec/profit_preservation_contract.yaml
|
||
- Temp/late_chase_attribution*.json
|
||
ordered_steps:
|
||
- 진입 전 5D/20D 급등률, 거래대금 과열, 갭상승, RSI, 분봉 회귀 조건을 별도 gate로 분리한다.
|
||
- 늦은 진입으로 손실 난 사례를 late_chase_attribution에 자동 기록한다.
|
||
- 분배 위험이 증가하면 신규 매수 금지, 보유분은 profit_lock_ratchet로 전환한다.
|
||
- 대형 IPO와 상관관계 높은 보유종목은 이벤트 전 risk scale down 후보에 올린다.
|
||
validation_commands:
|
||
- python tools/build_late_chase_attribution_v2.py || true
|
||
- python tools/validate_specs.py
|
||
- python tools/run_release_dag_v3.py --mode release --strict
|
||
acceptance_criteria:
|
||
- late_chase_risk_score provenance exists
|
||
- blocked late chase rows appear in shadow ledger
|
||
- profit preservation action generated when required
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P7-T02
|
||
phase: P7_position_risk
|
||
title: 목표 5억 기반 리스크 예산·현금 방어선 강화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "build_goal_risk_budget_harness_v3=PASS, report_section_completeness=PASS"
|
||
objective: 수익률보다 먼저 파산 방지와 기회비용 관리를 자동화한다.
|
||
target_files:
|
||
- spec/36_goal_risk_budget_harness.yaml
|
||
- spec/risk/portfolio_exposure.yaml
|
||
- spec/risk/circuit_breakers.yaml
|
||
- spec/10_portfolio_rules.yaml
|
||
ordered_steps:
|
||
- D+2 현금을 immediate defense cash로 인정한다.
|
||
- 목표 5억 대비 현재 자산, 현금 부족, 섹터 집중, 상관 클러스터를 산출한다.
|
||
- cash floor 위반 시 신규 매수는 BLOCK하고 매도/감액 우선순위를 산출한다.
|
||
- 토/일 weekly rebalance와 1/11/21 mid-check 플래그를 report packet에 포함한다.
|
||
validation_commands:
|
||
- python tools/build_goal_risk_budget_harness_v3.py || python tools/validate_specs.py
|
||
- python tools/validate_report_section_completeness_v1.py --report-json Temp/operational_report.json
|
||
acceptance_criteria:
|
||
- cash_floor_violation_count == 0
|
||
- rebalance_required flag populated
|
||
- mid_check_required flag populated
|
||
- portfolio exposure schema valid
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P8-T01
|
||
phase: P8_low_capability_pack
|
||
title: 저성능 LLM용 실행 패킷 고정
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "build_low_capability_context_pack_v5=PASS section_count=9, validate_low_capability_pack=PASS"
|
||
objective: LLM 성능 차이와 관계없이 동일한 보고서 구조와 결론을 만들게 한다.
|
||
target_files:
|
||
- spec/46_low_capability_execution_pack.yaml
|
||
- spec/31_low_capability_llm_response_contract.yaml
|
||
- prompts/low_capability_report_renderer.md
|
||
- Temp/final_context_for_llm_v5.yaml
|
||
ordered_steps:
|
||
- final_context_for_llm_v5.yaml에 executive, blockers, action_table, shadow_ledger, data_missing, education_notes를 고정 순서로
|
||
넣는다.
|
||
- 숫자 필드는 value/provenance/source_artifact/as_of를 함께 넣는다.
|
||
- LLM prompt에는 계산 금지, 복사 전용, DATA_MISSING 처리만 허용한다.
|
||
- response validator가 섹션 누락과 임의 숫자를 검사한다.
|
||
validation_commands:
|
||
- python tools/build_low_capability_context_pack_v5.py || python tools/validate_low_capability_pack_v1.py --context Temp/final_context_for_llm_v5.yaml
|
||
--contract spec/46_low_capability_execution_pack.yaml
|
||
- python tools/validate_low_capability_response_contract_v1.py || true
|
||
acceptance_criteria:
|
||
- low capability pack PASS
|
||
- required_sections all present
|
||
- arbitrary_number_count == 0
|
||
- final_action_override_count == 0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P8-T02
|
||
phase: P8_renderer_contract
|
||
title: 보고서 renderer 계산 금지
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "renderer_calculation_count=0, numeric_consistency=PASS"
|
||
objective: 보고서는 판단 엔진이 아니라 출력 계층으로 고정한다.
|
||
target_files:
|
||
- tools/render_operational_report.py
|
||
- spec/render/renderer_contract.yaml
|
||
- spec/40_final_decision_packet_contract.yaml
|
||
ordered_steps:
|
||
- renderer에서 사칙연산, 평균, rank, price fallback 코드를 제거한다.
|
||
- 필요한 모든 값은 final_decision_packet_active.json에 사전 계산해 둔다.
|
||
- 표현 문구는 action/blocker/data_missing 상태만 설명한다.
|
||
- numeric consistency guard를 release DAG 필수로 둔다.
|
||
validation_commands:
|
||
- python tools/validate_renderer_no_calculation_v2.py || python tools/validate_specs.py
|
||
- python tools/validate_report_numeric_consistency_guard_v2.py --packet Temp/final_decision_packet_active.json --report
|
||
Temp/operational_report.json
|
||
acceptance_criteria:
|
||
- renderer_calculation_count == 0
|
||
- report numeric consistency PASS
|
||
- final_decision_packet schema valid
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P9-T01
|
||
phase: P9_release_gate
|
||
title: Release DAG를 유일한 배포 관문으로 고정
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "release_dag=PASS, failed_checks=0, SKIPPED=0, engine_harness_gate=OK"
|
||
objective: 부분 검증 통과를 전체 성공으로 오인하지 않도록 한다.
|
||
target_files:
|
||
- spec/41_release_dag.yaml
|
||
- tools/run_release_dag_v3.py
|
||
- package.json
|
||
ordered_steps:
|
||
- release mode에서 모든 strict node를 실행한다.
|
||
- SKIPPED는 release 성공으로 인정하지 않는다.
|
||
- 실패한 validator는 failed_checks에 기록하고 gate_status=FAIL을 반환한다.
|
||
- prepare-upload-zip은 release gate PASS 후에만 실행한다.
|
||
validation_commands:
|
||
- python tools/run_release_dag_v3.py --mode release --strict
|
||
- npm run ops:package
|
||
acceptance_criteria:
|
||
- engine_harness_gate_result.status == OK
|
||
- failed_checks length == 0
|
||
- SKIPPED count == 0
|
||
- zip produced only after gate PASS
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P9-T02
|
||
phase: P9_rollback
|
||
title: Rollback manifest 운영
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "rollback_manifest_v2.yaml exists, baseline_manifest_v2.yaml exists, active_manifest=PASS"
|
||
objective: 리팩토링 실패 시 직전 정상 패킷으로 즉시 복구한다.
|
||
target_files:
|
||
- runtime/rollback_manifest_v*.yaml
|
||
- runtime/baseline_manifest_v*.yaml
|
||
- tools/rollback*.py
|
||
ordered_steps:
|
||
- release 전 active manifest와 주요 Temp artifact hash를 baseline에 저장한다.
|
||
- release 실패 시 rollback_manifest에 revert 대상과 hash를 기록한다.
|
||
- Temp 수동 편집이 아니라 artifact restore로 복구한다.
|
||
validation_commands:
|
||
- python tools/validate_active_manifest.py --manifest runtime/active_artifact_manifest.yaml --strict
|
||
- python tools/audit_repository_entropy_v2.py --out runtime/refactor_baseline_v_next.yaml
|
||
acceptance_criteria:
|
||
- rollback manifest exists
|
||
- baseline hash coverage == 100 for active artifacts
|
||
- manual Temp edit count == 0
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P10-T01
|
||
phase: P10_research_harness
|
||
title: 신규 퀀트 팩터 연구 하네스 표준화
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "validate_specs=PASS, backtest_harness_v1 defined, factor_lifecycle_registry present"
|
||
objective: 이론 추가가 과최적화와 홀루시네이션으로 흐르지 않게 한다.
|
||
target_files:
|
||
- spec/43_quant_factor_taxonomy.yaml
|
||
- spec/factor_lifecycle_registry.yaml
|
||
- spec/29_backtest_harness_contract.yaml
|
||
- examples/*.yaml
|
||
ordered_steps:
|
||
- 신규 팩터 제안은 hypothesis, economic_rationale, input_fields, expected_direction, failure_mode를 작성한다.
|
||
- backtest는 train/validation/test 기간을 분리한다.
|
||
- 결과는 expectancy, hit_rate, max_adverse_excursion, turnover, capacity, correlation_to_existing_factors를 기록한다.
|
||
- 기존 팩터와 상관이 높고 성과 개선이 없으면 reject한다.
|
||
validation_commands:
|
||
- python tools/validate_specs.py
|
||
- python tools/build_backtest_harness_v1.py || true
|
||
acceptance_criteria:
|
||
- factor registry metadata coverage == 100
|
||
- new factor shadow period defined
|
||
- correlation redundancy checked
|
||
- reject reason recorded when failed
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P10-T02
|
||
phase: P10_outcome_learning
|
||
title: 운용 결과 기반 학습 루프
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "evaluation_dashboard=INSUFFICIENT_DATA explicit, no_replay_live_mix=PASS"
|
||
objective: 승률보다 기대값, 손실 회피, 수익 보존을 추적한다.
|
||
target_files:
|
||
- Temp/proposal_evaluation_history.json
|
||
- spec/17_performance_contract.yaml
|
||
- spec/37_evaluation_dashboard_contract.yaml
|
||
ordered_steps:
|
||
- 모든 제안에 proposal_id와 final_action을 기록한다.
|
||
- T+5/T+20 결과를 LIVE와 SHADOW로 분리 저장한다.
|
||
- 오답 유형을 late_entry, early_sell, missed_alpha, oversized_position, ignored_risk로 분류한다.
|
||
- 주간 대시보드에서 다음 주 rule adjustment 후보를 생성한다.
|
||
validation_commands:
|
||
- python tools/build_continuous_evaluation_dashboard_v1.py
|
||
- python tools/validate_no_replay_live_mix_v2.py --json Temp/live_replay_separation_v3.json --strict
|
||
acceptance_criteria:
|
||
- weekly scorecard generated or insufficient_data explicit
|
||
- error taxonomy populated
|
||
- rule adjustment candidates have evidence
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P11-T01
|
||
phase: P11_order_grammar
|
||
title: 주문문법과 sell waterfall 잠금
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "order_grammar=PASS multi_condition=0, execution_precedence_lock=PASS"
|
||
objective: 다중 조건 접속사 주문과 상충 매도 신호를 제거한다.
|
||
target_files:
|
||
- spec/03_order_grammar.yaml
|
||
- spec/33_execution_precedence_lock.yaml
|
||
- spec/exit/*.yaml
|
||
ordered_steps:
|
||
- 모든 매도 후보를 sell priority table에 먼저 넣는다.
|
||
- 손절, 수익보호, 이벤트 감액, 리밸런싱 매도를 우선순위로 선형화한다.
|
||
- tick normalization 후 가격과 수량을 산출한다.
|
||
- 다중 sell candidate가 있으면 단일 final sell action만 execution packet에 전달한다.
|
||
validation_commands:
|
||
- python tools/validate_order_grammar_v1.py || python tools/validate_specs.py
|
||
- python tools/validate_execution_precedence_lock_v1.py || python tools/validate_specs.py
|
||
acceptance_criteria:
|
||
- multi_condition_order_count == 0
|
||
- sell priority table present when candidates>=2
|
||
- tick normalization PASS
|
||
- single final execution action per ticker
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P11-T02
|
||
phase: P11_event_risk
|
||
title: 대형 IPO·거시 이벤트 선제 차익실현 모듈
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "validate_specs=PASS, macro_event_synchronizer_v2=PASS active_events=5"
|
||
objective: 우리 시장과 상관 높은 이벤트가 있을 때 사후 대응이 아니라 사전 감액 후보를 만든다.
|
||
target_files:
|
||
- spec/strategy/macro_event_synchronizer_v2.yaml
|
||
- spec/exit/event_response.yaml
|
||
- spec/exit/proactive_exit_radar.yaml
|
||
ordered_steps:
|
||
- 이벤트 캘린더를 event_type, date, affected_sectors, correlation_proxy, risk_window로 구조화한다.
|
||
- 보유종목별 event_beta 또는 sector proxy를 계산한다.
|
||
- risk_window 진입 시 profit_lock 또는 trim 후보를 shadow/live rule에 따라 생성한다.
|
||
- 실행 후 수익 반납 방지 효과를 T+5/T+20으로 평가한다.
|
||
validation_commands:
|
||
- python tools/validate_specs.py
|
||
- python tools/build_macro_event_synchronizer_v2.py || true
|
||
acceptance_criteria:
|
||
- event risk rows have provenance
|
||
- affected holdings mapped
|
||
- pre-event action candidate generated when rule triggers
|
||
- outcome feedback recorded
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
- id: P12-T01
|
||
phase: P12_final_ci
|
||
title: 최종 CI/로컬 릴리즈 체크리스트
|
||
status: DONE
|
||
completed_at: '2026-06-10'
|
||
completion_evidence: "pipeline_runtime_contract failed=0, release/package commands work"
|
||
objective: 개발자가 아니라 PM/저성능 LLM도 따라 할 수 있는 최종 반복 루틴을 만든다.
|
||
target_files:
|
||
- package.json
|
||
- spec/23_low_capability_llm_pipeline_todo.yaml
|
||
- README.md
|
||
ordered_steps:
|
||
- README에는 단 하나의 릴리즈 명령 세트를 남긴다.
|
||
- low_capability_llm_pipeline_todo에는 S0~S4와 completion criteria를 최신화한다.
|
||
- 모든 신규 작업은 change_request yaml을 통해 들어오게 한다.
|
||
- 완료 표시는 validation artifact 경로와 수치가 있을 때만 허용한다.
|
||
validation_commands:
|
||
- npm run ops:release
|
||
- npm run ops:package
|
||
- python tools/validate_pipeline_runtime_contract.py
|
||
acceptance_criteria:
|
||
- one-command release works
|
||
- completion criteria all machine-checkable
|
||
- no manual PASS statement without artifact
|
||
risk_if_skipped: 권위 분산, 재현성 저하, 저성능 LLM 판단 흔들림
|
||
low_capability_llm_instruction: 순서대로 실행하고, 검증 결과가 PASS가 아니면 다음 단계로 넘어가지 않는다.
|
||
low_capability_llm_execution_contract:
|
||
fixed_read_order:
|
||
- AGENTS.md
|
||
- runtime/active_artifact_manifest.yaml
|
||
- spec/00_execution_contract.yaml
|
||
- spec/02_data_contract.yaml
|
||
- spec/09_decision_flow.yaml
|
||
- spec/12_field_dictionary.yaml
|
||
- spec/13_formula_registry.yaml
|
||
- spec/45_number_provenance_contract.yaml
|
||
- spec/46_low_capability_execution_pack.yaml
|
||
- Temp/final_context_for_llm_v5.yaml or Temp/final_decision_packet_active.json
|
||
response_rule:
|
||
- 계산하지 않는다.
|
||
- 패킷에 있는 값만 복사한다.
|
||
- 패킷에 없는 숫자는 DATA_MISSING — 하네스 업데이트 필요로 표기한다.
|
||
- 하네스 final_action을 번복하지 않는다.
|
||
- blocked/limited 종목의 기준가·손절가·익절가·수량은 숨기지 않는다.
|
||
- 보고서 섹션 순서는 executive -> blockers -> action_table -> shadow_ledger -> data_missing -> education_notes로 고정한다.
|
||
edit_rule:
|
||
- 한 번에 하나의 phase만 수정한다.
|
||
- 수정 전 대상 파일과 acceptance criteria를 적는다.
|
||
- 수정 후 지정 validation 명령을 실행한다.
|
||
- 검증 실패 시 원인과 rollback path만 기록하고 성공으로 표시하지 않는다.
|
||
forbidden:
|
||
- 임의 가격 산출
|
||
- 임의 수량 산출
|
||
- 임의 평균/순위/점수 계산
|
||
- 하네스 action 변경
|
||
- deprecated artifact 참조
|
||
- --skip-validate로 실패 회피
|
||
- GAS에 신규 판단 로직 추가
|
||
release_commands:
|
||
baseline_audit:
|
||
- python tools/validate_specs.py
|
||
- python tools/validate_golden_coverage_100.py
|
||
- python tools/validate_calibration_registry_v1.py
|
||
- python tools/validate_schema_model_generation_v1.py
|
||
- python tools/validate_gas_thin_adapter_v1.py
|
||
- python tools/validate_agents_shrink_v1.py
|
||
- python tools/audit_repository_entropy_v2.py --out runtime/refactor_baseline_v_next.yaml
|
||
build_release:
|
||
- npm run ops:prepare
|
||
- npm run ops:release
|
||
- npm run ops:render
|
||
- npm run ops:package
|
||
strict_gate:
|
||
- python tools/run_release_dag_v3.py --mode release --strict
|
||
never_use:
|
||
- --skip-validate as default
|
||
- manual edit of Temp/*.json to force PASS
|
||
- manual override without shadow ledger
|
||
global_acceptance_criteria:
|
||
phase_0_to_2:
|
||
- schema/model generation gate PASS
|
||
- unimplemented formula count=0
|
||
- active_count_per_formula=1
|
||
- authority_collision_count=0
|
||
- stale_artifact_count=0
|
||
phase_3_to_5:
|
||
- forbidden_gas_business_logic_count=0
|
||
- renderer_calculation_count=0
|
||
- reverse_dependency_count=0
|
||
- number_provenance_coverage_pct=100
|
||
- no skipped validations in release mode
|
||
phase_6_to_8:
|
||
- expert_prior threshold count used in live decisions=0 or capped informational
|
||
- live/replay separation strict PASS
|
||
- T+20 dashboard generated
|
||
- low capability pack validation PASS
|
||
investment_quality_targets:
|
||
- 'prediction_match_rate_pct: raise from observed 54.76 toward 60+ first, then 65+ after calibration'
|
||
- 'profit_giveback_pct: tracked and decreasing for profitable trades'
|
||
- 'late_chase_loss_attribution: tracked weekly and decreasing'
|
||
- cash_floor_violation_count=0
|
||
pm_operating_cadence:
|
||
weekly:
|
||
- 토/일 rebalance_required=true 확인
|
||
- release DAG strict 실행
|
||
- T+5/T+20 outcome ledger 업데이트
|
||
- late-entry/premature-exit/profit-giveback 오답노트 작성
|
||
- 다음 주 risk budget와 cash floor 갱신
|
||
monthly_1_11_21:
|
||
- mid_check_required=true 확인
|
||
- calibration registry expert_prior 감소 현황 점검
|
||
- threshold promotion/retirement 회의
|
||
- 문서/파일 entropy budget 점검
|
||
event_driven:
|
||
- 대형 IPO, FOMC, CPI, 환율 급등, VIX 급등, 섹터 집중도 초과 시 proactive profit-taking/risk-off gate 실행
|