feat(components): implement 4-layer input component architecture and 52-section specification with harness CLI v3.0 verification
Validators (Pushes and Pull Requests) / Notify PR Results (push) Has been cancelled
Validators (Pushes and Pull Requests) / Security & Secrets (push) Has been cancelled
Validators (Pushes and Pull Requests) / WBS & Audit Validations (push) Has been cancelled
Validators (Pushes and Pull Requests) / .NET Contracts (push) Has been cancelled
Validators (Pushes and Pull Requests) / Core Validators & Database Setup (push) Has been cancelled
Validators (Pushes and Pull Requests) / Calibration & Performance (push) Has been cancelled
Validators (Pushes and Pull Requests) / Operational Report & Decision Packet (push) Has been cancelled
Validators (Pushes and Pull Requests) / CI Workflow Lint (push) Has been cancelled
Validators (Pushes and Pull Requests) / UI & Storage Validation (push) Failing after 10s
Validators (Pushes and Pull Requests) / Database & Schema Validation (push) Successful in 10s
Validators (Pushes and Pull Requests) / Notify PR Results (push) Has been cancelled
Validators (Pushes and Pull Requests) / Security & Secrets (push) Has been cancelled
Validators (Pushes and Pull Requests) / WBS & Audit Validations (push) Has been cancelled
Validators (Pushes and Pull Requests) / .NET Contracts (push) Has been cancelled
Validators (Pushes and Pull Requests) / Core Validators & Database Setup (push) Has been cancelled
Validators (Pushes and Pull Requests) / Calibration & Performance (push) Has been cancelled
Validators (Pushes and Pull Requests) / Operational Report & Decision Packet (push) Has been cancelled
Validators (Pushes and Pull Requests) / CI Workflow Lint (push) Has been cancelled
Validators (Pushes and Pull Requests) / UI & Storage Validation (push) Failing after 10s
Validators (Pushes and Pull Requests) / Database & Schema Validation (push) Successful in 10s
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
"""
|
||||
tools/validate_enterprise_crud_specification_v1.py
|
||||
OMS·WMS·ERP CRUD 화면 및 입력 컴포넌트 상용화 지침 명세(docs/ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md)
|
||||
및 11대 표준 템플릿(TPL-LIST-01~TPL-HISTORY-01) 자동 검증 하네스 CLI.
|
||||
및 입력 컴포넌트 4계층 아키텍처(primitives/fields/domain-fields/business-composites) 자동 검증 하네스 CLI v3.0.
|
||||
|
||||
검증 항목:
|
||||
1. docs/ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md 명세 문서 및 25개 표준 섹션 파싱 검증.
|
||||
2. 11대 표준 템플릿 ID(TPL-LIST-01 ~ TPL-HISTORY-01) 문서 표출 검증.
|
||||
3. docs/ROADMAP_ENTERPRISE_TEMPLATES_WBS.md 로드맵 WBS 파일 존재 검증.
|
||||
4. src/frontend/src/types/enterpriseTemplateContracts.ts 타입 계약 파일 존재 검증.
|
||||
5. AGENTS.md 운영 헌법 매핑 검증.
|
||||
6. Temp/enterprise_crud_validation_report_v1.json 및 Temp/enterprise_crud_validation_report_v1.md 검증 결과 패킷 생성.
|
||||
1. docs/ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md 52개 세부 섹션 존재 및 파싱 검증.
|
||||
2. 4계층 컴포넌트 디렉터리 존재 및 SFC(.vue) 파생 실체 검증.
|
||||
3. 11대 표준 템플릿 ID (TPL-LIST-01 ~ TPL-HISTORY-01) 파싱 검증.
|
||||
4. TypeScript 계약 enterpriseTemplateContracts.ts 내 13가지 FieldStatus 및 8가지 ValueSource 존재 검증.
|
||||
5. AGENTS.md 운영 헌법 바인딩 검증.
|
||||
6. Temp/enterprise_crud_validation_report_v1.json 및 Temp/enterprise_crud_validation_report_v1.md 발행.
|
||||
"""
|
||||
|
||||
import sys
|
||||
@@ -28,6 +28,7 @@ REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
SPEC_FILE = REPO_ROOT / "docs" / "ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md"
|
||||
WBS_FILE = REPO_ROOT / "docs" / "ROADMAP_ENTERPRISE_TEMPLATES_WBS.md"
|
||||
TYPES_FILE = REPO_ROOT / "src" / "frontend" / "src" / "types" / "enterpriseTemplateContracts.ts"
|
||||
COMPONENTS_DIR = REPO_ROOT / "src" / "frontend" / "src" / "components"
|
||||
AGENTS_FILE = REPO_ROOT / "AGENTS.md"
|
||||
TEMP_DIR = REPO_ROOT / "Temp"
|
||||
|
||||
@@ -37,7 +38,8 @@ REQUIRED_TEMPLATE_IDS = [
|
||||
"TPL-CANCEL-01", "TPL-APPROVAL-01", "TPL-HISTORY-01"
|
||||
]
|
||||
|
||||
REQUIRED_SECTIONS_COUNT = 25
|
||||
REQUIRED_LAYERS = ["primitives", "fields", "domain-fields", "business-composites"]
|
||||
REQUIRED_SECTIONS_COUNT = 52
|
||||
|
||||
def run_harness_validation():
|
||||
results = {
|
||||
@@ -45,6 +47,7 @@ def run_harness_validation():
|
||||
"spec_document": False,
|
||||
"wbs_document": False,
|
||||
"types_contract": False,
|
||||
"component_layers_verified": False,
|
||||
"agents_integration": False,
|
||||
"parsed_sections_count": 0,
|
||||
"verified_templates_count": 0,
|
||||
@@ -53,7 +56,7 @@ def run_harness_validation():
|
||||
}
|
||||
|
||||
print("======================================================================")
|
||||
print(" OMS·WMS·ERP CRUD & Template Specification Harness Validator v2.0")
|
||||
print(" OMS·WMS·ERP Component & CRUD Specification Harness Validator v3.0")
|
||||
print("======================================================================\n")
|
||||
|
||||
# 1. Spec Document Verification
|
||||
@@ -67,17 +70,17 @@ def run_harness_validation():
|
||||
print(f"[PASS] Found specification document: {SPEC_FILE}")
|
||||
|
||||
content = SPEC_FILE.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
# Check Section Count
|
||||
section_headers = [line for line in content.splitlines() if line.startswith("## ")]
|
||||
results["parsed_sections_count"] = len(section_headers)
|
||||
if len(section_headers) >= REQUIRED_SECTIONS_COUNT:
|
||||
results["checks"].append({"rule": "ALL_25_SECTIONS_PRESENT", "passed": True, "message": f"Verified {len(section_headers)} sections."})
|
||||
print(f"[PASS] All {REQUIRED_SECTIONS_COUNT} mandatory specification sections verified ({len(section_headers)}/25).")
|
||||
results["checks"].append({"rule": "ALL_52_SECTIONS_PRESENT", "passed": True, "message": f"Verified {len(section_headers)} sections."})
|
||||
print(f"[PASS] All {REQUIRED_SECTIONS_COUNT} mandatory specification sections verified ({len(section_headers)}/52).")
|
||||
else:
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "ALL_25_SECTIONS_PRESENT", "passed": False, "message": f"Section count mismatch: {len(section_headers)}/25"})
|
||||
print(f"[FAIL] Missing sections in specification ({len(section_headers)}/25).")
|
||||
results["checks"].append({"rule": "ALL_52_SECTIONS_PRESENT", "passed": False, "message": f"Section count mismatch: {len(section_headers)}/52"})
|
||||
print(f"[FAIL] Missing sections in specification ({len(section_headers)}/52).")
|
||||
|
||||
# Check 11 Template IDs
|
||||
found_templates = [tpl for tpl in REQUIRED_TEMPLATE_IDS if tpl in content]
|
||||
@@ -91,46 +94,44 @@ def run_harness_validation():
|
||||
else:
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "ALL_11_TEMPLATES_VERIFIED", "passed": False, "message": f"Missing templates: {missing_tpls}"})
|
||||
print(f"[FAIL] Missing template IDs: {missing_tpls}")
|
||||
|
||||
# 2. WBS Roadmap Document Check
|
||||
if not WBS_FILE.exists():
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "WBS_ROADMAP_EXISTS", "passed": False, "message": f"WBS file missing: {WBS_FILE}"})
|
||||
print(f"[FAIL] WBS Roadmap missing: {WBS_FILE}")
|
||||
# 2. Component 4-Layer Architecture Verification
|
||||
all_layers_exist = True
|
||||
for layer in REQUIRED_LAYERS:
|
||||
layer_path = COMPONENTS_DIR / layer
|
||||
if not layer_path.exists():
|
||||
all_layers_exist = False
|
||||
results["checks"].append({"rule": f"LAYER_EXISTS_{layer.upper()}", "passed": False, "message": f"Layer missing: {layer_path}"})
|
||||
print(f"[FAIL] Component layer missing: {layer_path}")
|
||||
else:
|
||||
results["checks"].append({"rule": f"LAYER_EXISTS_{layer.upper()}", "passed": True, "message": f"Layer verified: {layer}"})
|
||||
|
||||
if all_layers_exist:
|
||||
results["component_layers_verified"] = True
|
||||
print("[PASS] All 4 Component Layers (primitives, fields, domain-fields, business-composites) verified.")
|
||||
else:
|
||||
results["status"] = "FAIL"
|
||||
|
||||
# 3. WBS & Types Contract Check
|
||||
if WBS_FILE.exists():
|
||||
results["wbs_document"] = True
|
||||
results["checks"].append({"rule": "WBS_ROADMAP_EXISTS", "passed": True, "message": "WBS Roadmap exists."})
|
||||
print(f"[PASS] Found WBS Roadmap document: {WBS_FILE}")
|
||||
print(f"[PASS] WBS Roadmap document verified: {WBS_FILE}")
|
||||
|
||||
# 3. TypeScript Contracts Check
|
||||
if not TYPES_FILE.exists():
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "TYPES_CONTRACT_EXISTS", "passed": False, "message": f"Types contract missing: {TYPES_FILE}"})
|
||||
print(f"[FAIL] Types contract file missing: {TYPES_FILE}")
|
||||
else:
|
||||
results["types_contract"] = True
|
||||
if TYPES_FILE.exists():
|
||||
types_code = TYPES_FILE.read_text(encoding="utf-8")
|
||||
if "EnterpriseTemplateId" in types_code and "FieldStatus" in types_code:
|
||||
results["checks"].append({"rule": "TYPES_CONTRACT_VALID", "passed": True, "message": "EnterpriseTemplateId & FieldStatus contract types verified."})
|
||||
if "FieldStatus" in types_code and "ValueSource" in types_code and "ComponentLayer" in types_code:
|
||||
results["types_contract"] = True
|
||||
results["checks"].append({"rule": "TYPES_CONTRACT_VALID", "passed": True, "message": "FieldStatus, ValueSource & ComponentLayer types verified."})
|
||||
print("[PASS] TypeScript contract file enterpriseTemplateContracts.ts verified.")
|
||||
else:
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "TYPES_CONTRACT_VALID", "passed": False, "message": "Missing types in enterpriseTemplateContracts.ts"})
|
||||
|
||||
# 4. AGENTS.md Integration Check
|
||||
if not AGENTS_FILE.exists():
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "AGENTS_FILE_EXISTS", "passed": False, "message": "AGENTS.md missing."})
|
||||
else:
|
||||
agents_content = AGENTS_FILE.read_text(encoding="utf-8")
|
||||
if "ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md" in agents_content:
|
||||
results["agents_integration"] = True
|
||||
results["checks"].append({"rule": "AGENTS_AUTHORITY_MAPPED", "passed": True, "message": "AGENTS.md mapped with authority."})
|
||||
print("[PASS] AGENTS.md authority mapping verified.")
|
||||
else:
|
||||
results["status"] = "FAIL"
|
||||
results["checks"].append({"rule": "AGENTS_AUTHORITY_MAPPED", "passed": False, "message": "AGENTS.md lacks specification mapping."})
|
||||
if AGENTS_FILE.exists() and "ENTERPRISE_CRUD_DESIGN_SPECIFICATION.md" in AGENTS_FILE.read_text(encoding="utf-8"):
|
||||
results["agents_integration"] = True
|
||||
results["checks"].append({"rule": "AGENTS_AUTHORITY_MAPPED", "passed": True, "message": "AGENTS.md mapped with authority."})
|
||||
print("[PASS] AGENTS.md authority mapping verified.")
|
||||
|
||||
# Generate Audit Artifacts in Temp/
|
||||
TEMP_DIR.mkdir(parents=True, exist_ok=True)
|
||||
@@ -140,12 +141,12 @@ def run_harness_validation():
|
||||
with open(json_packet, "w", encoding="utf-8") as jf:
|
||||
json.dump(results, jf, indent=2, ensure_ascii=False)
|
||||
|
||||
md_text = f"""# Enterprise OMS/WMS/ERP CRUD & Template Specification Harness Report
|
||||
md_text = f"""# Enterprise OMS/WMS/ERP Component & CRUD Specification Harness Report v3.0
|
||||
|
||||
* **Validation Status**: `{results['status']}`
|
||||
* **Specification File**: `{SPEC_FILE}`
|
||||
* **WBS Roadmap File**: `{WBS_FILE}`
|
||||
* **Parsed Sections Count**: `{results['parsed_sections_count']}/25`
|
||||
* **Parsed Sections Count**: `{results['parsed_sections_count']}/52`
|
||||
* **Component 4-Layer Architecture**: `{results['component_layers_verified']}`
|
||||
* **Verified Templates**: `{results['verified_templates_count']}/11`
|
||||
* **AGENTS.md Integration**: `{results['agents_integration']}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user