Files
jobtrackingapp/docs/redesign/phase-6/p6-02/AI_REVIEW.md
T

39 lines
11 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# P6-02 — Existing AI interaction review
This is a source/caller and regression-contract review of existing approved tools, not model quality evaluation. The [Phase3 AI architecture](../../phase-3/AI_INTERACTION_MODEL.md), [AI principles](../../AI_PRINCIPLES.md), [original contracts](../../audit/FUNCTIONALITY_INVENTORY.md) and [P5-13 return conditions](../../phase-5/OPEN_BLOCKERS.md#p5-13-deferred-debt-and-return-conditions--2026-10-08) remain authoritative. No model/provider call, qualification, newly designed CV review UI or activation is performed.
## Existing presentation and mutation boundaries
| Entry / purpose and actual owner | Source/pending/error/review behavior found in source | Preservation/test evidence and remaining qualification |
|---|---|---|
| **Job analysis, match and timeline** — [ApplicationIntelligence](../../../../job-tracker-ui/src/components/ApplicationIntelligence.tsx) | Read-only backend answers load by job/category, with PageSection/ViewStateNotice and retained text/chip/data context. Mount reads existing data; it does not start AI. Internal `useIntelligence` suppresses results after unmount, but error shell currently declares no Retry action | [application-intelligence tests](../../../../job-tracker-ui/src/application-intelligence.test.tsx), [job-sections](../../../../job-tracker-ui/e2e/job-sections-presentation.spec.ts); W02/W03/E09. Source/revision/model provenance is limited to returned contract; cannot certify claim truth from a chip |
| **Strategy snapshot** — [ApplicationWorkflowAssist](../../../../job-tracker-ui/src/components/ApplicationWorkflowAssist.tsx) | Explicit Generate queues an operation; stable operationID, progress stage/percent,1000ms polling while nonterminal, existing allowed Cancel/Retry and terminal toast dedup. Existing plan remains distinct from queue/result. No auto-generation on navigation | [workflow-assist tests](../../../../job-tracker-ui/src/application-workflow-assist.test.tsx), StrategySnapshotOperation backend tests; W03/W12/S04. Enabled-worker F20 and actual model/delivery quality remain independently unqualified |
| **Status/workflow suggestion** — [ApplicationWorkflowAssist](../../../../job-tracker-ui/src/components/ApplicationWorkflowAssist.tsx) | Existing status identity and rationale/signal are displayed. Suggested status is not a newly created enum/pipeline or hiring probability; any write remains existing explicit handler | [workflow trust](../../../../job-tracker-ui/src/workflow-trust-signals.test.tsx), JobApplicationsWorkflowSignals/ApplicationIntelligence backend tests; W02/W03. No global change to statuses for visual consistency |
| **Tailoring/source CV** — [ApplicationAssets](../../../../job-tracker-ui/src/components/ApplicationAssets.tsx) | Existing job-attached CV relation and selected source are shown; create/copy/tailor uses current owner API. This changes/selects a variant; it does not silently promote CV changes to canonical profile | [application-assets](../../../../job-tracker-ui/src/application-assets.test.tsx), [native preservation](../../../../job-tracker-ui/e2e/redesign-preservation.spec.ts); W05/C07/E09. Broader live tailoring quality remains unverified |
| **Cover letter** — local `CoverLetterAiAssistant` in [ApplicationAssets](../../../../job-tracker-ui/src/components/ApplicationAssets.tsx) | Purpose/tone/action/document language/additional instructions and attached CV name; busy Generate; persistent local error with explicit Retry; Current/Suggestion side-by-side (stacked narrow). Apply puts proposal into local letter draft, Reject clears proposal; separate Save/history owner persists. No send implied | [application-assets](../../../../job-tracker-ui/src/application-assets.test.tsx), [job-sections](../../../../job-tracker-ui/e2e/job-sections-presentation.spec.ts), ApplicationAssets/AiWorkspace backend tests; W06/M04. Draft source freshness and delayed generation need bounded follow-up below; mocked responses do not establish model factuality |
| **Interview preparation** — local `InterviewAiAssistant` in [InterviewPrep](../../../../job-tracker-ui/src/components/InterviewPrep.tsx) | Attached CV source, explicit focus/category/language/instructions, busy Generate, persistent error and user-initiated rerun. Add to prep explicitly persists one AI-sourced entry; Reject clears proposal. Answer edits remain local until Save and physical interview schedule is not inferred | [interview-prep](../../../../job-tracker-ui/src/interview-prep.test.tsx), InterviewAiContext/InterviewPrepPersistence backend tests; W09/W10. Focus freshness/review and actual generated personal facts require independent qualification |
| **Career extraction/import** — [CareerProfilePage](../../../../job-tracker-ui/src/views/CareerProfilePage.tsx) | Existing upload/process/operation/diff/low-confidence selections/accept/discard/retry/cancel. Canonical profile changes require explicit selected review, with manual editing available. It is a distinct extraction destination, not CV proposal Apply | [profile-page tests](../../../../job-tracker-ui/src/profile-page.test.tsx), ProfileCvController/CvProfileDiffService tests, native keyboard picker in [responsive audit](../../../../job-tracker-ui/e2e/responsive-accessibility-audit.spec.ts); C01–C03/E09. OCR/corpus/model accuracy/full human review remain open; do not simplify away low-confidence controls |
| **Existing CV section assistant** — [AiSectionAssistant](../../../../job-tracker-ui/src/components/cv/AiSectionAssistant.tsx) | Purpose/action/document language, editable proposed text, Current, fact-check reminder, Apply/Reject/Close. Local requestID invalidates proposal on text/target/language/entitlement change and ignores stale response. Error uses shared toast; source/apply delegates to one editor owner | [ai-section-assistant](../../../../job-tracker-ui/src/ai-section-assistant.test.tsx), [CV editor tests](../../../../job-tracker-ui/src/cv-builder-deep-link.test.tsx), CV grounding/readiness; C11/C10/S04. **Production withheld**, not successful review UI completion |
| **Existing whole-document CV assistant** — `DocumentAiTab`/[editor callbacks](../../../../job-tracker-ui/src/views/CvBuilderEditor.tsx) | Block IDs/structure/source are retained; invalid/missing/duplicate blocks cannot apply. Editor flushes current queued save, verifies epoch/revision, sends expectedVersion, applies server-issued proposalToken, and handles conflict. RequestID/target content invalidation retains account/source boundaries | CV editor/CvAiGrounding/CvAiReadiness/CvRevisionReadiness tests, [real-HTTP withholding contract](../../../../job-tracker-ui/ai-tests/cv-ai-readiness.spec.ts); C10/C11/E09. Deterministic guards cannot qualify factual generated output or replace absent P5-13 redesigned review |
| **Privacy, entitlement and metering** — existing accountPlan/AiPrivacySettingsCard/AiUsageCard/API | Existing server-owned privacy/ownership/entitlement and usage limits govern action; unavailable/locked state must preserve manual alternatives. Client canUseAi is presentation, not authorization | AiPrivacyPolicy/AiUsageMeter/AccountPlans/API authorization suites, [AI readiness](../../phase-5/p5-13-readiness/README.md); S04/E09. Actual provider/checkout config is not proven by these tests |
## Consistency findings and bounded future reproduction
Common established pattern is explicit contextual invocation→bounded pending/error→review→deliberate domain action. Source/destination vocabulary is meaningful: Apply to CV can autosave via the established variant owner; Use in letter creates a local draft with separate Save; Add to prep creates a reviewed persisted item; accepting extraction changes selected canonical fields; none authorizes email send. These differences are intentional and must survive any presentation reuse.
The existing letter assistant has an explicit Retry button in its inline error; interview reruns through Generate; CV errors use existing toast and Generate. Read-only intelligence error presentation has no local Retry. This is a review finding for remaining domain migration, not evidence that a failed request erased original content. Reuse existing shared alert/state infrastructure only after retaining domain recovery behavior; no second notification/review framework.
**AI-SOURCE-01 — pending letter context:** source inspection finds no requestID/original-text fingerprint invalidation inside the local letter generator. To reproduce safely later, intercept/delay a synthetic generation response, change the editable manual letter while pending, settle the response and inspect Current/Suggestion/Apply. Expected acceptance is a review explicitly tied to current source or invalidation requiring regenerate; preserve the edited original and no-write Reject. Current Apply sets only a local draft and explicit Save remains, so do not misreport this source concern as proved automatic persisted data loss. No native failure is claimed here.
**AI-SOURCE-02 — pending interview focus:** generation snapshots selected focus into context, while the selected focus control remains editable and acceptance uses the current selected category/title. A delayed synthetic response with focus change is the required reproduction; verify stale review/category behavior and user recognition before correcting the narrow owner. No request/acceptance/backend policy is broadened for style. These existing controls belong to the Phase7 remaining application workflow review unless a fresh proof demonstrates a severe present defect.
Regeneration, source edits, cancelled operation, late response, missing/foreign record, account expiry/change and invalid proposal deserve the existing boundary assertions. A backend guard passing does not imply every legacy UI has the same local conflict affordance. Do not merge disparate Apply callbacks, request payloads, revisions or save/send semantics to reduce duplicate JSX.
## P5-13 remains withheld
PRES-C11/P5-13 is **DEFERRED / UNQUALIFIED / REVIEW UI NOT IMPLEMENTED**. The actual configured-target frozen32-case/366-call qualification has0 completed calls and0 independent human semantic reviews. Candidate runtime/model/hardware information is not measured approved identity. [Production registration](../../../../JobTrackerApi/Program.cs) withholds CvAiSuggestionService; generation/Apply return established503 `cv_ai_unavailable` before provider request/content/history write. Existing unrelated AI paths remain.
Future qualified P5-13 UI should reuse existing labelled source/destination/current/proposed comparison, non-color review semantics, busy/progress/error/Retry, explicit Accept/Reject/edited proposal and stale-context conflicts. Its source/block/proposal token/owner/entitlement/grounding validators remain authoritative and domain-specific. Manual workflow remains reachable when unavailable. This review neither designs/activates the withheld capability nor runs model qualification.
Fresh applicable frontend/backend/sidecar/real-HTTP guard results must come from the [P6-05 manifest](../p6-05/evidence/validation.json). Human AI semantics, reader interpretation, live model quality/provider operation remain NOT VERIFIED. Keep all qualification/deferred requirements open, and keep Production NO-GO.