Skip to content

docs(harness-monitor): add file-level P0 implementation plan#580

Open
phodal wants to merge 1 commit into
mainfrom
cursor/harness-monitor-implementation-plan-372e
Open

docs(harness-monitor): add file-level P0 implementation plan#580
phodal wants to merge 1 commit into
mainfrom
cursor/harness-monitor-implementation-plan-372e

Conversation

@phodal

@phodal phodal commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the repo todo inventory workflow by selecting Harness Monitor (highest architectural priority) and producing a file-level implementation plan for the four P0 run-centric console items.

What changed

Implementation order (for follow-up PRs)

  1. Unmanaged run fallback — remove session-count gate
  2. Operator state parity — unify process-scan run details
  3. Per-run eval/evidence — wire DB + cache scoping
  4. Policy/approval checkpoints — expand run details surface

Validation

Docs-only change; no code validation required per repo guidelines.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Documentation
    • Added a new implementation plan for a run-centric Harness Monitor workflow, outlining the phased rollout, validation steps, and follow-up checks.
    • Expanded the priorities page with a direct link to the detailed file-level implementation plan for easier navigation.

Selected harness-monitor as highest-priority area from the repo todo
inventory. Documents current gaps, file-level changes, tests, and
verification for the four P0 run-centric console items.

Co-authored-by: Cursor Agent (claude-4.6-sonnet-high-thinking) <198982749+cursoragent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new harness-monitor-run-centric-implementation.md execution plan document describing a four-step P0 migration for the Harness Monitor TUI/CLI, covering unmanaged run fallback, operator state expansion, per-run eval scoping, and policy checkpoint surfacing. Updates the existing priorities doc with a link to it.

Changes

Harness Monitor Run-Centric Implementation Plan

Layer / File(s) Summary
Document scope, current-state gaps, and step order
docs/exec-plans/active/harness-monitor-run-centric-priorities.md, docs/exec-plans/active/harness-monitor-run-centric-implementation.md
Adds title/metadata, current-state assessment (mixed-mode run synthesis divergence, repo-global vs. per-run eval gap), four-step implementation order, and test workflow. Priorities doc gains a link to the new file.
Steps 1–4 specification
docs/exec-plans/active/harness-monitor-run-centric-implementation.md
Specifies each step: unmanaged run fallback parity (Step 1), operator-state-rich run details (Step 2), per-run eval/evidence caching wired into TUI refresh (Step 3), and policy/approval checkpoint display in run details (Step 4), each with targeted files, tests, and exit criteria.
Verification, constraints, follow-ons, and commit strategy
docs/exec-plans/active/harness-monitor-run-centric-implementation.md
Adds end-to-end smoke checklist, characterization tests, hard constraints (no regressions, i18n, module-map), post-P0 follow-on items, and commit strategy table with size/shape limits.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 Hippity-hop through the plan's four gates,
Each step a carrot the dev anticipates.
Unmanaged runs now rendered with care,
Eval per run — no repo-global snare.
Policy checkpoints in the TUI shine bright,
A doc-only diff, but the roadmap feels right! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title is concise and accurately reflects the docs-only file-level implementation plan.
Description check ✅ Passed The description covers Summary, What changed, implementation order, and Validation, with only the Notes section missing as a separate block.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/harness-monitor-implementation-plan-372e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@phodal
phodal marked this pull request as ready for review June 30, 2026 12:22
@augmentcode

augmentcode Bot commented Jun 30, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Docs-only PR that selects Harness Monitor as the top run-centric priority area and adds a file-level plan to complete the P0 run-centric operator-console gaps.

Changes:

  • Added docs/exec-plans/active/harness-monitor-run-centric-implementation.md with a current-state assessment and the key blocking gaps (mixed hook+scan run visibility and repo-global fitness in TUI).
  • Outlined a four-step implementation sequence: unmanaged run fallback, operator-state parity in run details, per-run eval/evidence scoping, and policy/approval checkpoint surfacing.
  • For each step, enumerated target files/functions, proposed tests/snapshots to add or update, and concrete exit criteria.
  • Included verification commands and an end-to-end smoke checklist for mixed-mode workflows.
  • Linked the new implementation plan from docs/exec-plans/active/harness-monitor-run-centric-priorities.md.

Technical Notes: No production code changes in this PR; the new doc is intended to guide follow-up baby-step commits with test/snapshot gates.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


## Current State Assessment

Harness Monitor has already migrated to a four-layer layout (`context/`, `run/`, `observe/`, `govern/`, `evaluate/`, `attribute/`, `ui/`). Domain scaffolding exists but the TUI path still diverges from the CLI/orchestrator path in several critical places.

@augmentcode augmentcode Bot Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

four-layer layout reads inconsistent with the 7 directories listed in parentheses, which could confuse readers about the intended architectural layering.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

- Do not regress prompt-first runs, recovered markers, or existing synthetic run fallback
- Do not revert run semantics to session-centric navigation
- Do not duplicate assessment logic in UI — reuse `assess_run`, `assess_run_guardrails`, `gates.rs`
- All new UI strings must go through i18n if user-facing (TUI currently uses English literals; match existing `run_details.rs` pattern)

@augmentcode augmentcode Bot Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This constraint says new UI strings must go through i18n, but the parenthetical about “TUI currently uses English literals” could be read as permission to keep hardcoded strings. Consider clarifying so follow-up PRs don’t interpret this as bypassing i18n.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/exec-plans/active/harness-monitor-run-centric-implementation.md (1)

30-62: 📐 Maintainability & Code Quality | 🔵 Trivial

Use standard Markdown language tags for code blocks.

The code blocks use ```70:74:crates/... as the language identifier, which is non-standard and disables syntax highlighting. Use standard language tags and put file/line references in leading comments instead.

♻️ Proposed formatting
-```70:74:crates/harness-monitor/src/ui/views.rs
+```rust
+// crates/harness-monitor/src/ui/views.rs:70-74
         let hook_backed_session_count = items.len();
         items.extend(
             self.unmatched_agents_for_runs(&agent_matches)
                 .into_iter()
                 .filter(|_| hook_backed_session_count == 0)
+```
 
-```495:496:crates/harness-monitor/src/run/orchestrator.rs
+```rust
+// crates/harness-monitor/src/run/orchestrator.rs:495-496
     if !has_session_runs {
         for agent in detected_agents
+```
 
-```1007:1017:crates/harness-monitor/src/ui/run_details.rs
+```rust
+// crates/harness-monitor/src/ui/run_details.rs:1007-1017
 fn fitness_snapshot_for_run<'a>(
     cache: &'a AppCache,
     run: &crate::ui::state::SessionListItem,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/exec-plans/active/harness-monitor-run-centric-implementation.md` around
lines 30 - 62, The markdown examples are using non-standard fenced code block
labels like ```70:74:crates/...`, which prevents syntax highlighting. Update the
affected blocks in the document to use a standard language tag such as rust on
the fence, and move the file/line reference into a leading comment inside each
block; apply this consistently to the snippets from views.rs, orchestrator.rs,
and run_details.rs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/exec-plans/active/harness-monitor-run-centric-implementation.md`:
- Around line 30-62: The markdown examples are using non-standard fenced code
block labels like ```70:74:crates/...`, which prevents syntax highlighting.
Update the affected blocks in the document to use a standard language tag such
as rust on the fence, and move the file/line reference into a leading comment
inside each block; apply this consistently to the snippets from views.rs,
orchestrator.rs, and run_details.rs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85c34a99-8ff6-4cfb-8f56-2532f007703f

📥 Commits

Reviewing files that changed from the base of the PR and between 73eb1ed and a5df3a4.

📒 Files selected for processing (2)
  • docs/exec-plans/active/harness-monitor-run-centric-implementation.md
  • docs/exec-plans/active/harness-monitor-run-centric-priorities.md

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.

2 participants