Add learned-skill substrate foundation - #366
Open
adriandemian wants to merge 132 commits into
Open
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
adriandemian
force-pushed
the
ralphx/ralphx/agent-88af9c08
branch
from
June 15, 2026 15:37
afedfc9 to
e24272a
Compare
adriandemian
force-pushed
the
ralphx/ralphx/agent-88af9c08
branch
8 times, most recently
from
June 15, 2026 22:05
7666408 to
8fa7331
Compare
…an-mode and verification-sensitive skill adapters)
Adds a Delete affordance to the latest automation run card, wired to the existing delete_automation_run backend command. The trash button shows only on the latest run and only when its status is running, agent_failed, or cancelled; a running run is stopped-then-deleted. Destructive confirm varies copy for the running (stop & delete) case, then archives the conversation and tears down the worktree/branch. Never shown for completed/published/merged or non-latest runs. Also removes an AutomationOverviewTab phase cap (limit=6) that slipped in via the main merge, restoring the all-phases scrollable list the branch tests assert.
Design-system polish of the Automation Detail view: - Elevate Section/Config cards to the canonical SectionCard chrome and add a shared FieldLabel eyebrow primitive across all label sites. - New design-system-native components: NoticeBanner (tinted, WKWebView-safe longhands) and CopyableRef (truncating ref + copy affordance). - Unify run/phase status -> StatusPill tone mapping (agent_failed=error, cancelled=neutral, paused=warning) across every writer; colored timeline marker dots and tone-bordered cards. - De-weight the run failure block into a NoticeBanner; humanize the paused stage; phase list uses status icons with only the in-progress row as a pill. - Run-card header restructured into an action cluster (delete preserved as a sibling of the expand toggle, with a slot reserved for a future Resume action); collapsed cards compacted. - Grouped-config rhythm/separators, inset segmented tabs, copyable branch refs. Regenerated automation-detail visual baselines. All vitest suites green.
Product-design pass on the runs timeline and detail tabs: - Neutral uniform run cards (no per-status tinting); the timeline marker dot is the only status color outside the pill — accent for the active run. - Header shows one StatusPill + demoted secondary states as muted text (ends the 3-pill noise); PR link inline; delete anchored in the header's right cluster instead of floating. - Footer action row groups View plan + Open conversation (a real button, no orange link float) with a reserved Resume slot; Run prompt is a borderless text disclosure. - Failure message is a calm left-rule instead of a full-bleed box; aligned metadata definition grid gives the previously-orphaned agent a real field; task-ledger counts anchored on the label row. - Collapsed cards compact to a single smart line (Run N, status, PR, time). - Spec tab gains a purpose caption + tidy header/excerpt/markdown rendering; Inputs tab explains itself with a clean source-PR row and empty state. Regenerated automation-detail visual baselines; all vitest suites green.
Adds resume-by-reopen for the latest failed automation run: a confined corrective transition (AgentFailed -> Running, bypassing the allow-table only through the dedicated reopen_run_corrective seam) followed by a re-drive into the run's EXISTING conversation + worktree, so the prior attempt's uncommitted work and history continue instead of restarting. - reopen_automation_run composition (application/automation/reopen.rs): gates (latest + AgentFailed + has-conversation/workspace + agent-not-running + not-paused, all fail-closed); claims authority via the corrective CAS FIRST, then resets stale state (clear judge_state+verdict, finished_at, publication metadata, re-arm a blocked review monitor, plan_reminder_count), sets a fresh agent_phase_started_at basis, and re-drives with a continue-in-place prompt. - New repo helpers clear_judge_state + clear_finished_at (trait + SQLite + Memory + test mock); resume_automation_run command wired in the registry. - Re-drive is behind an injectable AutomationRunRedriver seam so it is unit testable without a real agent spawn; tests cover the happy path (state resets + redrive into the existing conversation) and the reject/gate paths. Also fixes a main-merge break: recover_stale_publish_repair_for_workspace and its siblings gained a TaskOutcomeRepository arg on main but several test call sites weren't updated, which was breaking the entire lib-test build.
Wires the runs timeline to the resume_automation_run backend command. A Resume CTA (accent, Play icon) renders in the run-card footer's reserved slot only on the latest run when its status is agent_failed; confirming reopens the run in place (continuing the existing agent in its worktree, keeping prior work and history). Mirrors the delete-run wiring: resumeRun API wrapper, isAutomationRunResumable predicate, mutation + confirm in the detail view, onResumeRun threaded through the runs tab. Delete and Resume coexist on a latest failed card.
Merged runs (the success end-state) get a green marker dot and a soft success-tinted bg/border in the timeline; all other statuses stay neutral.
Reopening the latest failed run now transitions the owning automation Paused/Stopped -> Active (clearing the paused reason) after the run's corrective CAS, so the reopened run is actually advanced by the scheduler instead of sitting under a paused automation. No-op when already Active.
Replaces the 8-column grid table with a coherent, scannable list: - Each row is a status dot + a two-line identity block (name; then a muted secondary line folding stage/next-action, phase count, and mode·model) + a right meta cluster (StatusPill, runs N/M with a micro-progress hint, last run, chevron). Drops the PROJECT (always the filtered project) and BASE (truncated to noise) columns; drops the uppercase column header. - Resolves the STATUS vs NEXT-ACTION redundancy: the pill carries the coarse state, the secondary line carries the humanized reason (never 'Paused' twice). - Adds a shared PAUSED_REASON_LABELS map in automationRunView so the list, detail overview, and agents panel all render humanized paused reasons (no raw snake_case codes leaking to the UI). - Status->tone/dot color system via the existing Pill shim; stopped is neutral (red reserved for failures). One wrapping card with row dividers, no gridlines, WKWebView-safe longhands, memoized rows, rebuilt skeleton. Also fixes a stale merged-run card-color assertion left by the earlier merged success-treatment commit. typecheck + lint clean; 222 vitest tests green.
…#855) * feat: add project skill schema versioning * chore: preserve pending project skill schema edits
…-sync Run-card refinements from design feedback: - runTimelineHighlight now gives each key status a soft treatment: running/ active = soft accent (orange) bg+border, failed = soft darker surface with an error marker, merged = soft green (kept); everything else stays neutral. - 'Open conversation' becomes an outline button (reads clearly as a button). - Task ledger: replace the oversized 'In progress' StatusPill with a small status dot (animated pulse only on the live task), and wrap the rows in a bordered panel with row dividers for structure. - Task ledger stays in sync with the run's terminal state: on a merged/ completed/published run, a task the agent left 'active' renders as 'done' (no misleading live dot on a finished run). Regenerated runs-tab baseline; typecheck + lint clean; 222 vitest tests green.
…ralphx into ralphx/ralphx/agent-88af9c08
New automation runs branch off this branch and their agents follow this rule when validating. The whole src-tauri lib test target must compile before any filter runs, and it depends on Tauri mock-app helpers (create_mock_app*, tauri::test) — plus, once B2 lands, feature-gated test-only repo trait methods — all behind test-utils. Bare `cargo test … --lib` fails to compile (E0433/E0425/E0407) regardless of filter, making a run agent's local validation gate report a false failure. Update every lib-pinpoint example to `--features test-utils` and add a non-negotiable note; the standalone crates/ralphx-domain command is unaffected.
* feat(project-skills): update-over-create resolution (B2) Route all ProjectSkill writes through a single atomic `resolve` seam (candidate-load → pure evaluator → insert/update current row → append version) on both SQLite (one BEGIN IMMEDIATE) and memory (one write lock). Ambiguous matches fail closed to Conflict; lifecycle exclusions and approved-immutability-via-companion hold; reads are strict/fail-closed; versions are monotonic. `create`/`update_content`/`append_version`/`seed_for_test` become test-only (`cfg(any(test, feature = "test-utils"))`) so production can only write through `resolve`; `src-tauri`'s `test-utils` feature now enables `ralphx-domain/test-utils` so the lib test target sees them. * docs(rust-test-execution): lib pinpoints require --features test-utils The whole `src-tauri` lib test target must compile before any filter runs, and it depends on Tauri mock-app helpers (`create_mock_app*`, `tauri::test`) — plus, since B2, feature-gated test-only repo trait methods — all behind `test-utils`. Bare `cargo test … --lib` fails to compile (E0433/E0425/E0407) regardless of filter, which makes an agent's validation gate report failure. Update every lib-pinpoint example to `--features test-utils` and add a non-negotiable note; the standalone `crates/ralphx-domain` command is unaffected (`cfg(test)` covers it).
…ement - Task ledger reads as an aligned table now: task # · status dot · title · status label, inside a clearer elevated bordered panel with soft per-state colours (accent for in-progress, green for done). - Move the run delete action out of the header (it sat next to the collapse chevron and was easy to misclick) into the footer, grouped with Run prompt and separated from the primary Open conversation / Resume actions. - fix(automations): silence clippy dead_code on the test-only resume_automation_smart_with_redriver / SmartResumeReopener::Redriver seam so the --no-default-features lib clippy lane passes.
…on states Adds coverage for AutomationRunTaskLedger's error, all-terminal (no active tasks), and active→done terminal-coercion branches surfaced by codecov.
…ralphx into ralphx/ralphx/agent-88af9c08
Drop the unextracted automation publish-shortcut residue from skills-branch surfaces (now PR'd separately off main), migrate DEFAULT_PROJECT_VIEW usages to DEFAULT_APP_VIEW, dedupe a doubled scheduler test block, and fix arity at call sites that main's ManualRoleRuntimeOverride and task-outcome threading changed.
…ict ledger (#905) Spec §PR D4 lands three coupled pieces: - nullable publication_pushed_sha on AgentConversationWorkspace with a branch-fenced setter, dedicated clear, and memory/SQLite parity - a conservative merged_clean / merged_with_followups classifier fed by PrSyncState before terminal cleanup, never using merge_commit_sha - a deterministic plan-verdict ledger keyed by session+artifact+version+actor+verdict, wired into User approval, accept/reject-finalize, judge approve/revise, and approved-plan import Workspace Review repair: - persist the backend-stamped evaluated artifact version on judge verdicts and reject stored verdicts whose version differs from the current plan, so replaying an Approve verdict for v1 can no longer auto-approve a revised v2 - drop a needless borrow in pr_merge_poller that failed the clippy lane
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.
Context
This PR repairs
ralphx/ralphx/agent-88af9c08after the original ideation/task branch lost the expected learned-skill work. It also merges the recovered unsquashed adapter history so the visible branch contains the work that was previously only present in task/worktree history.What Landed
task_outcomesproject_skillsskill_usage_eventsPOST /api/project_skills/listPOST /api/project_skills/getlist_project_skillsget_project_skillsource: "learned";ralphx_project_skilldirectives carryingproject_skill_id.Decisions
task-e471f6fcadapter work is treated as follow-up adapter logic, not the substrate itself.Remaining Gaps
SkillUsageServiceafterAgentRuncreation..claude/skills, reporting/scoring, curator/import/promotion, and AgentProfile overlays remain follow-on milestones.Validation
cargo check --manifest-path src-tauri/Cargo.toml --libcargo test --manifest-path src-tauri/Cargo.toml learned_skill --libcargo test --manifest-path src-tauri/Cargo.toml project_skill_scope_guard --libcargo test --manifest-path src-tauri/Cargo.toml agent_composer --libcargo test --manifest-path src-tauri/Cargo.toml prompt_selected_citations_resolve_only_approved_same_project_skills --libcd plugins/app/ralphx-mcp-server && npm run buildcd plugins/app/ralphx-mcp-server && npm run testcd frontend && npm run test:run -- src/components/agents/composer/agentComposerCore.test.ts src/components/agents/AgentComposerSurface.test.tsxcd frontend && npm run typecheckgit diff --checkNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.