Repository navigation
Conversation
nshki
force-pushed
the
nshki/feat/hub/observed-outcomes
branch
from
November 26, 2026 09:31
4070791 to
bd52c03
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Sorting by per-prototype build numbers can link outcomes to the wrong build, while history fixtures omit required outcomes data and fail route-loader validation.
3 open issues
What changed in this PR
Adds observed outcomes to active learning details, connecting automated scores to the current guidance and visible Builds.
Changes:
- Adds a learning-package
outcomescommand and typed store API. - Filters scores to current wording, links them to successful Builds, and applies screenshot consent.
- Displays result labels, assessment summaries, and an empty state, with supporting tests, stories, and documentation.
| File | Description |
|---|---|
packages/learning/src/store.mjs |
Retrieves scored uses and their delivered versions. |
packages/learning/src/cli.mjs |
Adds the outcomes command. |
packages/learning/README.md |
Documents outcome listing. |
packages/learning/index.d.mts |
Declares the outcomes API. |
packages/learning/conformance/index.mjs |
Checks returned outcome records. |
hub/server/routes/api/learnings/types.ts |
Adds outcomes to route dependencies. |
hub/server/routes/api/learnings/create-learnings-route-dependencies/learning-outcomes.db.test.ts |
Covers Build linking and hidden outcomes. |
hub/server/routes/api/learnings/create-learnings-route-dependencies/index.ts |
Resolves Build links and consented screenshots. |
hub/server/repositories/prototypes/list-successful-commit-builds/index.ts |
Queries successful Builds on visible prototypes. |
hub/server/domains/learning/types.ts |
Defines reported and linked outcomes. |
hub/server/domains/learning/get-learning-history/index.ts |
Loads scores and filters by current wording. |
hub/server/domains/learning/get-learning-history/index.test.ts |
Covers wording-version filtering. |
hub/docs/learning-foundation.md |
Explains observed-outcome behavior. |
hub/client/pages/learnings-page/stories.tsx |
Adds populated and empty outcome states. |
hub/client/features/learnings-library/types.ts |
Defines outcome presentation data. |
hub/client/features/learnings-library/styles.css |
Styles outcome labels and icons. |
hub/client/features/learnings-library/index.tsx |
Renders assessments and evidence links. |
hub/client/application/hub/view-models/learnings-library/index.ts |
Maps scores to newest-first display results. |
hub/client/application/hub/view-models/learnings-library/index.test.ts |
Covers result mapping and links. |
hub/client/application/hub/learnings-contracts/types.ts |
Extends history response types. |
hub/client/application/hub/learnings-contracts/index.ts |
Validates outcome responses. |
Review effort: Balanced (adaptive)
| otherEvidenceCount: count, | ||
| contradictions: z.array(learningEvidenceResponseSchema), | ||
| otherContradictionsCount: count, | ||
| outcomes: z.array( |
Comment on lines
+20
to
+27
| orderBy: { number: "desc" }, | ||
| select: { | ||
| commitSha: true, | ||
| number: true, | ||
| prototype: { select: { id: true, name: true, branchName: true } }, | ||
| }, | ||
| }) | ||
| return builds.flatMap(({ commitSha, number, prototype }) => |
| @@ -0,0 +1,39 @@ | |||
| import type { PrismaClient } from "../../../generated/prisma/client.ts" | |||
| import { reviewablePrototypeWhere } from "../../prototype-index/reviewable-prototype-where/index.ts" | |||
nshki
force-pushed
the
nshki/feat/hub/observed-outcomes
branch
from
November 26, 2026 16:36
bd52c03 to
bfd67ea
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
nshki
force-pushed
the
nshki/feat/hub/observed-outcomes
branch
from
November 26, 2026 17:27
bfd67ea to
b9b533c
Compare
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.


Why
Hub now scores whether an applied learning helped, but nobody can see those scores. Repository administrators need to see how later Builds did with a learning's guidance before they can trust it, edit it, or retire it.
What changes
An active learning's detail view gains an "Observed outcomes" section. Each entry reads one score as a result. "Supports the guidance" means the agent followed it and the score was 3 or 4. "Possible concern" means it followed it and scored lower. "Inconclusive" means the agent didn't clearly follow it. Each entry shows the scorer's issue or reasoning, links to the Build it judged, and offers before and after screenshot links when screenshot consent is on. A learning with no scores reads "Not evaluated yet."
The learning package gains an
outcomes <memory-id>command that lists a learning's scores with the version each one judged. Hub keeps only scores of the wording agents get now, then links each to a successful Build of its commit on a prototype people can open.sequenceDiagram participant Page as Learning detail participant Hub participant CLI as replica-learning Page->>Hub: open learning Hub->>CLI: show --history Hub->>CLI: outcomes Hub->>Hub: keep current wording's scores Hub->>Hub: link each score to a visible Build Hub->>Hub: keep screenshots under active consent Hub-->>Page: outcomes, newest firstNeeds design review
Storybook screenshots
All screenshots use the light theme at 1280×800, scrolled to the new section.
Hub/Pages/Learnings: Active Detail and Not Evaluated Yet (new)
Active Detail
Not Evaluated Yet
Hub/Pages/Learnings: stories that share the active fixture
Editing Learning
Member Detail
Shared By This Repository
Shared From Another Repository
Unavailable Wording