ee3e799de1
주요 변경: - tools/build_rebalance_engine_v1.py: REBALANCE_ENGINE_V1 신규 * account_snapshot 직접 합산(_build_snap_position_map) → 소수주 분리 행 병합 * 레짐 소스 macro.REGIME_PRELIM 최우선 (GAS 와 동일) - src/gas_adapter_parts/gdf_06_rebalance.gs: runRebalanceSheet_() 신규 * Logger.log / getSpreadsheet_() 로 run_all 연동 수정 - src/gas_adapter_parts/gdc_01_fetch_fundamentals.gs * _mergePositionRecord_(): 소수주 중복 행 합산 신규 * parseInt → parseFloat (qty, availQty) - src/gas_adapter_parts/gdf_01_price_metrics.gs * 미보유 종목 SELL_READY → WATCH_EXIT_SIGNAL - spec/41_release_dag.yaml: build_rebalance_sheet 노드 추가 (step_count 63) - spec/51_formula_lifecycle_registry.yaml: REBALANCE_ENGINE_V1 등록 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1298 lines
60 KiB
YAML
1298 lines
60 KiB
YAML
meta:
|
|
schema_version: quant_engine_refactor_todo.v1
|
|
formula_id: QEDD_REFACTOR_TODO_V1
|
|
title: 퀀트투자 엔진 구조적 리팩토링 실행계획
|
|
generated_at_kst: '2026-06-07T18:24:13+09:00'
|
|
target_engine: 은퇴자산포트폴리오 / 자산 투자 포트폴리오
|
|
role_assumption: 30년 퀀트투자자 + 개발자 + 아키텍트 + PM 관점
|
|
user_goal: 목표금액 5억, 주간 제안 기본, 토/일 리밸런싱, 매월 1/11/21 중간점검
|
|
source_zip_sha256: c05591f833698d8beb24934031cdbc0d576a6c9617c7566dba001d0f741a2f17
|
|
source_basis:
|
|
- AGENTS.md
|
|
- governance/rules/*.yaml
|
|
- spec/*.yaml
|
|
- runtime/active_artifact_manifest.yaml
|
|
- runtime/refactor_baseline_v1.yaml
|
|
- Temp/engine_harness_gate_result.json
|
|
- Temp/strategy_hardening_harness_v2.json
|
|
- Temp/formula_runtime_registry_v1.json
|
|
- Temp/pipeline_runtime_profile_v1.json
|
|
- spec/41_release_dag.yaml
|
|
- spec/48_module_io_contract_registry.yaml
|
|
source_file_policy:
|
|
allowed_human_edited_source_extensions:
|
|
- .md
|
|
- .yaml
|
|
- .py
|
|
- .gs
|
|
generated_or_runtime_extensions_allowed:
|
|
- .json
|
|
- .jsonl
|
|
- .schema.json
|
|
principle: 사람이 고치는 권위 파일은 md/yaml/py/gs로 제한하고, json은 산출물·스키마·패킷으로만 취급한다.
|
|
executive_decision:
|
|
recommended_methodology: 'QEDD: Quant Evidence-Driven Deterministic Development'
|
|
one_sentence: 새 알고리즘은 YAML 계약과 증거 하네스가 먼저 통과한 뒤 Python canonical로 구현하고, GAS는 얇은
|
|
어댑터, LLM은 복사 렌더러로만 사용한다.
|
|
decision: 현재 구조는 방향은 맞지만 운영성공 엔진으로 보기에는 성과검증·릴리즈 게이트·아키텍처 경계가 아직 미완성이다. 기능 추가보다
|
|
경계·검증·문서 다이어트가 우선이다.
|
|
priority_order:
|
|
- P0 릴리즈 게이트를 SKIPPED에서 OK로 되돌린다.
|
|
- P1 active/canonical artifact alias 버전 드리프트를 제거한다.
|
|
- P2 architecture boundary validator를 spec 목표와 일치시킨다.
|
|
- P3 low-capability LLM용 context pack v5를 실제 산출물로 고정한다.
|
|
- P4 신규 알파/전략은 live T+20 표본 30개 전에는 ACTIVE 금지한다.
|
|
- P5 GAS business logic을 Python canonical로 이전하고 GAS는 fetch/write adapter로 제한한다.
|
|
baseline_assessment:
|
|
repository_metrics_observed_from_zip:
|
|
observed_file_count_in_unzipped_package: 1438
|
|
extension_counts_top:
|
|
py: 839
|
|
json: 374
|
|
yaml: 171
|
|
md: 39
|
|
gs: 8
|
|
ps1: 4
|
|
jsonl: 2
|
|
js: 1
|
|
runtime_refactor_baseline_total_file_count: 1906
|
|
runtime_refactor_baseline_package_script_count: 22
|
|
runtime_refactor_baseline_temp_json_count: 411
|
|
entropy_budget:
|
|
schema_version: repository_entropy_budget.v1
|
|
max_total_files: 2000
|
|
max_package_scripts: 220
|
|
max_temp_json_files: 500
|
|
max_docs_lines: 120000
|
|
release_budget_notes:
|
|
- archive stale Temp JSONs when safe
|
|
- keep package scripts within release envelope
|
|
current_pass_points:
|
|
active_manifest_report_match_pct: 100.0
|
|
active_manifest_authority_collision_count: 0
|
|
active_manifest_stale_artifact_count: 0
|
|
engine_harness_status: OK
|
|
engine_harness_failed_checks_count: 0
|
|
formula_runtime_coverage_pct: 100.0
|
|
formula_unmapped_count: 0
|
|
strategy_control_score: 92.73
|
|
data_quality_conflict_flag: false
|
|
critical_gaps_to_fix_before_more_algorithm_expansion:
|
|
- gap_id: GAP-001-release-profile-skipped-validation
|
|
evidence:
|
|
Temp/pipeline_runtime_profile_v1.json.gate_status: SKIPPED
|
|
Temp/pipeline_runtime_profile_v1.json.runtime_context.skip_validate: true
|
|
elapsed_sec_total: 2.471
|
|
risk: 릴리즈 모드라는 이름으로 zip만 만들면 저성능 LLM/운영자가 검증 통과로 오인한다.
|
|
fix: release 모드에서는 skip_validate=false를 강제하고, package-only만 SKIPPED 허용.
|
|
- gap_id: GAP-002-architecture-boundary-contract-drift
|
|
evidence:
|
|
spec/34_expected_renderer_calculation_count: 0
|
|
spec/34_expected_reverse_dependency_count: 0
|
|
observed_validate_architecture_boundaries_v2_stdout: renderer_calculation_count=288,
|
|
reverse_dependency_count=7, gate=PASS
|
|
risk: 검증기가 목표값과 다르게 PASS를 낼 수 있으면 아키텍처 하네스의 신뢰가 무너진다.
|
|
fix: validator를 spec/34의 contracts와 직접 비교하도록 고정하고 위반 시 FAIL.
|
|
- gap_id: GAP-003-active-canonical-version-drift
|
|
evidence:
|
|
active_manifest_manifest_rows_contains: smart_cash_recovery_v7
|
|
artifacts/canonical_manifest.yaml_points_to: smart_cash_recovery_v9
|
|
active_manifest_report_authority_diff_count: 0
|
|
risk: 권위 alias가 여러 버전을 동시에 말하면 같은 숫자라도 출처 신뢰가 흔들린다.
|
|
fix: canonical resolver가 active_manifest를 재생성하고 deprecated 버전 runtime read를 차단.
|
|
- gap_id: GAP-004-low-capability-context-version-mismatch
|
|
evidence:
|
|
release_dag_expected_output: Temp/final_context_for_llm_v5.yaml
|
|
package_observed_context_file: Temp/final_context_for_llm_v4.yaml
|
|
risk: 저성능 LLM이 읽을 단일 packet이 없으면 다시 원본 여러 파일을 읽으며 환각과 판단 번복이 증가한다.
|
|
fix: v5 context pack을 생성·검증·패키징하고 v4는 deprecated 처리.
|
|
- gap_id: GAP-005-performance-readiness-not-active
|
|
evidence:
|
|
overall_hardening_score: 68.22
|
|
truth_hardening_score: 68.22
|
|
readiness_gate: WATCH_PENDING_SAMPLE
|
|
prediction_match_rate_pct: 45.68
|
|
algorithm_guidance_proof: 56.4
|
|
operational_t20_count: 0.0
|
|
cash_recovery_value_damage_pct: 12.5
|
|
readiness_reasons:
|
|
- DATA_INTEGRITY_LOCK_NOT_PASS_100
|
|
- OPERATIONAL_T20_SAMPLE_LT_30
|
|
- OPERATIONAL_T20_PASS_LT_60
|
|
- EXPECTANCY_LE_0_1
|
|
- WIN_RATE_LT_45
|
|
- PREDICTION_MATCH_LT_60
|
|
- VALUE_DAMAGE_GT_10
|
|
risk: 통제 점수는 높지만 실전 성과 표본이 부족해 매수/매도 뒷북 문제를 아직 수치로 해소하지 못했다.
|
|
fix: 리플레이와 실전 표본을 분리하고 T+20 30건 이상, pass>=60%, expectancy>0.1% 전에는 active 승격 금지.
|
|
- gap_id: GAP-006-generated-file-sprawl
|
|
evidence:
|
|
python_files_count: 839
|
|
yaml_files_count: 171
|
|
json_files_count: 374
|
|
generated_schema_model_dirs:
|
|
- schemas/generated
|
|
- src/quant_engine/models/generated
|
|
- runtime/python/core/formulas/generated
|
|
risk: 생성물이 권위 파일처럼 다뤄지면 파편화·상호충돌·리뷰비용 증가가 발생한다.
|
|
fix: generated는 build artifact로 선언하고 수동 편집 금지, 단일 generator와 parity validator로만
|
|
갱신.
|
|
target_architecture:
|
|
architecture_name: Contract-First Quant Engine with Deterministic Harness
|
|
one_way_flow:
|
|
- data
|
|
- feature
|
|
- risk
|
|
- alpha
|
|
- decision_fsm
|
|
- execution_blueprint
|
|
- report_renderer
|
|
- llm_copy_only
|
|
authority_stack_high_to_low:
|
|
- spec/00_execution_contract.yaml
|
|
- spec/risk/*.yaml 및 spec/03_risk_policy.yaml
|
|
- spec/13_formula_registry.yaml
|
|
- spec/48_module_io_contract_registry.yaml
|
|
- governance/rules/*.yaml
|
|
- src/quant_engine canonical Python
|
|
- gas_*.gs thin adapter
|
|
- Temp/*.json runtime outputs
|
|
- prompts/*.md copy-only renderers
|
|
module_boundaries:
|
|
data_ingestion:
|
|
allowed:
|
|
- 수집
|
|
- 정규화
|
|
- freshness
|
|
- schema validation
|
|
forbidden:
|
|
- 매수/매도 판단
|
|
- 점수 가중치 변경
|
|
feature_engine:
|
|
allowed:
|
|
- 등록 공식 계산
|
|
- 결측 처리
|
|
- provenance 기록
|
|
forbidden:
|
|
- final_action 확정
|
|
risk_manager:
|
|
allowed:
|
|
- cash floor
|
|
- total heat
|
|
- hard stop
|
|
- position cap
|
|
- D+2 현금 방어선 판정
|
|
forbidden:
|
|
- 목표수익률 명분으로 risk 완화
|
|
alpha_engine:
|
|
allowed:
|
|
- factor score
|
|
- regime adjustment
|
|
- lead/lag evidence
|
|
forbidden:
|
|
- live 표본 부족 상태에서 ACTIVE 승격
|
|
decision_fsm:
|
|
allowed:
|
|
- BUY/HOLD/TRIM/SELL/WATCH final_action 결정
|
|
forbidden:
|
|
- renderer/LLM에서 final_action 재판단
|
|
execution_engine:
|
|
allowed:
|
|
- tick normalization
|
|
- single price per row
|
|
- order blueprint
|
|
forbidden:
|
|
- 다중 조건 주문문
|
|
- stale TP 표기
|
|
report_renderer:
|
|
allowed:
|
|
- packet 숫자 복사
|
|
- provenance 표시
|
|
- 차단사유 표시
|
|
forbidden:
|
|
- 계산
|
|
- 게이트 완화 서술
|
|
- 가격/수량 창작
|
|
llm_layer:
|
|
allowed:
|
|
- 요약
|
|
- 교육노트
|
|
- 하네스 출력의 사람이 읽는 설명
|
|
forbidden:
|
|
- 하네스 verdict 번복
|
|
- 숫자 생성
|
|
- 미등록 공식 생성
|
|
directory_policy:
|
|
AGENTS.md: 운영 인덱스만 유지. 장문 규칙 금지.
|
|
spec/: 계약·공식·게이트·출력 스키마의 원본 권위.
|
|
governance/: ADR, rule hash, change request, lifecycle.
|
|
src/quant_engine/: canonical implementation. 신규 로직은 여기서 시작.
|
|
tools/: CLI wrapper, validator, builder. 핵심 비즈니스 로직 축적 금지.
|
|
gas_*.gs: Google Sheets fetch/write/render adapter. 공식/판단 로직 신규 추가 금지.
|
|
Temp/: runtime output only. 직접 편집 금지.
|
|
dist/: packaged compact output only.
|
|
prompts/: copy-only renderer prompt. 계산 지시 금지.
|
|
tests/: unit/golden/property/parity/replay/llm_regression/e2e.
|
|
qedd_methodology:
|
|
principles:
|
|
- 'Contract before code: YAML 계약 없이 Python/GAS 구현 금지.'
|
|
- 'Harness before narrative: 하네스 수치가 보고서 문장보다 우선.'
|
|
- 'Python canonical first: 계산/판단은 Python에, GAS는 adapter에 둔다.'
|
|
- 'No LLM math: LLM은 가격·수량·TP·SL·점수를 계산하지 않는다.'
|
|
- 'Single source of truth: active manifest alias 하나만 runtime source가 된다.'
|
|
- 'Shadow before active: 새 알고리즘은 shadow ledger와 live/replay 분리 검증을 거친다.'
|
|
- 'Small files, hard gates: 긴 문서보다 짧은 계약, 자동 검증, golden case를 우선한다.'
|
|
- 'Evidence retirement: 성과 없는 규칙은 유지하지 않고 조건부 은퇴시킨다.'
|
|
algorithm_lifecycle:
|
|
states:
|
|
- PROPOSED
|
|
- SPEC_LOCKED
|
|
- SHADOW
|
|
- PAPER_ACTIVE
|
|
- LIMITED_ACTIVE
|
|
- ACTIVE
|
|
- RETIRED
|
|
transition_rules:
|
|
PROPOSED_to_SPEC_LOCKED:
|
|
- spec yaml 존재
|
|
- owner 지정
|
|
- input/output/provenance/결측정책 정의
|
|
- golden case 최소 3개
|
|
SPEC_LOCKED_to_SHADOW:
|
|
- Python implementation 존재
|
|
- schema/model parity PASS
|
|
- unit/golden/property PASS
|
|
SHADOW_to_PAPER_ACTIVE:
|
|
- replay/live 분리 ledger 기록
|
|
- 성능지표가 baseline 대비 개선
|
|
- 위험/거래비용 고려
|
|
PAPER_ACTIVE_to_LIMITED_ACTIVE:
|
|
- operational_t20_count >= 30
|
|
- prediction_match_rate_pct >= 60
|
|
- value_damage_pct <= 10
|
|
LIMITED_ACTIVE_to_ACTIVE:
|
|
- expectancy_pct > 0.1
|
|
- win_rate_pct >= 45
|
|
- max_drawdown within risk budget
|
|
- 2회 연속 주간 리뷰 PASS
|
|
ANY_to_RETIRED:
|
|
- retirement_condition 충족
|
|
- 더 단순한 규칙으로 대체 가능
|
|
- data availability 저하 또는 성과 훼손
|
|
mandatory_fields_per_algorithm:
|
|
- formula_id
|
|
- purpose
|
|
- inputs
|
|
- outputs
|
|
- units
|
|
- missing_policy
|
|
- provenance_required
|
|
- owner
|
|
- risk_limit
|
|
- shadow_metric
|
|
- activation_threshold
|
|
- retirement_condition
|
|
- golden_cases
|
|
- property_invariants
|
|
- live_replay_label
|
|
quant_research_standards:
|
|
minimum_tests:
|
|
- walk_forward split
|
|
- purged/embargoed time split when overlapping labels exist
|
|
- decile monotonicity or threshold stability check
|
|
- turnover/slippage/capacity check
|
|
- crisis/regime stress check
|
|
- sector concentration check
|
|
- cash-defense impact check
|
|
anti_overfit_rules:
|
|
- 단일 종목/단일 기간 최적화 금지
|
|
- threshold는 후보군/검증군 분리
|
|
- 리플레이 성과를 live 성과로 표기 금지
|
|
- 샘플 30 미만은 ACTIVE 금지
|
|
factor_taxonomy_required:
|
|
- momentum
|
|
- quality
|
|
- value
|
|
- growth
|
|
- liquidity
|
|
- smart_money
|
|
- risk
|
|
- regime
|
|
- execution_quality
|
|
document_diet_policy:
|
|
AGENTS_md_max_lines: 120
|
|
one_topic_one_authority_file: true
|
|
adr_rule: 되돌리기 어려운 아키텍처 결정만 ADR 작성. 일반 TODO는 spec 또는 governance/change_requests에
|
|
둔다.
|
|
duplicate_policy: 같은 개념의 v1/v2/v3가 공존하면 canonical_manifest에 active 1개와 deprecated
|
|
목록을 반드시 남긴다.
|
|
review_question: 이 문서가 하네스/계약/검증에 직접 쓰이지 않으면 삭제 또는 archive 후보다.
|
|
low_capability_llm_execution_card:
|
|
read_order:
|
|
- 1. AGENTS.md
|
|
- 2. runtime/active_artifact_manifest.yaml
|
|
- 3. spec/00_execution_contract.yaml
|
|
- 4. spec/13_formula_registry.yaml
|
|
- 5. spec/48_module_io_contract_registry.yaml
|
|
- 6. Temp/final_context_for_llm_v5.yaml 또는 active manifest alias packet
|
|
- 7. 본 YAML의 todo_roadmap
|
|
fixed_response_rules:
|
|
- 숫자가 필요한 문장은 source_path/json_pointer/formula_id가 없으면 DATA_MISSING으로 쓴다.
|
|
- 매수/매도 판단은 final_decision_packet의 final_action만 복사한다.
|
|
- 하네스 값이 없으면 질문하지 말고 하네스 업데이트 TODO를 만든다.
|
|
- 주문표는 single numeric price per row만 허용한다.
|
|
- blocked/limited라도 산출된 가격·수량·차단사유는 shadow ledger에 남긴다.
|
|
- D+2 정산현금은 즉시현금 방어선 충족 현금으로 인정한다.
|
|
- 토/일에는 weekly rebalance, 매월 1/11/21에는 mid-cycle check 섹션을 반드시 출력한다.
|
|
output_template_order:
|
|
- executive
|
|
- blockers
|
|
- portfolio_health
|
|
- action_table
|
|
- sell_priority
|
|
- shadow_ledger
|
|
- data_missing
|
|
- education_notes
|
|
- next_validation_commands
|
|
todo_roadmap:
|
|
- phase_id: P0_STABILIZE_AND_FREEZE
|
|
objective: 새 기능 추가를 멈추고 현재 권위·릴리즈·아키텍처 경계의 진실성을 고정한다.
|
|
exit_gate: release gate OK, skip_validate=false, active/canonical alias drift=0,
|
|
architecture boundary violations=0
|
|
tasks:
|
|
- task_id: P0-01
|
|
priority: P0
|
|
title: 릴리즈 SKIPPED 금지
|
|
owner: architect
|
|
objective: release 모드에서 검증 생략을 원천 차단한다.
|
|
target_files:
|
|
- tools/prepare_upload_zip.py
|
|
- tools/run_release_dag_v3.py
|
|
- package.json
|
|
- spec/41_release_dag.yaml
|
|
method_steps:
|
|
- prepare_upload_zip.py에서 validation_mode=release이면 skip_validate 인자를 무시하거나 에러
|
|
처리한다.
|
|
- pipeline_runtime_profile_v1.json.runtime_context.skip_validate=false를 기록한다.
|
|
- gate_status는 OK 또는 FAIL만 허용하고 SKIPPED는 package-only에서만 허용한다.
|
|
- package.json ops:package와 prepare-upload-zip 스크립트가 동일한 정책을 쓰게 한다.
|
|
acceptance_criteria:
|
|
- Temp/pipeline_runtime_profile_v1.json.gate_status == OK
|
|
- Temp/pipeline_runtime_profile_v1.json.runtime_context.skip_validate == false
|
|
- failed_checks == []
|
|
validation_commands:
|
|
- npm run ops:package
|
|
- python tools/validate_pipeline_runtime_contract.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P0-02
|
|
priority: P0
|
|
title: active/canonical alias 단일화
|
|
owner: architect
|
|
objective: active manifest와 canonical manifest가 같은 active artifact를 가리키게 한다.
|
|
target_files:
|
|
- runtime/active_artifact_manifest.yaml
|
|
- artifacts/canonical_manifest.yaml
|
|
- tools/build_canonical_artifact_resolver_v1.py
|
|
- tools/validate_active_manifest.py
|
|
method_steps:
|
|
- canonical_manifest의 concepts별 canonical_path를 읽는다.
|
|
- active_artifact_manifest의 source_precedence/manifest_rows에서 deprecated v값을 탐지한다.
|
|
- resolver가 active manifest를 재생성할 때 canonical_manifest를 우선하도록 수정한다.
|
|
- deprecated artifact runtime read가 있으면 validation FAIL로 바꾼다.
|
|
acceptance_criteria:
|
|
- authority_collision_count == 0
|
|
- stale_artifact_count == 0
|
|
- single_truth_conflict_count == 0
|
|
- manifest_rows에 deprecated canonical mismatch 없음
|
|
validation_commands:
|
|
- python tools/build_canonical_artifact_resolver_v1.py
|
|
- python tools/validate_active_manifest.py --manifest runtime/active_artifact_manifest.yaml
|
|
--strict
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P0-03
|
|
priority: P0
|
|
title: 아키텍처 경계 validator를 계약값과 일치
|
|
owner: architect
|
|
objective: spec/34의 0-count 계약을 validator가 그대로 강제하게 만든다.
|
|
target_files:
|
|
- spec/34_architecture_boundaries.yaml
|
|
- tools/validate_architecture_boundaries_v2.py
|
|
- tools/build_architecture_boundaries_v2.py
|
|
- tests/unit/test_architecture_boundaries.py
|
|
method_steps:
|
|
- validator가 spec/34 contracts.renderer_calculation_count와 reverse_dependency_count를
|
|
읽도록 한다.
|
|
- 관측값이 계약값보다 크면 gate=FAIL로 반환한다.
|
|
- 허용 예외가 필요하면 spec에 allowlist를 명시하고 만료일을 둔다.
|
|
- 현재 관측 288/7의 실제 원인을 function/file 단위로 출력하게 한다.
|
|
acceptance_criteria:
|
|
- renderer_calculation_count == 0
|
|
- reverse_dependency_count == 0
|
|
- allowlist_count == 0 또는 만료일 존재
|
|
- gate == PASS only when contract satisfied
|
|
validation_commands:
|
|
- python tools/build_architecture_boundaries_v2.py
|
|
- python tools/validate_architecture_boundaries_v2.py
|
|
- python tools/validate_renderer_no_calculation_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P0-04
|
|
priority: P0
|
|
title: low-capability context v5 산출물 고정
|
|
owner: architect
|
|
objective: release DAG와 실제 Temp 산출물의 context pack 버전을 일치시킨다.
|
|
target_files:
|
|
- tools/build_low_capability_context_pack_v5.py
|
|
- spec/46_low_capability_execution_pack.yaml
|
|
- spec/41_release_dag.yaml
|
|
- Temp/final_context_for_llm_v5.yaml
|
|
method_steps:
|
|
- build_final_context 노드를 실행해 v5를 생성한다.
|
|
- v4 파일은 archive 또는 deprecated로 분류한다.
|
|
- validate_low_capability_pack_v1.py가 required_sections를 모두 검사하게 한다.
|
|
- 패키징 화이트리스트에 v5만 포함한다.
|
|
acceptance_criteria:
|
|
- Temp/final_context_for_llm_v5.yaml exists
|
|
- required_sections all present
|
|
- v4 runtime reference count == 0
|
|
validation_commands:
|
|
- python tools/build_low_capability_context_pack_v5.py --manifest runtime/active_artifact_manifest.yaml
|
|
--packet Temp/final_decision_packet_v4.json --out Temp/final_context_for_llm_v5.yaml
|
|
- python tools/validate_low_capability_pack_v1.py --context Temp/final_context_for_llm_v5.yaml
|
|
--contract spec/46_low_capability_execution_pack.yaml
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P0-05
|
|
priority: P0
|
|
title: 권위 파일 해시 고정
|
|
owner: architect
|
|
objective: AGENTS/governance/spec의 변경 감사를 자동화한다.
|
|
target_files:
|
|
- governance/agents_index.yaml
|
|
- governance/agents_rule_hashes.yaml
|
|
- tools/build_agents_rule_hashes_v1.py
|
|
- tools/validate_agents_shrink_v1.py
|
|
method_steps:
|
|
- rule 파일별 sha256을 재생성한다.
|
|
- AGENTS.md는 120라인 이하 index 역할만 유지한다.
|
|
- rule hash mismatch가 있으면 release FAIL.
|
|
- 변경 사유는 governance/change_requests/*.yaml에 남긴다.
|
|
acceptance_criteria:
|
|
- AGENTS_SHRINK_OK
|
|
- rule hash mismatch count == 0
|
|
- change_request exists for every rule change
|
|
validation_commands:
|
|
- python tools/build_agents_rule_hashes_v1.py
|
|
- python tools/validate_agents_shrink_v1.py
|
|
- python tools/validate_change_requests_v1.py --dir governance/change_requests
|
|
--strict
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P1_CONTRACT_FIRST_REFACTOR
|
|
objective: 새 알고리즘 확장 전에 계약·모듈 IO·공식 lifecycle을 한 장의 권위체계로 묶는다.
|
|
exit_gate: module_io_schema_coverage_pct=100, formula lifecycle required_fields
|
|
complete, owner ledger complete
|
|
tasks:
|
|
- task_id: P1-01
|
|
priority: P1
|
|
title: 리팩토링 방법론 계약 추가
|
|
owner: architect
|
|
objective: 본 YAML의 핵심 규칙을 repo 내부 공식 계약으로 승격한다.
|
|
target_files:
|
|
- spec/49_refactor_methodology_contract.yaml
|
|
- governance/adr/0011-qedd-methodology.md
|
|
- AGENTS.md
|
|
method_steps:
|
|
- spec/49에 QEDD 원칙, 권위순서, 파일정책, DoD를 작성한다.
|
|
- ADR-0011에 왜 QEDD를 채택했는지 20줄 이내로 기록한다.
|
|
- AGENTS.md에는 링크 한 줄만 추가한다.
|
|
- 중복되는 장문 설명은 README/prompts에서 제거한다.
|
|
acceptance_criteria:
|
|
- spec/49 exists
|
|
- AGENTS line count <= 120
|
|
- ADR exists
|
|
- 중복 장문 문서 0개
|
|
validation_commands:
|
|
- python tools/validate_specs.py
|
|
- python tools/validate_agents_shrink_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P1-02
|
|
priority: P1
|
|
title: 모듈 IO registry를 실코드와 1:1 매핑
|
|
owner: architect
|
|
objective: spec/48의 module_io_contract_registry를 실제 src/tools 경로와 동기화한다.
|
|
target_files:
|
|
- spec/48_module_io_contract_registry.yaml
|
|
- tools/build_module_io_coverage_v1.py
|
|
- tools/validate_module_io_coverage_v1.py
|
|
method_steps:
|
|
- 모든 핵심 모듈을 data_ingestion/feature/risk/alpha/decision/execution/report/evaluation/adapters로
|
|
분류한다.
|
|
- 각 모듈의 inputs/outputs/schema/artifact_path를 필수화한다.
|
|
- registry에 없는 Python builder가 있으면 FAIL 또는 archive 후보로 분류한다.
|
|
- tools는 wrapper인지 builder인지 role 필드를 추가한다.
|
|
acceptance_criteria:
|
|
- module_io_schema_coverage_pct == 100.0
|
|
- unregistered_core_script_count == 0
|
|
- wrapper_has_no_business_logic == true
|
|
validation_commands:
|
|
- python tools/build_module_io_coverage_v1.py
|
|
- python tools/validate_module_io_coverage_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P1-03
|
|
priority: P1
|
|
title: 공식 lifecycle registry 생성
|
|
owner: architect
|
|
objective: 292개 formula의 상태와 owner/retirement 조건을 전부 원장화한다.
|
|
target_files:
|
|
- spec/51_formula_lifecycle_registry.yaml
|
|
- spec/35_rule_lifecycle_governance_v3.yaml
|
|
- tools/build_factor_lifecycle_registry_v1.py
|
|
- tools/validate_factor_lifecycle_v1.py
|
|
method_steps:
|
|
- formula_registry의 모든 formula_id를 읽는다.
|
|
- 각 formula에 lifecycle_state, owner, activation_threshold, retirement_condition,
|
|
expected_metric을 채운다.
|
|
- python_only/GAS_only/runtime 분류를 함께 기록한다.
|
|
- owner 없는 공식은 신규 변경 금지로 표시한다.
|
|
acceptance_criteria:
|
|
- formula_count == formula_runtime_registry.formula_total
|
|
- missing_owner_count == 0
|
|
- missing_retirement_condition_count == 0
|
|
- lifecycle_state in allowed states
|
|
validation_commands:
|
|
- python tools/build_factor_lifecycle_registry_v1.py
|
|
- python tools/validate_factor_lifecycle_v1.py --taxonomy spec/43_quant_factor_taxonomy.yaml
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P1-04
|
|
priority: P1
|
|
title: 숫자 provenance 계약을 보고서 필수조건으로 강화
|
|
owner: architect
|
|
objective: 모든 보고서 숫자가 source_path/json_pointer/formula_id/input_hash를 가진다.
|
|
target_files:
|
|
- spec/45_number_provenance_contract.yaml
|
|
- tools/build_number_provenance_ledger_v4.py
|
|
- tools/validate_number_provenance_strict_v3.py
|
|
- tools/render_operational_report.py
|
|
method_steps:
|
|
- report_renderer가 숫자를 쓸 때 provenance ledger에서만 가져오게 한다.
|
|
- 숫자 문자열 formatting 전 원본 json_pointer를 기록한다.
|
|
- provenance 없는 숫자는 DATA_MISSING으로 렌더링한다.
|
|
- 교육노트의 예시 숫자도 provenance_required=false 예외 태그를 요구한다.
|
|
acceptance_criteria:
|
|
- unprovenanced_number_count == 0
|
|
- provenance ledger freshness_status all OK or DATA_MISSING
|
|
- report validation PASS
|
|
validation_commands:
|
|
- python tools/build_number_provenance_ledger_v4.py --packet Temp/final_decision_packet_v4.json
|
|
--out Temp/number_provenance_ledger_v4.json
|
|
- python tools/validate_number_provenance_strict_v3.py --ledger Temp/number_provenance_ledger_v4.json
|
|
--report Temp/operational_report.md
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P1-05
|
|
priority: P1
|
|
title: 파일 다이어트 예산을 release gate로 연결
|
|
owner: architect
|
|
objective: 문서·Temp·generated sprawl을 수치 예산으로 관리한다.
|
|
target_files:
|
|
- runtime/refactor_baseline_v1.yaml
|
|
- tools/audit_repository_entropy_v2.py
|
|
- tools/clean_temp_artifacts_v1.py
|
|
- spec/50_repository_entropy_budget.yaml
|
|
method_steps:
|
|
- 현재 budget max_total_files=2000을 유지하되 target_total_files=1600을 추가한다.
|
|
- Temp json target<=250, docs lines target<=30000을 추가한다.
|
|
- generated 파일은 generator/source_hash 없으면 FAIL.
|
|
- archive 후보는 temp_cleanup_manifest에 기록 후 삭제한다.
|
|
acceptance_criteria:
|
|
- total_file_count <= 2000
|
|
- target trend decreasing week over week
|
|
- temp_json_count <= 500 hard / <=250 target
|
|
- manual_generated_edit_count == 0
|
|
validation_commands:
|
|
- python tools/audit_repository_entropy_v2.py --out runtime/refactor_baseline_v1.yaml
|
|
- python tools/clean_temp_artifacts_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P2_PYTHON_CANONICAL_AND_GAS_THIN_ADAPTER
|
|
objective: 계산/판단을 Python canonical로 집중시키고 GAS를 입출력 어댑터로 축소한다.
|
|
exit_gate: GAS business logic 신규 추가 0, Python parity PASS, GAS adapter validation
|
|
PASS
|
|
tasks:
|
|
- task_id: P2-01
|
|
priority: P2
|
|
title: GAS business logic 인벤토리 작성
|
|
owner: architect
|
|
objective: gas_*.gs 함수의 역할을 adapter/helper/business_logic으로 분류한다.
|
|
target_files:
|
|
- tools/audit_gas_business_logic_v1.py
|
|
- gas_data_feed.gs
|
|
- gas_lib.gs
|
|
- gas_harness_rows.gs
|
|
- spec/39_gas_thin_adapter_policy.yaml
|
|
method_steps:
|
|
- GAS 함수명/라인/호출관계를 추출한다.
|
|
- 공식 계산 또는 final_action 판단을 business_logic으로 분류한다.
|
|
- business_logic은 Python 이전 후보로 기록한다.
|
|
- adapter 허용 책임은 fetch, write, sheet mapping, cache only로 제한한다.
|
|
acceptance_criteria:
|
|
- gas_business_logic_new_count == 0
|
|
- existing_business_logic_migration_plan_exists
|
|
- thin_adapter_policy PASS
|
|
validation_commands:
|
|
- python tools/audit_gas_business_logic_v1.py
|
|
- python tools/validate_gas_thin_adapter_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P2-02
|
|
priority: P2
|
|
title: 공식 구현 Python canonical화
|
|
owner: architect
|
|
objective: GAS에 남은 핵심 공식은 src/quant_engine/formulas로 이전한다.
|
|
target_files:
|
|
- src/quant_engine/core/formulas/
|
|
- runtime/python/core/formulas/generated/
|
|
- spec/13_formula_registry.yaml
|
|
- tools/compile_formula_registry_v1.py
|
|
method_steps:
|
|
- formula_id별 Python function signature를 표준화한다.
|
|
- inputs_used/missing_inputs/result/rule_id/provenance를 반환한다.
|
|
- GAS 결과와 Python 결과를 golden row로 비교한다.
|
|
- 동일 공식이 GAS/Python에 둘 다 있으면 canonical_runtime=PYTHON, gas_runtime=adapter로 선언한다.
|
|
acceptance_criteria:
|
|
- python_formula_parity_pass_pct == 100
|
|
- runtime_adjusted_coverage_pct == 100
|
|
- unmapped_formula_count == 0
|
|
validation_commands:
|
|
- python tools/compile_formula_registry_v1.py
|
|
- python tools/validate_formula_runtime_registry_v1.py
|
|
- python tools/validate_schema_model_generation_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P2-03
|
|
priority: P2
|
|
title: GAS adapter contract 테스트
|
|
owner: architect
|
|
objective: GAS는 Python 산출 packet을 sheet에 반영하는 기능만 검증한다.
|
|
target_files:
|
|
- spec/39_gas_thin_adapter_policy.yaml
|
|
- schemas/generated/gas_adapter_contract.schema.json
|
|
- tools/validate_gas_call_arity.py
|
|
- tools/validate_gas_thin_adapter_v1.py
|
|
method_steps:
|
|
- GAS public entrypoint의 인자 개수를 contract로 고정한다.
|
|
- GAS가 계산한 숫자가 보고서 authority가 되지 못하게 source whitelist를 설정한다.
|
|
- GAS call arity와 adapter role을 release gate에 넣는다.
|
|
acceptance_criteria:
|
|
- validate_gas_call_arity PASS
|
|
- validate_gas_thin_adapter_v1 PASS
|
|
- runtime_source_whitelist violation_count == 0
|
|
validation_commands:
|
|
- npm run validate-gas-call-arity
|
|
- python tools/validate_gas_thin_adapter_v1.py
|
|
- python tools/validate_runtime_source_whitelist_v1.py --manifest runtime/active_artifact_manifest.yaml
|
|
--scan src tools
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P2-04
|
|
priority: P2
|
|
title: generated model 단일 생성기 고정
|
|
owner: architect
|
|
objective: schemas/generated, src models/generated, runtime generated의 관계를 하나의
|
|
generator로 묶는다.
|
|
target_files:
|
|
- tools/generate_models_from_schema.py
|
|
- schemas/generated/
|
|
- src/quant_engine/models/generated/
|
|
- runtime/python/core/formulas/generated/
|
|
method_steps:
|
|
- schema를 source로 Python model을 생성한다.
|
|
- generated 파일 상단에 source_schema_hash를 삽입한다.
|
|
- 수동 편집 감지를 위해 generated manifest를 만든다.
|
|
- schema/model parity validator가 hash mismatch를 FAIL한다.
|
|
acceptance_criteria:
|
|
- schema_model_generation PASS
|
|
- generated_hash_mismatch_count == 0
|
|
- manual_edit_count == 0
|
|
validation_commands:
|
|
- python tools/generate_models_from_schema.py
|
|
- python tools/validate_schema_model_generation_v1.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P3_STRATEGY_HARNESS_AND_PERFORMANCE_TRUTH
|
|
objective: 좋아 보이는 알고리즘이 아니라 실전성과를 개선하는 알고리즘만 살아남게 만든다.
|
|
exit_gate: operational_t20_count>=30, pass_rate>=60, prediction_match>=60, value_damage<=10,
|
|
readiness ACTIVE or LIMITED_ACTIVE
|
|
tasks:
|
|
- task_id: P3-01
|
|
priority: P3
|
|
title: 성과 readiness hard gate 강화
|
|
owner: architect
|
|
objective: WATCH_PENDING_SAMPLE 상태에서 active 승격을 차단한다.
|
|
target_files:
|
|
- Temp/strategy_hardening_harness_v2.json
|
|
- tools/build_strategy_hardening_harness_v2.py
|
|
- tools/validate_strategy_tests_contract.py
|
|
method_steps:
|
|
- targets를 validator가 직접 읽도록 한다.
|
|
- readiness_reasons 중 하나라도 남으면 ACTIVE 금지.
|
|
- overall_hardening_score가 높아도 performance_score가 낮으면 WATCH 유지.
|
|
- 보고서는 WATCH_PENDING_SAMPLE을 솔직하게 표시한다.
|
|
acceptance_criteria:
|
|
- readiness_gate != ACTIVE when operational_t20_count < 30
|
|
- prediction_match_rate_pct target applied
|
|
- value_damage target applied
|
|
validation_commands:
|
|
- python tools/build_strategy_hardening_harness_v2.py
|
|
- python tools/validate_strategy_tests_contract.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P3-02
|
|
priority: P3
|
|
title: 뒷북/설거지 방지 하네스 정교화
|
|
owner: architect
|
|
objective: late entry와 distribution presignal을 매수 차단 이전 단계에 배치한다.
|
|
target_files:
|
|
- tools/build_late_chase_attribution_v2.py
|
|
- tools/build_anti_late_entry_pullback_gate_v4.py
|
|
- tools/build_distribution_exit_presignal_v2.py
|
|
- spec/04_strategy_rules.yaml
|
|
method_steps:
|
|
- 매수 후보마다 entry_timing_decile, flow_acceleration, overhang, distribution_risk를
|
|
계산한다.
|
|
- 상승 말기 신호가 일정 이상이면 BUY를 WATCH/PULLBACK_WAIT로 낮춘다.
|
|
- pullback trigger가 없으면 추격매수 수량을 0으로 둔다.
|
|
- 매수 차단 사유를 shadow ledger에 남긴다.
|
|
acceptance_criteria:
|
|
- late_chase_false_buy_count decreases week over week
|
|
- BUY without pullback_trigger count == 0
|
|
- distribution_warning_before_sell_count tracked
|
|
validation_commands:
|
|
- python tools/build_late_chase_attribution_v2.py --json GatherTradingData.json
|
|
--out Temp/late_chase_attribution_v2.json
|
|
- python tools/validate_anti_late_entry_harness_v1.py --json Temp/late_chase_attribution_v2.json
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P3-03
|
|
priority: P3
|
|
title: 수익금 방어 value preservation 개선
|
|
owner: architect
|
|
objective: 익절 후 반납과 손실 확대를 별도 점수로 관리한다.
|
|
target_files:
|
|
- tools/build_value_preservation_scorer_v2.py
|
|
- tools/build_profit_giveback_ratchet_v2.py
|
|
- tools/build_sell_execution_timing_lock_v2.py
|
|
- spec/06_exit_policy.yaml
|
|
method_steps:
|
|
- profit_lock_stage와 giveback_ratio를 계산한다.
|
|
- TP 후 trailing stop을 packet에 포함한다.
|
|
- value_damage_pct가 10 초과이면 다음 주 신규 위험 예산을 줄인다.
|
|
- SELL 후보가 2개 이상이면 sell priority table을 먼저 렌더링한다.
|
|
acceptance_criteria:
|
|
- cash_recovery_value_damage_pct <= 10 target
|
|
- profit_giveback_alert_count tracked
|
|
- sell_priority_table rendered when candidates>=2
|
|
validation_commands:
|
|
- python tools/build_profit_giveback_ratchet_v2.py --json GatherTradingData.json
|
|
--out Temp/profit_giveback_ratchet_v2.json
|
|
- python tools/build_value_preservation_scorer_v2.py
|
|
- python tools/validate_operational_report_contract.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P3-04
|
|
priority: P3
|
|
title: live/replay 분리와 T+20 outcome ledger 운영
|
|
owner: architect
|
|
objective: 리플레이 성과와 실전 성과를 절대 섞지 않는다.
|
|
target_files:
|
|
- tools/build_live_replay_separation_v3.py
|
|
- tools/build_operational_t20_outcome_ledger_v1.py
|
|
- tools/build_outcome_quality_score_v1.py
|
|
- spec/44_live_replay_separation.yaml
|
|
method_steps:
|
|
- 모든 decision row에 sample_type=LIVE/REPLAY/PAPER를 붙인다.
|
|
- T+5/T+20 결과를 outcome ledger에 누적한다.
|
|
- sample_count<30이면 active 금지.
|
|
- 리플레이 지표는 교육/참고 섹션에만 표시한다.
|
|
acceptance_criteria:
|
|
- replay_used_as_live_count == 0
|
|
- operational_t20_count tracked
|
|
- live sample_count gating applied
|
|
validation_commands:
|
|
- python tools/build_live_replay_separation_v3.py --out Temp/live_replay_separation_v3.json
|
|
- python tools/validate_no_replay_live_mix_v2.py --json Temp/live_replay_separation_v3.json
|
|
--strict
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P3-05
|
|
priority: P3
|
|
title: 전략 하네스 점수 공식을 단순화
|
|
owner: architect
|
|
objective: overall score보다 통제/성과/진실성/운영성을 분리한다.
|
|
target_files:
|
|
- spec/52_strategy_harness_scorecard.yaml
|
|
- tools/build_strategy_hardening_harness_v2.py
|
|
- tools/evaluate_strategy_harness_score.py
|
|
method_steps:
|
|
- control_score, performance_score, truth_score, ops_score 네 축으로 분리한다.
|
|
- 성능 지표가 부족하면 overall을 높게 보이지 않게 cap을 건다.
|
|
- 점수 산식과 thresholds를 YAML에 명시한다.
|
|
- 보고서에는 높은 통제 점수와 낮은 성과 준비도를 분리해 표시한다.
|
|
acceptance_criteria:
|
|
- score_formula documented
|
|
- sample_cap applied
|
|
- overall_hardening_score not misleading
|
|
- readiness_reasons displayed
|
|
validation_commands:
|
|
- python tools/evaluate_strategy_harness_score.py
|
|
- python tools/build_strategy_hardening_harness_v2.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P4_RENDERER_AND_LLM_NO_HALLUCINATION
|
|
objective: 보고서와 LLM이 계산하지 않고 하네스 packet만 복사하도록 완전히 잠근다.
|
|
exit_gate: renderer_calculation_count=0, unprovenanced_number_count=0, llm regression
|
|
PASS
|
|
tasks:
|
|
- task_id: P4-01
|
|
priority: P4
|
|
title: renderer copy-only helper로 축소
|
|
owner: architect
|
|
objective: render_operational_report.py의 계산성 코드를 packet copy로 치환한다.
|
|
target_files:
|
|
- tools/render_operational_report.py
|
|
- tools/operational_report_contract.py
|
|
- schemas/operational_report.schema.json
|
|
method_steps:
|
|
- 계산처럼 보이는 사칙연산/비교/threshold 판단을 packet builder로 이동한다.
|
|
- renderer에는 formatting, table order, null display만 둔다.
|
|
- 숫자 포맷팅 함수는 provenance ledger pointer를 함께 받는다.
|
|
- renderer_no_calculation validator를 release gate에 둔다.
|
|
acceptance_criteria:
|
|
- renderer_calculation_count == 0
|
|
- renderer_gate_redecision_count == 0
|
|
- operational report schema PASS
|
|
validation_commands:
|
|
- python tools/validate_renderer_no_calculation_v1.py
|
|
- npm run validate-operational-report-contract
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P4-02
|
|
priority: P4
|
|
title: low-capability LLM regression fixture 확장
|
|
owner: architect
|
|
objective: 저성능 LLM도 같은 결과를 내는지 golden prompt로 테스트한다.
|
|
target_files:
|
|
- tests/llm_regression/
|
|
- tools/run_low_capability_llm_regression_v1.py
|
|
- prompts/low_capability_report_renderer.md
|
|
method_steps:
|
|
- BUY/HOLD/SELL/TRIM/blocked/data_missing/cadence 케이스를 fixture로 만든다.
|
|
- 정답은 final_context_for_llm_v5의 필드 복사로만 구성한다.
|
|
- LLM이 임의 숫자를 쓰면 FAIL.
|
|
- 주말/1·11·21일 cadence 요구를 fixture에 포함한다.
|
|
acceptance_criteria:
|
|
- llm_regression_pass_rate == 100
|
|
- invented_number_count == 0
|
|
- harness_verdict_override_count == 0
|
|
validation_commands:
|
|
- python tools/run_low_capability_llm_regression_v1.py --fixture tests/llm_regression
|
|
--context Temp/final_context_for_llm_v5.yaml
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P4-03
|
|
priority: P4
|
|
title: DATA_MISSING 표준화
|
|
owner: architect
|
|
objective: 결측을 추정하지 않고 하네스 업데이트 필요로만 표시한다.
|
|
target_files:
|
|
- spec/02_data_contract.yaml
|
|
- spec/12_field_dictionary.yaml
|
|
- tools/build_data_quality_reconciliation_v1.py
|
|
- tools/validate_data_integrity_100_lock_v2.py
|
|
method_steps:
|
|
- 필드별 missing_policy를 field dictionary에 둔다.
|
|
- 결측이 action-critical이면 execution block.
|
|
- 결측이 narrative-only이면 DATA_MISSING 섹션에만 표시.
|
|
- LLM prompt에 추정 금지 문구를 반복하지 말고 context pack contract로 강제한다.
|
|
acceptance_criteria:
|
|
- critical_missing_execution_blocked == true
|
|
- imputed_data_exposure disclosed
|
|
- DATA_MISSING wording exact
|
|
validation_commands:
|
|
- python tools/build_data_quality_reconciliation_v1.py --json GatherTradingData.json
|
|
--integrity Temp/data_integrity_100_lock_v2.json --out Temp/data_quality_reconciliation_v1.json
|
|
- python tools/validate_cash_ledger_v2.py --snapshot GatherTradingData.json --contract
|
|
spec/15_account_snapshot_contract.yaml
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P5_OPERATING_CADENCE_AND_PORTFOLIO_POLICY
|
|
objective: 사용자 운영 규칙을 엔진 하네스에 넣어 매번 사람이 기억하지 않아도 자동 출력되게 한다.
|
|
exit_gate: weekly Sat/Sun rebalance and 1/11/21 mid-check sections generated by
|
|
cadence signal
|
|
tasks:
|
|
- task_id: P5-01
|
|
priority: P5
|
|
title: 운영 cadence signal을 보고서 권위값으로 승격
|
|
owner: architect
|
|
objective: 토/일 리밸런싱, 매월 1/11/21 중간점검을 자동화한다.
|
|
target_files:
|
|
- tools/build_operating_cadence_signal_v1.py
|
|
- spec/18_settings_contract.yaml
|
|
- tools/render_operational_report.py
|
|
- schemas/operational_report.schema.json
|
|
method_steps:
|
|
- Asia/Seoul 기준 day_of_week/day_of_month를 계산한다.
|
|
- 토/일이면 required_section.weekly_rebalance=true.
|
|
- 1/11/21이면 required_section.mid_cycle_check=true.
|
|
- 기본 투자 제안 단위는 weekly로 고정한다.
|
|
acceptance_criteria:
|
|
- weekend_rebalance_required true on Sat/Sun
|
|
- mid_cycle_check_required true on day 1/11/21
|
|
- report section present when required
|
|
validation_commands:
|
|
- python tools/build_operating_cadence_signal_v1.py --timezone Asia/Seoul --out
|
|
Temp/operating_cadence_signal_v1.json
|
|
- python tools/validate_operational_report_contract.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P5-02
|
|
priority: P5
|
|
title: D+2 현금 방어선 계약 고정
|
|
owner: architect
|
|
objective: D+2 정산현금을 즉시현금 방어선 충족으로 인정하는 사용자 정책을 단일화한다.
|
|
target_files:
|
|
- spec/00_execution_contract.yaml
|
|
- spec/15_account_snapshot_contract.yaml
|
|
- tools/validate_cash_ledger_v2.py
|
|
- tools/build_goal_risk_budget_harness_v3.py
|
|
method_steps:
|
|
- cash ledger 용어를 immediate_cash_defense_eligible로 정리한다.
|
|
- 일반계좌 D+2 정산현금은 cash floor 계산에 포함한다.
|
|
- ISA/연금 현금은 제한현금으로 분리한다.
|
|
- 보고서에는 eligible/restricted를 분리 표시한다.
|
|
acceptance_criteria:
|
|
- d2_cash_defense_rule_applied == true
|
|
- cross_account_cash_leak_count == 0
|
|
- eligible_cash calculation provenance exists
|
|
validation_commands:
|
|
- python tools/validate_cash_ledger_v2.py --snapshot GatherTradingData.json --contract
|
|
spec/15_account_snapshot_contract.yaml
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P5-03
|
|
priority: P5
|
|
title: 목표금액 5억 risk budget 연결
|
|
owner: architect
|
|
objective: 목표 달성 압박이 risk rule을 우회하지 못하게 한다.
|
|
target_files:
|
|
- spec/36_goal_risk_budget_harness.yaml
|
|
- tools/build_goal_risk_budget_harness_v3.py
|
|
- tools/build_portfolio_alpha_confidence_per_ticker_v1.py
|
|
method_steps:
|
|
- 목표금액, 현재자산, 필요수익률, 허용 MDD를 산출하되 주문 판단은 risk gate 이후에만 반영한다.
|
|
- 목표 부족분이 cash_floor/hard_stop/total_heat를 완화하지 못하게 한다.
|
|
- 위험예산 초과 시 신규 매수보다 현금회복 우선.
|
|
acceptance_criteria:
|
|
- goal_pressure_override_count == 0
|
|
- risk_vs_strategy conflict resolved to risk
|
|
- goal progress displayed separately
|
|
validation_commands:
|
|
- python tools/build_goal_risk_budget_harness_v3.py
|
|
- python tools/validate_specs.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P6_RELEASE_DAG_CI_AND_OBSERVABILITY
|
|
objective: 매번 같은 순서로 빌드·검증·패키징되고, 실패 원인이 바로 보이게 한다.
|
|
exit_gate: release DAG deterministic, duplicate steps=0, anomaly history sufficient,
|
|
engine health card PASS
|
|
tasks:
|
|
- task_id: P6-01
|
|
priority: P6
|
|
title: release DAG를 단일 엔트리포인트로 사용
|
|
owner: architect
|
|
objective: package.json 여러 스크립트를 DAG 노드 호출로 정리한다.
|
|
target_files:
|
|
- spec/41_release_dag.yaml
|
|
- tools/run_release_dag_v3.py
|
|
- package.json
|
|
method_steps:
|
|
- ops:validate/ops:release/ops:package가 모두 run_release_dag_v3.py를 호출하게 한다.
|
|
- 중복 스크립트명은 alias로만 유지한다.
|
|
- prepare_zip 노드에서 --skip-validate 기본 사용을 금지한다.
|
|
- DAG 노드별 inputs/outputs/depends_on을 모두 검증한다.
|
|
acceptance_criteria:
|
|
- duplicate_steps_removed_count == 0
|
|
- dag has no cycles
|
|
- all strict nodes PASS
|
|
- package scripts count does not increase
|
|
validation_commands:
|
|
- python tools/run_release_dag_v3.py --mode release --strict
|
|
- npm run ops:release
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P6-02
|
|
priority: P6
|
|
title: engine health card를 첫 화면 지표로
|
|
owner: architect
|
|
objective: 운영자가 한 장으로 상태를 판단하게 한다.
|
|
target_files:
|
|
- tools/build_engine_health_card_v1.py
|
|
- schemas/engine_health_card.schema.json
|
|
- tools/validate_engine_health_card_v1.py
|
|
method_steps:
|
|
- authority, data, formula coverage, performance readiness, release status, repo
|
|
entropy를 한 JSON/YAML로 요약한다.
|
|
- red/yellow/green 상태와 fail reason code를 제공한다.
|
|
- 보고서 맨 위 portfolio health와 함께 출력한다.
|
|
acceptance_criteria:
|
|
- engine_health_card gate PASS
|
|
- red reason code when release skipped
|
|
- health card included in report
|
|
validation_commands:
|
|
- python tools/build_engine_health_card_v1.py --out Temp/engine_health_card_v1.json
|
|
- python tools/validate_engine_health_card_v1.py --json Temp/engine_health_card_v1.json
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P6-03
|
|
priority: P6
|
|
title: runtime anomaly baseline 확장
|
|
owner: architect
|
|
objective: 빌드 시간이 짧다고 정상으로 오인하지 않게 한다.
|
|
target_files:
|
|
- tools/profile_pipeline_runtime.py
|
|
- tools/pipeline_runtime_anomaly_lib_v1.py
|
|
- Temp/pipeline_runtime_profile_history_v1.json
|
|
method_steps:
|
|
- release/quick/package-only 모드별 baseline을 분리한다.
|
|
- history window가 10 미만이면 INSUFFICIENT_HISTORY로 표시하되 gate 판단과 분리한다.
|
|
- 검증 단계를 생략해 시간이 짧아진 경우 anomaly로 표시한다.
|
|
acceptance_criteria:
|
|
- baseline_window_size >= 10 or explicit insufficient label
|
|
- validation_step_count tracked
|
|
- skip_validate anomaly reason appears
|
|
validation_commands:
|
|
- python tools/profile_pipeline_runtime.py
|
|
- python tools/validate_pipeline_runtime_contract.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- phase_id: P7_REPO_DIET_AND_MAINTENANCE_CADENCE
|
|
objective: 문서/파일/버전 스프롤을 줄여 장기 확장 가능한 엔진으로 만든다.
|
|
exit_gate: no stale runtime read, deprecated artifacts archived, source docs slim,
|
|
TODO debt visible
|
|
tasks:
|
|
- task_id: P7-01
|
|
priority: P7
|
|
title: 버전 스프롤 정리
|
|
owner: architect
|
|
objective: v1/v2/v3 산출물은 active 1개와 archive만 남긴다.
|
|
target_files:
|
|
- artifacts/canonical_manifest.yaml
|
|
- tools/build_artifact_retirement_plan_v1.py
|
|
- tools/clean_temp_artifacts_v1.py
|
|
method_steps:
|
|
- 개념별 canonical artifact 1개를 지정한다.
|
|
- deprecated_files는 archive로 이동하고 runtime read 차단한다.
|
|
- Temp에 남은 오래된 버전은 cleanup manifest를 통해 삭제한다.
|
|
- 삭제 전 source_hash와 replacement를 기록한다.
|
|
acceptance_criteria:
|
|
- stale_artifact_count == 0
|
|
- deprecated_runtime_read_count == 0
|
|
- archive_runtime_read_count == 0
|
|
validation_commands:
|
|
- python tools/build_artifact_retirement_plan_v1.py
|
|
- python tools/clean_temp_artifacts_v1.py
|
|
- python tools/validate_runtime_source_whitelist_v1.py --manifest runtime/active_artifact_manifest.yaml
|
|
--scan src tools
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P7-02
|
|
priority: P7
|
|
title: 문서 다이어트
|
|
owner: architect
|
|
objective: 길고 중복된 설명을 계약/ADR/런북으로 분리한다.
|
|
target_files:
|
|
- README.md
|
|
- docs/doctrine.md
|
|
- docs/runbook.md
|
|
- prompts/*.md
|
|
- AGENTS.md
|
|
method_steps:
|
|
- README는 사용법 50줄 내외로 둔다.
|
|
- doctrine는 불변 원칙만 유지한다.
|
|
- runbook은 명령 순서만 유지한다.
|
|
- prompts는 렌더링 지시만 남기고 계산 설명 제거한다.
|
|
- 중복 원칙은 spec/49로 이동한다.
|
|
acceptance_criteria:
|
|
- docs_lines_total <= target
|
|
- AGENTS.md <= 120 lines
|
|
- duplicate_rule_text_count == 0
|
|
validation_commands:
|
|
- python tools/validate_agents_shrink_v1.py
|
|
- python tools/lint_repo_hygiene.py
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
- task_id: P7-03
|
|
priority: P7
|
|
title: 주간 엔진 리뷰 템플릿 운영
|
|
owner: architect
|
|
objective: 매주 알고리즘 추가보다 성능/부채 리뷰를 우선한다.
|
|
target_files:
|
|
- governance/weekly_engine_review_template.md
|
|
- governance/change_request_template.yaml
|
|
- governance/change_requests/*.yaml
|
|
method_steps:
|
|
- 매주 토/일 리밸런싱 후 engine health, failed gates, retired rules, new evidence를 기록한다.
|
|
- 새 규칙 제안은 change_request로만 접수한다.
|
|
- 1/11/21 중간점검에는 live outcome ledger와 목표금액 진행률을 점검한다.
|
|
acceptance_criteria:
|
|
- weekly review exists for each week
|
|
- change requests validated
|
|
- mid-cycle check sections generated
|
|
validation_commands:
|
|
- python tools/validate_change_requests_v1.py --dir governance/change_requests
|
|
--strict
|
|
rollback: git revert or restore last canonical artifact
|
|
low_capability_llm_instruction: 목표 파일을 열고 method_steps를 순서대로 수행한다. 판단이 필요한 숫자는
|
|
만들지 말고 acceptance_criteria 기준으로만 PASS/FAIL을 적는다.
|
|
status: completed
|
|
release_gate_commands:
|
|
minimum_local_sequence:
|
|
- python tools/validate_specs.py
|
|
- python tools/validate_active_manifest.py --manifest runtime/active_artifact_manifest.yaml
|
|
--strict
|
|
- python tools/build_module_io_coverage_v1.py
|
|
- python tools/validate_module_io_coverage_v1.py
|
|
- python tools/validate_architecture_boundaries_v2.py
|
|
- python tools/validate_renderer_no_calculation_v1.py
|
|
- python tools/validate_number_provenance_strict_v3.py --ledger Temp/number_provenance_ledger_v4.json
|
|
--report Temp/operational_report.md
|
|
- 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_no_replay_live_mix_v2.py --json Temp/live_replay_separation_v3.json
|
|
--strict
|
|
- python tools/validate_cash_ledger_v2.py --snapshot GatherTradingData.json --contract
|
|
spec/15_account_snapshot_contract.yaml
|
|
- python tools/run_low_capability_llm_regression_v1.py --fixture tests/llm_regression
|
|
--context Temp/final_context_for_llm_v5.yaml
|
|
- python tools/run_release_dag_v3.py --mode release --strict
|
|
- npm run ops:package
|
|
hard_fail_conditions:
|
|
- gate_status == SKIPPED in release mode
|
|
- authority_collision_count > 0
|
|
- stale_artifact_count > 0
|
|
- unmapped_formula_count > 0
|
|
- renderer_calculation_count > 0
|
|
- reverse_dependency_count > 0 unless explicit unexpired allowlist exists
|
|
- unprovenanced_number_count > 0
|
|
- replay_used_as_live_count > 0
|
|
- LLM invented number count > 0
|
|
- D+2 cash defense rule not applied
|
|
- failed_checks not empty
|
|
definition_of_done:
|
|
control_and_truth:
|
|
engine_harness_status: OK
|
|
failed_checks_count: 0
|
|
formula_runtime_coverage_pct: 100.0
|
|
unmapped_formula_count: 0
|
|
report_active_artifact_match_pct: 100.0
|
|
authority_collision_count: 0
|
|
stale_artifact_count: 0
|
|
single_truth_conflict_count: 0
|
|
renderer_calculation_count: 0
|
|
reverse_dependency_count: 0
|
|
provenance_missing_count: 0
|
|
performance_readiness_targets:
|
|
overall_hardening_score_min: 85.0
|
|
truth_hardening_score_min: 85.0
|
|
prediction_match_rate_pct_min: 60.0
|
|
algorithm_guidance_proof_min: 80.0
|
|
operational_t20_count_min: 30
|
|
operational_t20_pass_rate_min: 60.0
|
|
execution_expectancy_pct_min: 0.1
|
|
execution_win_rate_pct_min: 45.0
|
|
cash_recovery_value_damage_pct_max: 10.0
|
|
readiness_gate_allowed_for_active:
|
|
- LIMITED_ACTIVE
|
|
- ACTIVE
|
|
repo_diet_targets:
|
|
hard_total_file_count_max: 2000
|
|
target_packaged_file_count_max: 1600
|
|
hard_temp_json_count_max: 500
|
|
target_temp_json_count_max: 250
|
|
agents_md_max_lines: 120
|
|
manual_generated_edit_count: 0
|
|
implementation_sequence_for_next_commit:
|
|
- 1. P0-01, P0-02, P0-03, P0-04만 먼저 수행한다. 새 알파 추가 금지.
|
|
- 2. release DAG가 OK가 되면 P1 계약 파일을 추가한다.
|
|
- 3. P2에서 GAS business logic 이전 계획을 만든 뒤 한 번에 하나씩 Python canonical로 이전한다.
|
|
- 4. P3 성과 하네스를 통과하기 전까지 새 매수/매도 알고리즘은 SHADOW 상태로만 둔다.
|
|
- 5. P4 LLM regression을 통과한 후 보고서 프롬프트를 줄인다.
|
|
- 6. P5 운영 cadence와 D+2 현금정책을 보고서 필수섹션으로 고정한다.
|
|
- 7. P6/P7은 매주 토/일 리밸런싱 리뷰 때 부채를 줄이는 반복 작업으로 운영한다.
|