@@ -3,7 +3,7 @@ REPOSITORY MAP (Aider Style)
33================================================================================
44Repository: supply-graph-ai
55
6- Total Python files: 280
6+ Total Python files: 287
77
88├── demo/
99│ ├── __ init__ .py
@@ -158,6 +158,22 @@ Total Python files: 280
158158│ │ def save_okh_manifest()
159159│ │ def save_okw_facility()
160160│ │ def main()
161+ │ ├── okh_generation_baseline_report.py
162+ │ │ def main()
163+ │ ├── okh_generation_batch.py
164+ │ │ def _ parse_args()
165+ │ │ def _ select_repos()
166+ │ │ def main()
167+ │ ├── okh_generation_chunked_evaluation.py
168+ │ │ def _ load_report()
169+ │ │ def _ row_map()
170+ │ │ def _ field_presence_score()
171+ │ │ def _ summarize()
172+ │ │ def _ paired_ids()
173+ │ │ def _ compare_paired()
174+ │ │ def main()
175+ │ ├── okh_generation_layer_compare.py
176+ │ │ def main()
161177│ ├── populate_ome_from_synthetic_data.py
162178│ ├── setup_storage.py
163179│ ├── validate_docs.py
@@ -619,9 +635,19 @@ Total Python files: 280
619635│ │ │ class BOMBuilder (__ init__ , build_bom, _ validate_components)
620636│ │ ├── built_directory.py
621637│ │ │ class BuiltDirectoryExporter (__ init__ , _ bom_to_markdown, _ bom_to_csv...)
638+ │ │ ├── dataset_generation.py
639+ │ │ │ def _ default_log()
622640│ │ ├── engine.py
623641│ │ │ class EngineMetrics (__ post_init__ )
624642│ │ │ class GenerationEngine (__ init__ , _ validate_config, _ initialize_matchers...)
643+ │ │ ├── gitlab_instance.py
644+ │ │ │ def normalize_http_url()
645+ │ │ │ def parse_self_hosted_gitlab_hosts()
646+ │ │ │ def gitlab_path_has_namespace_and_project()
647+ │ │ │ def is_allowlisted_self_hosted_gitlab_url()
648+ │ │ │ def is_gitlab_http_clone_url()
649+ │ │ │ def extract_gitlab_owner_repo_from_path()
650+ │ │ │ def gitlab_api_v4_base_url()
625651│ │ ├── layers/
626652│ │ │ ├── __ init__ .py
627653│ │ │ ├── base.py
@@ -632,7 +658,9 @@ Total Python files: 280
632658│ │ │ ├── heuristic.py
633659│ │ │ │ class FilePattern
634660│ │ │ │ class HeuristicMatcher (__ init__ , _ initialize_file_patterns, _ initialize_content_patterns...)
661+ │ │ │ │ def _ is_license_like_file_path()
635662│ │ │ ├── llm.py
663+ │ │ │ │ class ChunkedLLMReduceSchema
636664│ │ │ │ class LLMGenerationLayer (__ init__ , _ create_llm_service, _ load_okh_schema_prompt...)
637665│ │ │ └── nlp.py
638666│ │ │ class EntityPattern
@@ -704,6 +732,18 @@ Total Python files: 280
704732│ │ class TextProcessor (__ init__ , _ initialize_license_patterns, _ initialize_version_patterns...)
705733│ ├── llm/
706734│ │ ├── __ init__ .py
735+ │ │ ├── chunking.py
736+ │ │ │ class TokenEstimator (__ call__ )
737+ │ │ │ class TokenBudget
738+ │ │ │ class TokenBudgetPolicy
739+ │ │ │ class ChunkingConfig (__ post_init__ )
740+ │ │ │ class TextChunk
741+ │ │ │ def default_token_estimator()
742+ │ │ │ def build_token_budget()
743+ │ │ │ def split_text_into_chunks()
744+ │ │ │ def _ max_end_for_budget()
745+ │ │ │ def _ apply_boundary_preference()
746+ │ │ │ def _ suffix_start_for_overlap()
707747│ │ ├── models/
708748│ │ │ ├── __ init__ .py
709749│ │ │ ├── metrics.py
@@ -714,6 +754,9 @@ Total Python files: 280
714754│ │ │ │ class LLMRequestType
715755│ │ │ │ class LLMRequestConfig
716756│ │ │ │ class LLMRequest (__ post_init__ )
757+ │ │ │ │ class LLMPayloadSection (__ post_init__ )
758+ │ │ │ │ class LLMTraceContext
759+ │ │ │ │ class LLMStructuredRequest (__ post_init__ )
717760│ │ │ └── responses.py
718761│ │ │ class LLMResponseStatus
719762│ │ │ class LLMResponseMetadata
@@ -771,7 +814,7 @@ Total Python files: 280
771814│ │ │ class ConnectionError
772815│ │ └── service.py
773816│ │ class LLMServiceConfig (__ init__ )
774- │ │ class LLMService (__ init__ , _ get_providers_to_try, _ update_metrics ...)
817+ │ │ class LLMService (__ init__ , _ build_structured_prompt, _ validate_response_schema ...)
775818│ ├── main.py
776819│ ├── matching/
777820│ │ ├── __ init__ .py
@@ -1181,7 +1224,7 @@ Total Python files: 280
11811224
11821225## Overview
11831226
1184- Total files analyzed: 280
1227+ Total files analyzed: 287
11851228
11861229## Entry Points
11871230
@@ -2159,7 +2202,7 @@ This module provides data models for LLM metrics ...
21592202
21602203This module provides data models for LLM requests...
21612204
2162- ** Exports:** LLMRequestType, LLMRequestConfig, LLMRequest
2205+ ** Exports:** LLMRequestType, LLMRequestConfig, LLMRequest, LLMPayloadSection, LLMTraceContext
21632206
21642207** Classes:**
21652208- ` LLMRequestType ` (inherits: Enum)
@@ -2168,6 +2211,12 @@ This module provides data models for LLM requests...
21682211 - Configuration for LLM requests....
21692212- ` LLMRequest `
21702213 - Base LLM request model....
2214+ - ` LLMPayloadSection `
2215+ - Named section of text for structured long-context workflows....
2216+ - ` LLMTraceContext `
2217+ - Trace metadata for chunked or multi-step request execution....
2218+ - ` LLMStructuredRequest `
2219+ - Structured request model for chunked map-reduce style workflows....
21712220
21722221### ` src/core/llm/models/responses.py `
21732222> LLM Response Models for the Open Hardware Manager.
@@ -3403,6 +3452,48 @@ This script generates OKH and OKW files specifically designed ...
34033452- ` save_okh_manifest(manifest, output_path) `
34043453 - Save OKH manifest to JSON file....
34053454
3455+ ### ` scripts/okh_generation_baseline_report.py `
3456+ > Generate OKH generation baseline report (Issue 1.3.1 Phase B5).
3457+
3458+ Reads tests/data/okh_generation/rep...
3459+
3460+ ** Exports:** main
3461+
3462+ ** Functions:**
3463+ - ` main() `
3464+
3465+ ### ` scripts/okh_generation_batch.py `
3466+ > Batch OKH generation for every supported entry in tests/data/okh_generation/repositories.json.
3467+
3468+ Writ...
3469+
3470+ ** Exports:** main
3471+
3472+ ** Functions:**
3473+ - ` main() `
3474+
3475+ ** Internal Dependencies:** 1 imports
3476+
3477+ ### ` scripts/okh_generation_chunked_evaluation.py `
3478+ > Evaluate chunked LLM canary quality gates against a baseline batch report.
3479+
3480+ This compares two batch ...
3481+
3482+ ** Exports:** main
3483+
3484+ ** Functions:**
3485+ - ` main() `
3486+
3487+ ### ` scripts/okh_generation_layer_compare.py `
3488+ > Compare 3-layer vs 4-layer OKH manifests on disk (heuristic metrics).
3489+
3490+ For each supported repo in te...
3491+
3492+ ** Exports:** main
3493+
3494+ ** Functions:**
3495+ - ` main() `
3496+
34063497### ` scripts/populate_ome_from_synthetic_data.py `
34073498> Populate the Azure Blob Storage container "ome" with OKH and OKW files from synthetic_data/.
34083499
@@ -4256,6 +4347,11 @@ This module provides functionality...
42564347- ` BuiltDirectoryExporter `
42574348 - Export generated manifests and BOMs to built directory structure...
42584349
4350+ ### ` src/core/generation/dataset_generation.py `
4351+ > Programmatic OKH generation from a repository URL or local clone path.
4352+
4353+ Mirrors the CLI ``generate-f...
4354+
42594355### ` src/core/generation/engine.py `
42604356> Generation Engine for OKH manifest generation.
42614357
@@ -4272,6 +4368,24 @@ This module provides the main orchestration engine t...
42724368
42734369This class coordinates a...
42744370
4371+ ### ` src/core/generation/gitlab_instance.py `
4372+ > Self-hosted GitLab instance detection and API base URL helpers.
4373+
4374+ Hosts are trusted as GitLab only wh...
4375+
4376+ ** Exports:** normalize_http_url, parse_self_hosted_gitlab_hosts, gitlab_path_has_namespace_and_project, is_allowlisted_self_hosted_gitlab_url, is_gitlab_http_clone_url
4377+
4378+ ** Functions:**
4379+ - ` normalize_http_url(url) `
4380+ - Match URLRouter-style normalization without importing URLRouter (avoid cycles)....
4381+ - ` parse_self_hosted_gitlab_hosts() `
4382+ - Read allowlist from env each time so tests can monkeypatch GITLAB_SELF_HOSTED_HO...
4383+ - ` gitlab_path_has_namespace_and_project(path) `
4384+ - ` is_allowlisted_self_hosted_gitlab_url(normalized_url) `
4385+ - True if hostname is in GITLAB_SELF_HOSTED_HOSTS and path looks like a project....
4386+ - ` is_gitlab_http_clone_url(normalized_url) `
4387+ - True for gitlab.com or allowlisted host with a valid project path (clone/API eli...
4388+
42754389### ` src/core/generation/layers/__init__.py `
42764390> Generation layers for OKH manifest extraction.
42774391
@@ -4326,9 +4440,11 @@ This layer applies rule-based pattern recogni...
43264440
43274441This layer uses Large Language Models for advance...
43284442
4329- ** Exports:** LLMGenerationLayer
4443+ ** Exports:** ChunkedLLMReduceSchema, LLMGenerationLayer
43304444
43314445** Classes:**
4446+ - ` ChunkedLLMReduceSchema ` (inherits: BaseModel)
4447+ - Minimal schema guardrail for chunked reduce output....
43324448- ` LLMGenerationLayer ` (inherits: BaseGenerationLayer)
43334449 - LLM Generation Layer using Large Language Models for advanced content analysis.
43344450...
@@ -4463,6 +4579,35 @@ This module provides URL validation, platform detect...
44634579
44644580This module provides a LLM provider abstraction ...
44654581
4582+ ### ` src/core/llm/chunking.py `
4583+ > Core chunking primitives for long-context LLM workflows....
4584+
4585+ ** Exports:** TokenEstimator, default_token_estimator, TokenBudget, TokenBudgetPolicy, ChunkingConfig
4586+
4587+ ** Classes:**
4588+ - ` TokenEstimator ` (inherits: Protocol)
4589+ - Protocol for token estimation functions....
4590+ - ` TokenBudget `
4591+ - Resolved token budget for a specific request....
4592+ - ` TokenBudgetPolicy `
4593+ - Policy inputs used to derive a TokenBudget....
4594+ - ` ChunkingConfig `
4595+ - Chunking settings for splitting large input text....
4596+ - ` TextChunk `
4597+ - A chunk of source text and its position in the original string....
4598+
4599+ ** Functions:**
4600+ - ` default_token_estimator(text) `
4601+ - Conservative fallback estimator with no external dependencies.
4602+
4603+ Uses a simple ch...
4604+ - ` build_token_budget(policy, request_type, provider) `
4605+ - Build a request-specific token budget and fail fast on impossible budgets....
4606+ - ` split_text_into_chunks(text, config, estimate_tokens_fn) `
4607+ - Split text into chunks by token budget with overlap and boundary preferences.
4608+
4609+ T...
4610+
44664611### ` src/core/llm/provider_selection.py `
44674612> LLM Provider Selection Utility for the Open Hardware Manager.
44684613
0 commit comments