feat: advance phase 5 AI workflow
This commit is contained in:
+8
-21
@@ -3,7 +3,7 @@
|
||||
|
||||
Version: 1.0
|
||||
Status: Living document
|
||||
Last Updated: YYYY-MM-DD
|
||||
Last Updated: 2026-07-30
|
||||
|
||||
---
|
||||
|
||||
@@ -491,27 +491,14 @@ Security features:
|
||||
|
||||
# AI
|
||||
|
||||
The application supports multiple providers.
|
||||
The deployment selects one AI provider with the `AI_PROVIDER` environment variable. The supported
|
||||
providers are Ollama, Gemini, and Groq; OpenAI and Claude are not implemented. The .NET API calls the
|
||||
private `ai-service` through `ISummarizerService`, and the provider is never selected by an end user or
|
||||
an administrator at request time.
|
||||
|
||||
Architecture:
|
||||
|
||||
Provider Interface
|
||||
|
||||
↓
|
||||
|
||||
OpenAI
|
||||
|
||||
Gemini
|
||||
|
||||
Claude
|
||||
|
||||
Ollama
|
||||
|
||||
Future Providers
|
||||
|
||||
The admin controls available providers.
|
||||
|
||||
Users should never be locked into one AI model.
|
||||
Ollama is the privacy-first local option. Cloud providers are deployment choices for operators who
|
||||
accept their data-handling and cost trade-offs. Keep this boundary until customer demand justifies a
|
||||
more complex provider router. See `docs/decisions/ADR-004-ai-provider-system.md`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# ADR-004 — Deployment-selected AI provider
|
||||
|
||||
- **Status:** Accepted
|
||||
- **Date:** 2026-07-30
|
||||
- **Phase:** 5 (AI improvements)
|
||||
|
||||
## Context
|
||||
|
||||
The AI sidecar supports Ollama, Gemini, and Groq. Earlier documentation described a per-request provider abstraction with OpenAI, Claude, administrator controls, and user choice; none of those capabilities exist. Adding them now would increase credential handling, privacy exposure, testing, and billing complexity without demonstrated customer demand.
|
||||
|
||||
## Decision
|
||||
|
||||
Each deployment selects exactly one provider through `AI_PROVIDER`. The .NET application continues to call the private `ai-service` through `ISummarizerService`; application code does not branch on provider. Ollama remains the local privacy-first option. Gemini and Groq are operator-selected cloud alternatives.
|
||||
|
||||
Provider choice is not exposed to users or administrators. Revisit this only when a customer requires provider choice and the deployment has explicit credential, privacy, quota, and audit rules for every enabled provider.
|
||||
|
||||
## Consequences
|
||||
|
||||
- One provider configuration and failure mode per deployment.
|
||||
- No OpenAI or Claude support is implied.
|
||||
- AI results remain suggestions that require user review.
|
||||
- Usage metering belongs at the application interaction boundary, independent of provider.
|
||||
- Cloud-provider privacy and cost are deployment responsibilities until SaaS quotas are introduced.
|
||||
@@ -152,11 +152,11 @@ Goal: polish. This is the healthiest area — grounding in the structured profil
|
||||
|
||||
| # | Task | Priority | Difficulty | Dependencies | Expected value |
|
||||
|---|---|---|---|---|---|
|
||||
| 5.1 | **Fix `docs/00-ai-context.md` to match the code.** **Decided 2026-07-17: do NOT build the abstraction.** | **P1** | **S** | none | The doc describes a provider interface over OpenAI/Gemini/Claude/Ollama with admin control and per-user choice. Reality: one `AI_PROVIDER` env var over Ollama/Gemini/Groq. Multi-provider cloud AI also undermines the privacy moat (see `docs/research/competitors.md` §4). Revisit only if a customer asks. `docs/architecture/current.md` §9 already records the truth. |
|
||||
| 5.1 | ✅ **DONE (2026-07-30)** — fixed `docs/00-ai-context.md` to match the code. **Decided 2026-07-17: do NOT build the abstraction.** | **P1** | **S** | none | The doc describes a provider interface over OpenAI/Gemini/Claude/Ollama with admin control and per-user choice. Reality: one `AI_PROVIDER` env var over Ollama/Gemini/Groq. Multi-provider cloud AI also undermines the privacy moat (see `docs/research/competitors.md` §4). Revisit only if a customer asks. `docs/architecture/current.md` §9 already records the truth. |
|
||||
| 5.2 | **AI usage metering** | **P1** | **M** | 1.5 | No quota, no tracking, no ceiling. Hard blocker for Phase 7; a cost risk today with `AI_PROVIDER=gemini`. |
|
||||
| 5.3 | **Surface CV generation inside the add-job wizard** | **P2** | **S** | 1.4 | The target workflow says "Generate CV if needed" at step 3. `POST /generate-tailored-cv-draft` exists but only post-save. |
|
||||
| 5.4 | **Keyword-gap analysis on match score** | **P2** | **M** | none | `JobCvMatchService` + `/match-score` exist. Gap analysis is the specific thing people pay Jobscan $49.95/mo for. |
|
||||
| 5.5 | **Write ADR-004 (AI provider system)** | **P2** | **S** | 5.1 | 0-byte file naming a real decision. |
|
||||
| 5.3 | ✅ **DONE (2026-07-30)** — surfaced optional CV generation inside the add-job wizard | **P2** | **S** | 1.4 | The target workflow says "Generate CV if needed" at step 3. `POST /generate-tailored-cv-draft` exists but only post-save. |
|
||||
| 5.4 | ✅ **DONE** — keyword-gap analysis on match score | **P2** | **M** | none | `JobCvMatchService` + `/match-score` exist. Gap analysis is the specific thing people pay Jobscan $49.95/mo for. |
|
||||
| 5.5 | ✅ **DONE (2026-07-30)** — wrote ADR-004 (AI provider system) | **P2** | **S** | 5.1 | 0-byte file naming a real decision. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user