Skip to content

tdfs4ds.impact_agent.footprint

tdfs4ds.impact_agent.footprint

What the consumer agent knows about the affected features and objects (deterministic).

A change to a process also changes what the assistant says: its documentation rows, its vector index, the glossary, plugin skills written for a feature, evaluation scenarios that ask about it. :func:assistant_footprint lists, for each affected feature or object of an impact model:

  • business-dictionary rows and process documentation rows (dependencies.footprint / _bd);
  • vector-index entries (dependencies.index_entries);
  • glossary terms that name it;
  • plugin skills (TDFS4DS_SKILLS_FOLDER: SKILL.md, skill.py, _lib) that name it;
  • saved evaluation scenarios that name it.

Read only, no language model. Every read is fail-open: a failed read is an unverified entry, never "nothing found". Name matching is on word boundaries, case-insensitive.

_RANK module-attribute

_RANK = {'unaffected': 0, 'may_change': 1, 'values_change': 2, 'breaks': 3}

MIN_NAME_LENGTH module-attribute

MIN_NAME_LENGTH = 2

_u

_u(v) -> str

_err

_err(exc) -> str

match_names

match_names(text: str, names: Iterable[str]) -> List[str]

The names that text names as whole words (case-insensitive, quotes ignored). Pure.

affected_items

affected_items(model: dict, *, include_unaffected: bool = False) -> List[dict]

The features and objects of an impact model the footprint is taken for: {kind: feature|dataset|process|view|attached_view, name, object, process_id, severity}. Pure.

_search_names

_search_names(items: List[dict]) -> List[str]

scan_skills

scan_skills(names: List[str], folder: Optional[str] = None) -> dict

Plugin skills whose SKILL.md / skill.py / _lib files name one of names: {"folder", "files": [{"path", "names"}], "error"}.

default_scenario_files

default_scenario_files() -> List[str]

The scenario set the admin app keeps (when it exists).

scan_scenarios

scan_scenarios(names: List[str], files: Optional[List[str]] = None) -> dict

Saved evaluation scenarios naming one of names: {"files", "scenarios": [{file, id, names}], "errors"}.

_default_readers

_default_readers() -> Dict[str, Callable]

_feature_ids

_feature_ids(inputs: Optional[dict], name: str, domain=None) -> List[int]

assistant_footprint

assistant_footprint(model: dict, inputs: Optional[dict] = None, *, readers: Optional[Dict[str, Callable]] = None, skills_folder: Optional[str] = None, scenario_files: Optional[List[str]] = None, include_unaffected: bool = False, database: bool = True) -> dict

The assistant's footprint of every affected feature and object of model.

Returns {"items": [...], "glossary": [...], "skills": {...}, "scenarios": {...}, "unverified": [...], "summary": {...}}. Each item carries documentation (counts per part), index (vector-index entries), glossary (terms), skills (files), scenarios (ids). readers replaces the database reads (tests); database=False skips them (said so).