This repository has been archived on 2026-07-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
can-you-assist/workplans/CYA-WP-0008-llm-connect-adapter-integration.md
tegwick f0ee0636c0 docs(workplans): add CYA-WP-0007 shell session and CYA-WP-0008 llm-connect
Define interactive cya shell mode with opt-in shell history, State Hub
orientation, session learning, and weakness hints. Pair with llm-connect
adapter integration for production multi-turn assistance.
2026-06-22 01:39:11 +02:00

4.5 KiB
Raw Blame History

id, type, title, domain, repo, status, owner, topic_slug, created, updated
id type title domain repo status owner topic_slug created updated
CYA-WP-0008 workplan llm-connect Adapter Integration for Production Assistance capabilities can-you-assist ready grok foerster-capabilities 2026-06-22 2026-06-22

CYA-WP-0008: llm-connect Adapter Integration

Goal

Replace FakeLLMAdapter on production code paths with a real llm-connect client behind the existing LLMAdapter Protocol, so one-shot cya "..." and cya shell (CYA-WP-0007) can deliver genuinely useful multi-turn assistance.

Preserve the seam: cya never hard-codes a vendor; all provider config lives in llm-connect. Credential routing via warden route before requesting secrets.

Background & References

  • Seam: src/cya/llm/adapter.pyLLMAdapter Protocol + FakeLLMAdapter
  • INTENT.md: cya asks; llm-connect reaches infrastructure
  • SCOPE.md: real client listed as explicit out-of-scope / future work
  • CYA-WP-0007: REPL usable with fake adapter for scaffolding; quality needs this slice
  • Credential routing: AGENTS.md / warden route find — no secrets in repo

Non-Goals

  • Provider-specific UI inside cya (model picker beyond minimal config)
  • Token billing dashboards or cost analytics
  • Embedding / RAG pipelines
  • Bypassing LLMAdapter Protocol for any production path

Dependencies

  • llm-connect package/API stability (coordinate with that repo owner)
  • Operator-provided credentials via OpenBao paths surfaced by warden route
  • CYA-WP-0007 T05 can proceed in parallel using FakeLLMAdapter

Task Breakdown

T01 — Adapter contract review and llm-connect API survey

id: CYA-WP-0008-T01
status: todo
priority: high

Document mapping from AssistanceRequest / AssistanceResponse to llm-connect calls. Identify config surface (TOML keys, env vars). Note gaps requiring llm-connect changes.

Acceptance criteria:

  • Short integration note in docs/ or workplan appendix.
  • Credential route catalog id(s) documented via warden route find.

T02 — Implement LLMConnectAdapter

id: CYA-WP-0008-T02
status: todo
priority: high

New class in src/cya/llm/ implementing LLMAdapter:

  • Delegates to llm-connect client
  • Graceful degrade message when llm-connect unavailable / misconfigured
  • FakeLLMAdapter remains for tests and --offline mode

Acceptance criteria:

  • Protocol-compliant; swap via config or env (CYA_LLM_ADAPTER=connect|fake).

T03 — Configuration and developer ergonomics

id: CYA-WP-0008-T03
status: todo
priority: medium
  • ~/.config/cya/config.toml [llm] section (backend, model hints)
  • Document warden route steps in README
  • make dev-install optional extra [llm] dependency group if needed

Acceptance criteria:

  • Operator can configure adapter without editing source.
  • No secrets committed; example config uses placeholders.

T04 — Orchestrator and shell integration

id: CYA-WP-0008-T04
status: todo
priority: high

Wire handle_request() and CYA-WP-0007 shell turns to adapter selection:

  • Default fake when unconfigured (current behavior)
  • Real adapter when config present
  • Multi-turn context: pass recent session turns in AssistanceRequest.context

Acceptance criteria:

  • One-shot and shell paths use same adapter factory.
  • Session context bounded (token/line budget documented).

T05 — Tests and offline CI strategy

id: CYA-WP-0008-T05
status: todo
priority: high
  • Mock llm-connect for unit tests (no live API in default make test)
  • Optional integration test marker @pytest.mark.llm_live for manual runs
  • Fake adapter remains default in CI

Acceptance criteria:

  • make test passes without network or API keys.
  • Live test documented for operator manual verification.

T06 — Documentation and SCOPE update

id: CYA-WP-0008-T06
status: todo
priority: medium

Update README, SCOPE.md (remove "only FakeLLMAdapter" where accurate), AGENTS.md.

Acceptance criteria:

  • Clear "configured vs offline" operator paths documented.

T07 — Register, sync, and handoff

id: CYA-WP-0008-T07
status: todo
priority: low

make fix-consistency, progress event, coordinate with llm-connect repo if API gaps found.

Success Criteria

  • Configured cya uses llm-connect for real inference.
  • Unconfigured / test environments behave exactly as today (fake adapter).
  • CYA-WP-0007 shell session becomes practically useful once both workplans complete.

Status note: ready on 2026-06-22. Can start T01T03 in parallel with CYA-WP-0007 T02T04.