chore: 최상위 룰 매니페스트 파일을 spec/ 폴더로 정리하고 도구 경로 참조 수정
This commit is contained in:
@@ -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})
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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")),
|
||||
|
||||
Reference in New Issue
Block a user