Skip to content

pr/5c1db6641 fix discover claude models via cli initi#252

Merged
plusplusoneplusplus merged 20 commits into
mainfrom
pr/5c1db6641-fix-discover-claude-models-via-cli-initi
May 31, 2026
Merged

pr/5c1db6641 fix discover claude models via cli initi#252
plusplusoneplusplus merged 20 commits into
mainfrom
pr/5c1db6641-fix-discover-claude-models-via-cli-initi

Conversation

@plusplusoneplusplus
Copy link
Copy Markdown
Owner

  • fix: discover claude models via cli initialize
  • feat(ralph): zero system-prompt injection (AC-01..AC-05)
  • feat(effort-tiers): AC-01 — add effortLevels.enabled admin config flag
  • feat(effort-tiers): AC-02 per-provider effort-tier storage and REST endpoints
  • feat(effort-tiers): AC-03 — Effort Tiers editor on AI Provider page
  • feat(effort-tiers): AC-04 — Effort Tier selector in new-chat composer
  • feat(effort-tiers): AC-05 — Effort Tier selector in follow-up composer
  • fix: add OpenAPI docs for effort-tier endpoints and fix missing mock in pending-task-info test
  • feat(work-items): add goal leaf type under PBI
  • feat(work-items): mobile add-child button and type-picker (AC-01 to AC-04)
  • feat(effort-tiers): hardcoded per-provider defaults with source markers
  • feat: add Reasoning Effort to conversation metadata popover
  • Make diff classification skill-based
  • Fix admin prompt test after classification prompt removal
  • fix: propagate provider through cold resume in queue-follow-up
  • Show effort tier model in tooltip
  • Map Codex modes to sandbox settings
  • Use Claude Opus 4.7 for Claude provider effort tier defaults
  • feat(codex): always grant ~/.coc as a Codex accessible directory

plusplusoneplusplus and others added 19 commits May 30, 2026 21:42
Remove all Ralph-specific content from system messages across every Ralph
phase. All Ralph framing now lives exclusively in user messages.

AC-01: Execution iterations - system message is generic only
- Remove RALPH_BASE_INSTRUCTIONS, buildRalphSystemMessage, and all Ralph
  framework strings from system message builder in ralph-executor.ts
- buildRalphIterationPrompt now accepts progressPath, currentIteration,
  maxIterations and outputs: skill pointer -> dynamic context -> <goal>
- Executor overrides effectivePrompt each iteration (bridge reuses old
  prompt, so executor rebuilds it fresh with correct iteration counter)

AC-02: Final-check - system message is generic only
- Remove buildRalphFinalCheckSystemMessage and RALPH_FINAL_CHECK_BASE_INSTRUCTIONS
  from final-check path in buildModeOptions
- buildFinalCheckPrompt user message already carries full Ralph framing

AC-03: Grilling - grill suffix moved from system to user message
- Remove RALPH_GRILL_SUFFIX append to systemMessage.content in chat-base-executor
- Prepend RALPH_GRILL_SUFFIX to effectivePrompt when phase === 'grilling'
  so every grilling turn carries the instruction

AC-04: Remove iteration prompt override and retriever scaffolding
- Delete RALPH_WORK_INTENT_PROMPT, PROMPT_PREFIX,
  RALPH_SPEC_CONTRACT_PROMPT, RALPH_ITERATION_PROMPT_DEFAULT_HEAD
- Remove promptOverride from BuildRalphIterationPromptInput and
  BuildRalphIterationTaskInput
- Remove synthesis promptOverride (no callers used it)

AC-05: Tests lock in the new split
- Negative system-message assertions for AC-01, AC-02, AC-03
- Positive user-message assertions (skill pointer, progress path,
  iteration counter, <goal> block, grill prefix)
- Updated ralph-start-routes.test.ts to assert ultra-ralph in prompt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CLIConfig / ResolvedCLIConfig: add effortLevels?: { enabled?: boolean }
- DEFAULT_CONFIG: effortLevels.enabled defaults to false
- CLIConfigSchema (Zod): add effortLevels object
- namespace-registry: add EFFORT_LEVELS_SOURCE_KEYS + effortLevels descriptor
- admin-config-fields: bool('effortLevels.enabled', ...) entry (live runtime)
- coc-client AdminResolvedConfig / AdminConfigUpdate: add effortLevels field
- RuntimeDashboardConfig.features: add effortLevelsEnabled boolean
- buildRuntimeDashboardConfig: populate effortLevelsEnabled from config
- SPA utils/config.ts: DashboardConfig field + isEffortLevelsEnabled() helper
- AdminPanel.tsx: state, init, dirty-check, save, cancel, UI toggle row

Tests: update snapshot in config.test.ts; add effortLevels cases to
admin-config-fields.test.ts and runtime-config-handler.test.ts (unit +
live end-to-end via RuntimeConfigService).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ndpoints

- Extend CLIConfig and ResolvedCLIConfig provider settings with effortTiers
  (low/medium/high → { model, reasoningEffort? })
- Add getProviderModelSettings / writeProviderModelSettings support for effortTiers
- Add EffortTierEntry / EffortTiersMap types and getProviderCatalog helper
- Register GET /api/agent-providers/:provider/effort-tiers (read tier map)
- Register PUT /api/agent-providers/:provider/effort-tiers (single-tier upsert or
  full-map replace with catalog + reasoningEffort validation)
- Add EffortTierEntry / ProviderEffortTiersResponse to coc-client contracts
- Add getEffortTiers / setEffortTier client methods to AgentProvidersClient
- Add 19-case test file covering: GET default/configured, PUT upsert/merge/replace,
  invalid tier key, missing model, invalid model (400), invalid effort (400),
  null reasoningEffort allowed, per-provider isolation, and bad-request cases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add ProviderEffortTiersSection component and useProviderEffortTiers hook
for the admin UI. Three rows (Low/Medium/High) each with a Model dropdown
and a dependent Reasoning Effort dropdown. Standard dirty/save/cancel
card semantics using full-map PUT replace.

- coc-client: add replaceEffortTiers() (full-map PUT) to AgentProvidersClient
- hooks/useProviderEffortTiers: fetch/local-draft/save/cancel with dirty tracking
- features/models/ProviderEffortTiersSection: admin editor component (aip-*/ar-* classes)
- admin/AIProviderPage: lazy-loads and renders ProviderEffortTiersSection below models section
- admin-redesign.css: aip-tier-table/aip-tier-label styles
- 25 tests: 12 hook tests + 13 component tests (all passing)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add EffortTierSelector component (Low/Medium/High dropdown chip, mirrors
  EffortPillSelector style; unconfigured tiers greyed with tooltip)
- Add resolveEffortTier / resolveEffectiveTier pure utilities
- Wire useProviderEffortTiers into NewChatArea; when effortLevels.enabled is
  true and the active provider has ≥1 tier configured, the tier selector
  replaces the model picker + effort pill in the toolbar
- Zero-tier fallback: legacy controls reappear when all tiers unconfigured
- Last-picked tier persisted to localStorage (coc:effort-tier:<workspaceId>);
  first-time default = Medium; auto-fallback when stored tier goes unconfigured
- handleSend resolves the selected tier to model+reasoningEffort at send time;
  legacy path unchanged when flag is off or zero tiers
- Tests: 9 resolveEffortTier, 11 EffortTierSelector, 9 NewChatArea effort-tier
  (all 66 affected tests pass; tsc --noEmit clean)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wire EffortTierSelector into FollowUpInputArea via 4 new props
  (useEffortTierMode, effortTierMap, selectedEffortTier, onEffortTierChange)
- ChatDetail owns tier state (selectedFollowUpEffortTier), fetches tier map
  via useProviderEffortTiers(sessionProvider), persists last-picked tier to
  localStorage, and passes tier-resolved model+effort to useSendMessage
- When effortLevels.enabled is true and provider has >=1 tier configured,
  EffortTierSelector replaces the model picker + effort pill in follow-up toolbar
- Zero-tier fallback: legacy controls reappear when flag off or no tiers
- Tests: 12 new FollowUpInputArea effort-tier tests (all pass)
- Fix missing isEffortLevelsEnabled / getEffortTiers / useProviderEffortTiers
  mock entries in 4 existing test files that render NewChatArea or ChatDetail

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…in pending-task-info test

GAP-01: add GET /api/agent-providers/{provider}/effort-tiers and
PUT /api/agent-providers/{provider}/effort-tiers path entries to
openapi.yaml, including EffortTierEntry, EffortTiersMap,
ProviderEffortTiersResponse, EffortTierUpsertRequest, and
EffortTiersMapRequest schemas in the components/schemas section.

GAP-02: add isEffortLevelsEnabled: () => false to the vi.mock for
utils/config in pending-task-info.test.tsx so ChatDetail no longer
errors when calling isEffortLevelsEnabled() during render. Fixes 16
previously failing tests (exit code 1 → 0).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce a third leaf work-item type, 'goal', alongside work-item and bug
under PBI. A goal is outcome-oriented and carries optional success criteria.
Add a 'drafting' status for the pre-planning spec phase and a grillSessionId
field to link a future spec-drafting session.

- types + contracts: goal type (leaf, parent=pbi), drafting status,
  successCriteria/grillSessionId fields, transitions, rollup typings
- routes: thread successCriteria + grillSessionId through create/update
- SPA: orange GOAL pill/label/prefix, create dialog goal option + success
  criteria field, drafting status badge, goal success-criteria panel in detail
- tests: type rules, route create/update, drafting transition, SPA layout

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…C-04)

- WorkItemHierarchyNode: add isMobile + onAddChild props; render always-visible
  '+' button on container nodes (epic, feature, pbi) when isMobile is true
- WorkItemHierarchyTree: add isMobile prop; add handleAddChild callback that
  calls onCreateItem directly for single-child-type parents (epic→feature,
  feature→pbi) and opens a bottom-sheet TypePickerModal for multi-child-type
  parents (pbi→work-item/bug/goal); TYPE_LABELS used for picker labels
- WorkItemDetail: add isMobile + onCreateChild props; render 'Add Child' button
  for container items on mobile, not gated by hierarchyEnabled; inline
  child-type-picker modal mirrors tree flow
- WorkItemsTab: pass isMobile={isMobile} to WorkItemHierarchyTree and
  WorkItemDetail; pass onCreateChild={openCreateDialog} to WorkItemDetail
- Tests: 27 new assertions in WorkItemHierarchy.layout.test.ts covering
  AC-01 (node button), AC-02 (type picker in tree), AC-03 (detail pane button),
  AC-04 (mobile-only gate); all 61 tests pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Defaults for copilot/codex/claude effort tiers (low/medium/high) live in coc-agent-sdk via getDefaultEffortTiers and mergeEffortTiersWithDefaults. The agent-providers GET endpoint merges stored config with defaults and returns a per-tier 'source' marker plus a separate 'defaults' map; PUT continues to persist only user-configured tiers (defaults never baked in).

Admin UI shows a 'Default' badge for default-sourced rows and the Clear action reverts to the default rather than deleting. Hook tracks remote/local/defaults separately and dirty-checks only config-sourced entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Show the reasoning effort level (low/medium/high/xhigh) in the
ConversationMetadataPopover, sourced from config.reasoningEffort
(set at process creation time) with fallback to metadata.reasoningEffort.
The row appears after Agent Provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a chat session could not be warm-resumed (cold path), the new task
was built without forwarding payload.provider from the parent task.
This caused getTaskChatProvider() on the WS broadcast to return undefined,
falling back to Copilot green even when the original chat used Claude/Codex.

Fix: carry payload.provider from the parent task into the cold-resume
task spec, matching how workingDirectory and workspaceId are forwarded.

Add focused unit tests (queue-follow-up-provider.test.ts) that directly
exercise the cold-resume path via a mock bridge:
- provider: 'claude' is inherited by the new task payload
- absent provider leaves the new task payload provider-free

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update medium and high tier defaults for the claude provider from
claude-opus-4.8 to claude-opus-4-7. The copilot-sdk provider defaults
are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mirror the Claude provider behavior by always appending ~/.coc to the
Codex thread additionalDirectories, alongside caller-supplied skill and
additional directories. The entry is de-duplicated case-insensitively on
Windows and only added when not already present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…vior

The 'Map Codex modes to sandbox settings' change made interactive Codex
threads use read-only sandbox (only plan/autopilot use danger-full-access),
and the effort-tier tooltip now prefixes the tier label. Update the stale
forge codex-sdk and coc EffortTierSelector tests to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@plusplusoneplusplus plusplusoneplusplus merged commit 1f1c9d8 into main May 31, 2026
66 of 68 checks passed
@plusplusoneplusplus plusplusoneplusplus deleted the pr/5c1db6641-fix-discover-claude-models-via-cli-initi branch May 31, 2026 05:07
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