0edb835abb
- build_environment_hints: split into _local_host_hints / _remote_backend_hint / _embedder_environment_hint; backend probe split into _run_backend_probe + _format_backend_probe with image-key / container-config dispatch tables replacing the if/elif chain. - Skills index: _SkillFilter (frozen dataclass) unifies the disabled+conditions check that was copied 4x (snapshot, scan, project, external); _collect_extra_skills dedupes the project/external scan loops; _read_category_descriptions dedupes DESCRIPTION.md reading; _label_visible_entries and _render_skills_index lift the org-labeling and rendering regions out of _build_skills_system_prompt_inner; snapshot and scan sources now feed one visibility pass. - Context files: _read_context_file + _context_section unify the read/strip/scan/section/truncate sequence across .hermes.md, AGENTS.md, CLAUDE.md and .cursorrules loaders. - Dead: _clear_backend_probe_cache (test-only helper; tests clear the dict directly), unused org_id_of_path re-export. - Comments/docstrings hand-compacted; every rule, invariant, ordering and failure-mode rationale kept. System prompt text verified byte-identical against origin/main over a 273-case fixture corpus (env hints x backends/probe states, skills index x toolsets / platforms / project / org / compact, context files x all loaders, full AIAgent._build_system_prompt_parts x 9 configs). Tool schema byte-identical.