Skip to content

(CODUX-69) Project ratings into task contracts - #2630

Merged
numnx merged 1 commit into
feature/CODUX-180-self-reflection-ratingfrom
task/feature-codux-180-self-reflection-rating-t02-codex-mranfzcq
Jul 7, 2026
Merged

(CODUX-69) Project ratings into task contracts#2630
numnx merged 1 commit into
feature/CODUX-180-self-reflection-ratingfrom
task/feature-codux-180-self-reflection-rating-t02-codex-mranfzcq

Conversation

@numnx

@numnx numnx commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Project ratings into task contracts

Automated task PR opened by Code UX for T02.

📋 Summary

Sprint: Sprint 180 · Self Reflection Rating · Task: T02

Expose each task agent's self-reflection as a persisted 5-star rating, surface the latest rating on Tasks and Live task cards, and show per-section ratings in an accessible hover/focus overlay.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-07 12:52:49 UTC
Finished 2026-07-07 12:59:14 UTC
Duration 6m 25s

📊 Token Usage

Metric Value
Input tokens 221,313
Cached input tokens 1,740,416
Output tokens 12,699
Total tokens 1,974,428
Invocations 1
Tool calls 65
Active time 5m 41s

Included usage estimate (subscription/local login): $2.36

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Attach the latest persisted self-reflection rating to the task contracts consumed by `/tasks` and `/live` without changing existing task status semantics.

## Scope
- Edit `src/contracts/project-management-types.ts`
- Edit `src/contracts/app-types.ts`
- Edit `src/repositories/project-management-repository.ts`
- Edit `src/repositories/project-runtime/runtime-status-projection.ts`
- Edit `src/app/dependency-factory/core-factory.ts` only if additional repository wiring from T01 is needed by projections
- Update `tests/backend/repositories/project-management-repository.test.ts`
- Update `tests/backend/repositories/project-runtime/runtime-status-projection.test.ts`
- Update `tests/backend/server/dashboard-project-api.test.ts` if API serialization needs coverage

## Implementation Requirements
1. Add optional `selfReflectionRating` fields to `TaskRecord` and `Subtask` using the contract introduced in T01.
2. In `ProjectManagementRepository.inflateTasks`, batch-load latest ratings for the listed task ids and attach them to each `TaskRecord`.
3. In `RuntimeStatusProjection.getMappedTasks` and `buildProjectStatus`, batch-load latest ratings and attach them to each live `Subtask`.
4. Ensure latest selection is deterministic by captured timestamp and row order when multiple task runs exist.
5. Add regression tests proving unreviewed/unrated tasks omit the field while rated tasks include overall and section ratings.

## Constraints
- Depends on T01's persisted table, repository, and rating contract.
- Do not add new dashboard endpoints; reuse existing `/api/projects/:projectId/tasks` and `/api/status` or project runtime projections.
- Do not perform per-task N+1 queries; use batch lookup for task ids.
- Preserve existing `latestReview`, `mergeIndicator`, dependency, and task ordering behavior.

## Verification
- Run `pnpm run test:backend -- tests/backend/repositories/project-management-repository.test.ts tests/backend/repositories/project-runtime/runtime-status-projection.test.ts tests/backend/server/dashboard-project-api.test.ts`.
- Run `pnpm run lint`.
- Success means both project task records and live subtasks include the same latest rating shape when ratings exist and remain unchanged when ratings do not exist.
🌿 Branch Info

Base: feature/CODUX-180-self-reflection-rating
Head: task/feature-codux-180-self-reflection-rating-t02-codex-mranfzcq


🤖 Generated by Code UX

@numnx
numnx merged commit 195edc7 into feature/CODUX-180-self-reflection-rating Jul 7, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-180-self-reflection-rating-t02-codex-mranfzcq branch July 7, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant