Cross repo isolation

This commit is contained in:
2026-05-02 21:55:35 +02:00
parent a462827eda
commit bf2dc4ae98
10 changed files with 695 additions and 14 deletions

View File

@@ -188,7 +188,7 @@ class CandidateGraphGenerator:
),
source_refs=self._source_refs(interfaces),
primary_class="interface",
attributes=self._interface_attributes(interfaces),
attributes=self._interface_attributes(interfaces, docs, chunks),
features=features,
evidence=self._evidence(tests, examples, docs),
)
@@ -523,10 +523,33 @@ class CandidateGraphGenerator:
attributes.append("interface")
return "developer-tooling", self._unique(attributes)
def _interface_attributes(self, interfaces: list[ObservedFact]) -> list[str]:
def _interface_attributes(
self,
interfaces: list[ObservedFact],
docs: list[ObservedFact] | None = None,
chunks: list[ContentChunk] | None = None,
) -> list[str]:
feature_types = {self._feature_type(fact) for fact in interfaces}
attributes = ["api" if item == "API" else "cli" if item == "CLI" else "callable" for item in feature_types]
return self._unique(["surface", *attributes, "utility-owned"])
utility = self._interface_utility_relationship(docs or [], chunks or [])
return self._unique(["surface", *attributes, f"utility-{utility}"])
def _interface_utility_relationship(
self,
docs: list[ObservedFact],
chunks: list[ContentChunk],
) -> str:
doc_paths = {fact.path for fact in docs}
text = " ".join(
chunk.text.lower()
for chunk in chunks
if chunk.path in doc_paths
and chunk.kind in {"intent", "documentation"}
and chunk.metadata.get("source_role") != "derived_scope"
)
if any(token in text for token in ("facade", "proxy", "wrapper", "wraps ")):
return "facade"
return "owned"
def _feature_attributes(
self,