# Phase 165.3-06 Summary

Status: implemented in working tree

## Goal

Open `165.3 / 999.70` by replacing raw subprocess-style failures and Python
 tracebacks at the CLI boundary with short actionable messages that tell the
 operator what failed and what to try next.

## What Landed

- human-oriented subprocess error formatter in:
  - `knowledge_hub/subprocess_error_support.py`
- failure messages now render as a short operator-facing block with:
  - failure context
  - command
  - exit code
  - primary error/output
  - suggested fixes
- suggestion heuristics now add context-sensitive guidance for common command
  classes such as:
  - `pip install`
  - `pip uninstall`
  - `git`
  - python/script execution
- CLI top-level runtime/file/value errors are now caught and rendered without
  a Python traceback in:
  - `knowledge_hub/aitp_cli.py`
- JSON mode now returns a compact error payload instead of crashing through the
  interpreter

## Verification

- `python -m pytest research/knowledge-hub/tests/test_subprocess_error_contracts.py -q`
- `python -m pytest research/knowledge-hub/tests/test_aitp_cli.py -q`
- `python -m pytest research/knowledge-hub/tests/test_aitp_cli_e2e.py -q -k "help_cli_human_paths or steer_topic_text_cli_json_path_materializes_direction or hello_cli_json_path_creates_demo_topic_and_status or first_run_bootstrap_loop_status_cli_flow or sync_l1_graph_export_to_theoretical_physics_brain_cli_json_path"`
- `python -m pytest research/knowledge-hub/tests/test_aitp_service.py -q -k "migrate_local_install_moves_workspace_legacy_and_records_pip_actions or migrate_local_install_reports_runtime_convergence_before_and_after or install_agent_writes_bootstrap_assets"`

## Outcome

`165.3` now closes the last roadmap-listed HCI slice:

- user-facing subprocess failures no longer spill a raw traceback through the
  CLI
- install/migration/runtime command failures now tell the operator what broke
  and what to try next

## Notes

- there is still one unrelated pre-existing service-suite failure in the dirty
  worktree:
  - `test_materialize_runtime_protocol_bundle_writes_expected_artifacts`
  - current cause: `progressive-disclosure-runtime-bundle.schema.json` is
    missing `$defs/l1_concept_graph`
- that schema issue is outside the scope of `165.3 / 999.70` and was not
  modified here
