From a1bbeb99a681f7877f20bfa6f0a50ebbdd35aebc Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Fri, 26 Jun 2026 11:40:51 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=B5=9C=EC=83=81=EC=9C=84=20?= =?UTF-8?q?=EB=A3=B0=20=EB=A7=A4=EB=8B=88=ED=8E=98=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=84=20spec/=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=95=EB=A6=AC=ED=95=98=EA=B3=A0=20=EB=8F=84?= =?UTF-8?q?=EA=B5=AC=20=EA=B2=BD=EB=A1=9C=20=EC=B0=B8=EC=A1=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RetirementAssetPortfolio.yaml | 0 .../RetirementAssetPortfolioReportTemplate.yaml | 0 tools/build_bundle.py | 4 ++-- tools/validate_compact_bundle_equivalence_v1.py | 2 +- tools/validate_source_authority_collapse_v1.py | 5 +++-- tools/validate_specs.py | 14 +++++++------- 6 files changed, 13 insertions(+), 12 deletions(-) rename RetirementAssetPortfolio.yaml => spec/RetirementAssetPortfolio.yaml (100%) rename RetirementAssetPortfolioReportTemplate.yaml => spec/RetirementAssetPortfolioReportTemplate.yaml (100%) diff --git a/RetirementAssetPortfolio.yaml b/spec/RetirementAssetPortfolio.yaml similarity index 100% rename from RetirementAssetPortfolio.yaml rename to spec/RetirementAssetPortfolio.yaml diff --git a/RetirementAssetPortfolioReportTemplate.yaml b/spec/RetirementAssetPortfolioReportTemplate.yaml similarity index 100% rename from RetirementAssetPortfolioReportTemplate.yaml rename to spec/RetirementAssetPortfolioReportTemplate.yaml diff --git a/tools/build_bundle.py b/tools/build_bundle.py index fdb7d5c..3ee5b50 100644 --- a/tools/build_bundle.py +++ b/tools/build_bundle.py @@ -38,7 +38,7 @@ def compute_content_signature(contents: dict[str, str]) -> str: def flatten_manifest_files(manifest: dict) -> list[str]: - ordered: list[str] = ["RetirementAssetPortfolio.yaml", "AGENTS.md"] + ordered: list[str] = ["spec/RetirementAssetPortfolio.yaml", "AGENTS.md"] for step in (manifest.get("load_sequence") or {}).values(): for file_name in step.get("files", []): if "*" not in file_name and file_name not in ordered: @@ -136,7 +136,7 @@ def save_cache(payload: dict[str, str]) -> None: def main() -> int: DIST.mkdir(exist_ok=True) # 1) 공통 입력 로드는 순차로 고정한다. - manifest = yaml.safe_load((ROOT / "RetirementAssetPortfolio.yaml").read_text(encoding="utf-8")) + manifest = yaml.safe_load((ROOT / "spec" / "RetirementAssetPortfolio.yaml").read_text(encoding="utf-8")) profiles = {mode: bundle_profile(manifest, mode) for mode in ("full", "compact", "ultra_compact")} all_profile_paths = [path for profile in profiles.values() for path in profile.get("files", [])] all_unique_paths = sorted({path for path in all_profile_paths if "*" not in path}) diff --git a/tools/validate_compact_bundle_equivalence_v1.py b/tools/validate_compact_bundle_equivalence_v1.py index bcf7eca..678ea32 100644 --- a/tools/validate_compact_bundle_equivalence_v1.py +++ b/tools/validate_compact_bundle_equivalence_v1.py @@ -9,7 +9,7 @@ import yaml ROOT = Path(__file__).resolve().parents[1] REQUIRED_KEYS = [ - "RetirementAssetPortfolio.yaml", + "spec/RetirementAssetPortfolio.yaml", "AGENTS.md", "spec/13_formula_registry.yaml", "spec/12_field_dictionary.yaml", diff --git a/tools/validate_source_authority_collapse_v1.py b/tools/validate_source_authority_collapse_v1.py index 617146e..df1d6e1 100644 --- a/tools/validate_source_authority_collapse_v1.py +++ b/tools/validate_source_authority_collapse_v1.py @@ -17,9 +17,10 @@ KNOWN_EXTS = { def _classify(path: Path) -> str: - if path.name in {"AGENTS.md", "README.md", "package.json", "GatherTradingData.json", - "RetirementAssetPortfolio.yaml", "RetirementAssetPortfolioReportTemplate.yaml"}: + if path.name in {"AGENTS.md", "README.md", "package.json", "GatherTradingData.json"}: return "authority" if path.suffix in {".md", ".yaml", ".json"} else "support" + if path.name in {"RetirementAssetPortfolio.yaml", "RetirementAssetPortfolioReportTemplate.yaml"}: + return "authority" parts = path.relative_to(ROOT).parts if parts and parts[0] in KNOWN_DIRS: return "authority" if parts[0] in {"spec", "governance", "src", "tools", "runtime"} else "support" diff --git a/tools/validate_specs.py b/tools/validate_specs.py index f6f58aa..b3185a9 100644 --- a/tools/validate_specs.py +++ b/tools/validate_specs.py @@ -683,8 +683,8 @@ def main() -> int: errors: list[str] = [] yaml_paths = [ - ROOT / "RetirementAssetPortfolio.yaml", - ROOT / "RetirementAssetPortfolioReportTemplate.yaml", + ROOT / "spec" / "RetirementAssetPortfolio.yaml", + ROOT / "spec" / "RetirementAssetPortfolioReportTemplate.yaml", *sorted((ROOT / "spec").rglob("*.yaml")), *sorted((ROOT / "examples").glob("*.yaml")), *sorted((ROOT / "proposals").glob("*.yaml")), @@ -704,7 +704,7 @@ def main() -> int: except Exception as exc: fail(errors, f"JSONL parse failed: {path}:{line_no}: {type(exc).__name__}: {exc}") - manifest = load_yaml(ROOT / "RetirementAssetPortfolio.yaml", errors) or {} + manifest = load_yaml(ROOT / "spec" / "RetirementAssetPortfolio.yaml", errors) or {} for step_name, step in (manifest.get("load_sequence") or {}).items(): for file_name in step.get("files", []): # Temp/ 파일은 런타임 생성 아티팩트 — CI 체크아웃 환경에서는 존재하지 않음 @@ -717,7 +717,7 @@ def main() -> int: fail(errors, f"manifest spec_files missing file: {key}: {file_name}") # All spec YAML files should be registered in manifest, governance, split indexes, or compatibility indexes. - manifest_text = (ROOT / "RetirementAssetPortfolio.yaml").read_text(encoding="utf-8") + manifest_text = (ROOT / "spec" / "RetirementAssetPortfolio.yaml").read_text(encoding="utf-8") for path in sorted((ROOT / "spec").rglob("*.yaml")): rel = path.relative_to(ROOT).as_posix() if rel not in manifest_text: @@ -742,7 +742,7 @@ def main() -> int: combined_text = "\n".join( path.read_text(encoding="utf-8") for path in [ - ROOT / "RetirementAssetPortfolio.yaml", + ROOT / "spec" / "RetirementAssetPortfolio.yaml", ROOT / "AGENTS.md", ROOT / "spec" / "07_output_schema.yaml", ROOT / "prompts" / "analysis_prompt.md", @@ -755,9 +755,9 @@ def main() -> int: fail(errors, "current schema version not referenced") active_text_paths = [ - ROOT / "RetirementAssetPortfolio.yaml", + ROOT / "spec" / "RetirementAssetPortfolio.yaml", ROOT / "AGENTS.md", - ROOT / "RetirementAssetPortfolioReportTemplate.yaml", + ROOT / "spec" / "RetirementAssetPortfolioReportTemplate.yaml", *sorted((ROOT / "spec").rglob("*.yaml")), *sorted((ROOT / "prompts").glob("*.md")), *sorted((ROOT / "tests").glob("*.yaml")),