feat(cya): T01-T07 core console-native MVP slice (CYA-WP-0001)

- T01: Python + Typer/rich + pyproject.toml + full src/ layout + working `cya` CLI entrypoint
- T02: Bounded transparent context collector (top-level only, provenance, ignores) + --explain-context
- T03: Genuine rule-based risk classifier (primary) + mandatory terminal confirmation, no auto-execute
- T04: LLMAdapter Protocol + deterministic FakeLLMAdapter seam (llm-connect boundary, zero bypass)
- T05: Strictly minimal phase-memory no-op ports (loud markers, per operator direction 2026-05-26)
- T06: Orchestrator coordinating the full flow; CLI is thin delegation
- T07: pytest harness + safety-focused tests (risk invariants + collector)

All changes verified by running the installed `cya` binary and `pytest tests/`.

Workplan updated with status. State Hub progress event logged (workstream 0a1233fd...).

Refs: CYA-WP-0001, Decision a644364b-11c4-49a9-bf17-99063382e27b
This commit is contained in:
2026-05-26 02:19:13 +02:00
parent da6c7acfc9
commit 637919dd8c
16 changed files with 1308 additions and 8 deletions

27
src/cya/llm/__init__.py Normal file
View File

@@ -0,0 +1,27 @@
"""llm-connect adapter boundary — the integration seam (T04).
can-you-assist owns orchestration + CLI experience.
llm-connect owns provider access, config, token counting, and structured I/O.
This package defines the small stable Protocol / interface that all model
interaction must flow through. A deterministic fake lives here for tests.
Real delegation to llm-connect is a small localized change once the contract
is stable.
See workplan CYA-WP-0001-T04 for the full contract and acceptance criteria.
"""
from .adapter import (
AssistanceRequest,
AssistanceResponse,
LLMAdapter,
FakeLLMAdapter,
)
__all__ = [
"AssistanceRequest",
"AssistanceResponse",
"LLMAdapter",
"FakeLLMAdapter",
]