Repository navigation
AIV-P2-011: show the decision pack with cited strengths, risks and Credalent's recommendation - #640
Merged
Merged
Conversation
submitScorecard completes the interview, keeps the draft (rebuilt on the
questions the page shows) as the submitted scorecard with its
recommendation, writes InterviewCompleted.v1, records each rated note as
interview_note evidence ("Interviewer's scorecard") and applies the
previewed ratings through the assessment's audited applyScoreChange, whose
audit entries are the last statements, in one transaction. A competency
not assessed in this round has no rating and stays a gap. A second submit
or a double click is "Already submitted"; a failure rolls everything back
and the saved draft stays.
The scorecard page saves, then submits with the preview the person saw,
says the outcome and links to the ranking; a rating needs a note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Copy without semicolons ("Your ratings are saved. Try again."), and a
submit help line that says only what is true now.
- A note is at most 1,000 characters (the most the assessment logs as a
reason), with its count under the field.
- The confirmation is the shared SuccessBanner (ok tone, tick, status)
with "See the ranking" inline, as the artboard's ok note.
- Partly shown records no evidence: the preview shows it changing nothing.
- The submit reuses the meeting summary's `decisions` wiring plus
`suggestedQuestions`, and both end in one `recordAndApply` helper.
- Every refusal says why; Submit waits, disabled with a reason, for the
preview of the ratings, stays disabled once submitted, and a save
refused as closed reads "Already submitted".
- One reader for the questions the page shows, for the page and submit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…n per pack member A new AI task, decisions.summariseMember@1, writes each pack member's card text from the snapshot they joined with: strengths citing inspected work, risks citing the facts or the claim, the Round 1 finding citing the interview notes, and Credalent's recommendation (advance or hold, never reject). The worker writes it once per member after PackReady.v1 or the new PackMembersAdded.v1 (decisions.member_summary, RLS forced, append-only for the app role), so no model is called inside the pack page or the preview's request: this replaces #636's live explainRanking call and its ingress-timeout shortcut. A rejected answer (a citation outside the snapshot, off the schema) or no model stores "Summary unavailable", shown with the assessment's own strengths. The pack page gains "What the role needs", "Competencies and weights", the cited card text with links to each evidence item, "Preparing summary", the empty pack and the shared-pack footer; the preview shows the same cited text; the job header's Decision stage reads "Shortlist ready" while an undecided pack exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A first Partly shown is not in the audit log: the comments, test names, README and copy now say the note is kept on the scorecard and logged only with a change it makes; the "every change is logged" test rates Cost and reliability Partly shown with a note (the ticket's Background) and finds one entry. - "Submitted and logged" only where something was logged. - A reopened submitted scorecard shows only the ranking link; a save refused because the interview closed says submitted or cancelled. - The submit rebuilds on the questions the page shows only when the latest assessment is on the interview's rubric version, as the page. - shortcut: an older dev draft with a note over 1,000 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker's summary job, wired as the worker wires it with the fake model: written once per member and per message (redelivery and a new message call no model), Arjun's answer citing a source outside his snapshot stored unavailable, Sara's facts read from the snapshot she joined with, a later member summarised alone after PackMembersAdded.v1, no stage, decision, notification, other outbox or audit entry written, the job's hiring owner reading the summaries and another job's owner, an interviewer and another workspace not, RLS alone on member_summary and inbox, and the app role refused any change or delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…source - shownQuestions and the suggestedQuestions port are tested: no question unless the latest assessment is on the interview's rubric version. - saveScorecardDraft throws scorecard_submitted for a completed interview and scorecard_closed only for a cancelled one, so the web action maps the codes directly instead of reading the interview again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…R-006 amendment The pack spec runs the worker's summary job itself with the fake model and checks, by keyboard and with axe in light and dark: "Preparing summary" with the scores shown, the role and its weights, Sara's cited strengths, risks, Round 1 line and "Credalent's recommendation: advance, and probe cost and reliability", each source linked to its item on her profile, Arjun's rejected answer shown as "Summary unavailable" with the assessment's own strengths, no decision option chosen, "Shortlist ready" on the Decision stage, the preview's cited text, and 404 for another workspace's member. The decisions README, the modules table and ADR-006 (point 6) record the task, its checks in code and its live runs: 3 of 3 for decisions.summariseMember, and all 15 judge golden cases in 3 of 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into feat/AIV-P2-011-pack-recommendation
…y test; word the stage rule for this layer tenancy.test.ts checks every workspace-owned table for a cross-workspace leak and stopped at decisions.member_summary and decisions.inbox, which nothing seeded (AGENTS.md 3.4): each workspace now gets a member's summary and a handled summary message, as the worker writes them. The decisions README and the pack page's header now say what is true for this layer: the pack summary moves no stage; recorded decisions do, AIV-P2-012. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its excerpt states Review blocker: @1 asked what an excerpt "says the candidate built, ran or measured", and its live answer for Arjun Menon called a service design and on-call runbook a reader he built and ran; the judge passed it in 5 of 5 runs under the generic rubric. @2 asks what the excerpt states, in its words, with no other activity, role, scale or result and no adjective of the model's own, and no longer names the words the eval checks for. Arjun's rubric now names what the KYC excerpt does and does not state, and the invented answer is pinned as a judge case that must fail (5 of 5 live). The three cases are re-recorded live under @2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aims labelled, the joined snapshot read - The recommendation's action is decided from the snapshot (advance at 50% or more of the weight met, otherwise hold), whatever the model chose; ADR-006 states the threshold. - A model that stays unavailable (timeouts, an open circuit) is no answer: nothing is stored and the pack is asked again 15 minutes later; only answers a redelivery cannot change are stored "Summary unavailable". The handler's classification and its rescheduled PackReady.v1 are unit-tested with a throwing model. - Each statement keeps the citation contract's claim flag and each CV quote is stored as a claim, shown under the shared Claim tag, never highlighted as cited evidence. - "Summary unavailable" shows the levels of the snapshot the member joined with, read by its id after getPack has authorised the job, instead of the latest result when it happens to match. - "What the job needs" (never "role" for a job), neutral "None stated in this summary." for an empty section, the deviations for model wording and the Round 1 score change, the need bars' "names no source" shortcut, the transaction-length shortcut, a required shortlistReady, and the unused preview key removed. - A hiring owner following a card's source reaches the profile's evidence, never a raw file or contact detail (Playwright). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, CI flakes fixed at their cause - AiUnavailable carries a typed `transient` flag (timeout, retryable status, open circuit, budget store). The pack summary job reschedules only those, carries on with the remaining members and asks again once at the end, for up to 6 hours after a member joined; a 4xx (Azure's content filter), an answer over the token cap, no AI service, or an outage past the window stores the member "Summary unavailable". - @3: a strength naming a competency must cite the facts line naming it, checked in code (`competency_uncited`); the judge passed @2's uncited names in 3 of 3 runs even with Huda's rubric naming the rule. The focus is a noun phrase, and the number rule names a counting word. All three cases re-recorded live, each with a live verdict; Huda's rubric names what her excerpts state. evals/config.ts records the judge's miss as a shortcut. - CI run 45877523565: settings.spec saved before the form hydrated (a native submit the form never saw), so it now saves again until the form answers; score-preview's seven-scenario test passed 30 s on the runner with every navigation about 2 s, so it gets a 90 s budget; the ranking's first render after sign-in took over 5 s there, so its title gets 15 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…AsSystem, ADR-006 for @3 and transient retries - The card reads "advance, and look into <focus> next", with fixtures holding the noun phrase the model now gives. - The statement-level claim flag, never rendered, is dropped; each citation keeps its own (a CV quote under the Claim tag). - readSnapshot is readSnapshotAsSystem; the pack page header says "What the job needs", lists the Claim tag and that claims are never highlighted, and names the code-decided action and the focus wording as deviations. - The hiring owner's profile check names where the file-link rule is proven (loadProfile.test.ts: a file-backed item, a recruiter's link as the positive control; seesFiles forced true made it fail). - ADR-006 records @3, the transient-only retry and its 6-hour window, the judge's misses, ADVANCE_SHARE's file and this round's live runs (task 3 of 3, judge golden cases 3 of 3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xcerpt first, the retry window from joining
- competency_uncited matched names as substrings, so a short name ("AI", "Go") inside a word ("maintains",
"algorithm") rejected every honest strength; names now match as whole phrases, in the text and in the quote.
- A strength's first citation must be the excerpt it is about, checked in code (it was prompt-only).
- The outage window is tested from a member's addedAt (13:00, now 14:00, pack prepared 08:00: rescheduled).
- settings.spec: the form is server-rendered, so a field typed into before hydration loses its value to the loaded
state; each edit-and-save step after a load now retries until the form answers with the edited value.
- The prompt file's comment reads "look into <focus> next".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f competency names tested
- settings.spec: "Use default" shows only while the value differs from the default, so the restore step clicks it
only when it is there; the two save steps wait the default time for "Settings saved" and the value (only the
out-of-range check, which never reaches the server, keeps the quick retry).
- decisions.summariseMember's competency check is tested for a lower-case name and a name with regex characters
("C++"), with their mutation checks; its docstring says a strength's first citation is inspected work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Final review nit, left as is: the docstring line at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Refs #125 · AIV-P2-011. It also closes the AI-recommendation gap of #570 (AIV-P1-116). The issue closes after the first
ai-eval-liveonmainafter merge is linked on it.Stack: this PR (base
main) → #641 (AIV-P2-012)What changed
The decision pack shows each member's cited strengths, outstanding risks, Round 1 finding and Credalent's recommendation. They are generated once, in the worker, when the pack is built or a member is added, never inside a page request.
AI task
decisions.summariseMember@3(packages/ai/src/prompts/decisions.summariseMember.ts). One call per member. Code enforces (zod schema and domain):recommendedAction(domain/summary.ts,ADVANCE_SHARE= 50% of the weight met) gives advance or hold, never reject, and overrides the model's choice. The card stays "Credalent's recommendation"; nothing is pre-selected and nothing moves a stage (AGENTS.md 1.5).competency_uncited) (AGENTS.md 1.6).claimflag. A CV citation renders as plain text under the sharedProvenanceTag("Claim awaiting validation"), never in the highlighter.expected.textwords except "claim", the AGENTS.md 1.6 label the facts lines already carry. It says a strength states what its excerpt states, in its words.Worker (
decisions.pack.summariseonPackReady.v1andPackMembersAdded.v1; it shares theassessmentqueue, ashortcut:):readAssessmentAsSystem(composition only, workspace-filtered, under RLS).decisions.inbox).AiUnavailablenow carries a typedtransientflag, set by@credalent/ai's client.shortcut:records that the model call runs inside the consumer transaction, against the message lock.Migrations (decisions):
0003_member_summaries(Drizzle Kit):member_summaryandinbox, each withworkspace_id, a tenant policy, a foreign key to the pack member, and a check that a ready row has text and a prompt version.0004_force_rls_member_summaries: FORCE RLS on both, and the app role loses UPDATE, DELETE and TRUNCATE onmember_summary.Web:
readSnapshotAsSystem, aftergetPackhas authorised. Empty sections read "None stated in this summary."Artboard deviations (at the top of
DecisionPack.tsxandPackPreview.tsx)How verified
recommendedActionat 60%, 50%, 49% and claims onlyloadProfile.test.ts, because the e2e app has no storage account;seesFilesforced true makes 2 tests fail.@3, each with code checks and a judge rubric.expected.judgerubrics were strengthened:pack-sara-invented-work, andpack-arjun-built-and-ran, which replays the@1invented-work answer.@3, gpt-4.1-mini, judge gpt-4.1):shortcut:inevals/config.tsand recorded in ADR-006: under a generic rubric the judge passed invented work 5 of 5 times. So each case's rubric names what its excerpts state, and competency naming is checked in code.pack-from-ranking:301: the first render took over 5 s; the title assertion now has a 15 s timeout, with a comment.score-preview:179: seven scenarios ran over the 30 s budget on the runner; it gets 90 s with a reason comment, the meeting-summary precedent.settings("Saving a change…"): a field typed into before hydration kept its loaded value. A sharededitAndSaveloop now covers all three edit steps (out of range, saving a change, restore default); restore default clicks only while its button shows, and each step still checks the stored value after reload. No assertion was weakened.competency_uncitedrules each removed;iflag dropped from the competency matcher;preparedAtonly.decisionstaken out of the prompt-safety list;doneskip removed;publishMembersAddedremoved;hrefForemptied;hasFocusemptied;ADVANCE_SHARE>=changed to>.pnpm buildpass.pack-from-ranking,job-header,settingsandscore-preview: 28 passed with retries off.Not done / risk
shortcut:).shortcut:).DecisionsRecorded.v1share theassessmentqueue. Adecisionsqueue needs an infra apply (owner).🤖 Generated with Claude Code