UAT: First-run setup does not auto-generate thinking-effort presets from actor schema #10394

Open
opened 2026-04-18 09:27:10 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit message: fix(tui): auto-generate thinking-effort presets from actor schema on first run
  • Branch name: bugfix/m8-first-run-thinking-effort-presets

Background and Context

The TUI specification (ADR-045, Persona System) requires that on first run, when a user selects an actor, the system automatically generates thinking-effort presets from the actor's schema. These presets (e.g., low, medium, high thinking effort levels) should be derived from the actor's configuration schema and added to the default persona.

The current implementation in src/cleveragents/tui/first_run.py creates a default persona with no presets (only the mandatory default preset from the model validator):

def create_default_persona_for_actor(
    registry: PersonaRegistry,
    actor: str,
) -> Persona:
    persona = Persona(
        name="default",
        actor=actor,
        description="Default persona",
    )
    registry.save(persona)
    registry.set_last_persona(persona.name)
    return persona

No actor schema is consulted, no thinking-effort presets are generated, and the resulting persona only has the mandatory default preset with empty overrides.

Expected Behavior

Per the spec, when create_default_persona_for_actor() is called during first run:

  1. The actor's schema is queried to discover available thinking-effort parameters
  2. Thinking-effort presets (e.g., low, medium, high) are generated based on the actor schema
  3. These presets are added to the default persona's argument_presets list
  4. The persona is saved with the generated presets

Actual Behavior

create_default_persona_for_actor() creates a persona with only the mandatory default preset (empty overrides). No actor schema is consulted and no thinking-effort presets are generated.

Steps to Reproduce

  1. Inspect src/cleveragents/tui/first_run.pycreate_default_persona_for_actor() creates Persona(name="default", actor=actor, description="Default persona") with no presets
  2. The Persona model validator adds only the mandatory default preset with empty overrides
  3. On first run, select an actor — the resulting persona has no thinking-effort presets

Acceptance Criteria

  • create_default_persona_for_actor() queries the actor schema to discover thinking-effort parameters
  • Thinking-effort presets (at minimum low, medium, high) are generated from the actor schema
  • The generated presets are added to the default persona's argument_presets list
  • The persona is saved with the generated presets
  • If the actor schema has no thinking-effort parameters, the function gracefully falls back to only the default preset
  • All existing tests continue to pass
  • Coverage >= 97%

Subtasks

  • Identify how actor schemas expose thinking-effort parameters (inspect actor schema structure)
  • Implement preset generation logic in src/cleveragents/tui/first_run.py
  • Update create_default_persona_for_actor() to query actor schema and generate presets
  • Add graceful fallback when actor schema has no thinking-effort parameters
  • Add/update Behave scenarios asserting thinking-effort presets are generated on first run
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit message:** `fix(tui): auto-generate thinking-effort presets from actor schema on first run` - **Branch name:** `bugfix/m8-first-run-thinking-effort-presets` ## Background and Context The TUI specification (ADR-045, Persona System) requires that on first run, when a user selects an actor, the system automatically generates **thinking-effort presets** from the actor's schema. These presets (e.g., `low`, `medium`, `high` thinking effort levels) should be derived from the actor's configuration schema and added to the default persona. The current implementation in `src/cleveragents/tui/first_run.py` creates a default persona with no presets (only the mandatory `default` preset from the model validator): ```python def create_default_persona_for_actor( registry: PersonaRegistry, actor: str, ) -> Persona: persona = Persona( name="default", actor=actor, description="Default persona", ) registry.save(persona) registry.set_last_persona(persona.name) return persona ``` No actor schema is consulted, no thinking-effort presets are generated, and the resulting persona only has the mandatory `default` preset with empty overrides. ## Expected Behavior Per the spec, when `create_default_persona_for_actor()` is called during first run: 1. The actor's schema is queried to discover available thinking-effort parameters 2. Thinking-effort presets (e.g., `low`, `medium`, `high`) are generated based on the actor schema 3. These presets are added to the default persona's `argument_presets` list 4. The persona is saved with the generated presets ## Actual Behavior `create_default_persona_for_actor()` creates a persona with only the mandatory `default` preset (empty overrides). No actor schema is consulted and no thinking-effort presets are generated. ## Steps to Reproduce 1. Inspect `src/cleveragents/tui/first_run.py` — `create_default_persona_for_actor()` creates `Persona(name="default", actor=actor, description="Default persona")` with no presets 2. The `Persona` model validator adds only the mandatory `default` preset with empty overrides 3. On first run, select an actor — the resulting persona has no thinking-effort presets ## Acceptance Criteria - [ ] `create_default_persona_for_actor()` queries the actor schema to discover thinking-effort parameters - [ ] Thinking-effort presets (at minimum `low`, `medium`, `high`) are generated from the actor schema - [ ] The generated presets are added to the default persona's `argument_presets` list - [ ] The persona is saved with the generated presets - [ ] If the actor schema has no thinking-effort parameters, the function gracefully falls back to only the `default` preset - [ ] All existing tests continue to pass - [ ] Coverage >= 97% ## Subtasks - [ ] Identify how actor schemas expose thinking-effort parameters (inspect actor schema structure) - [ ] Implement preset generation logic in `src/cleveragents/tui/first_run.py` - [ ] Update `create_default_persona_for_actor()` to query actor schema and generate presets - [ ] Add graceful fallback when actor schema has no thinking-effort parameters - [ ] Add/update Behave scenarios asserting thinking-effort presets are generated on first run - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added this to the v3.7.0 milestone 2026-04-18 09:36:07 +00:00
Author
Owner

[GROOMED] Quality Analysis Report

Issue Validity: VALID & ACTIONABLE

This is a well-documented Priority/Critical UAT bug with clear context, expected behavior, actual behavior, and acceptance criteria. The issue is legitimate and ready for implementation.

Label Compliance: ⚠️ PARTIAL

Current Labels:

  • State/Unverified (present)
  • Type/Bug (present)
  • Priority/Critical (present)
  • MoSCoW/Must have (present)

Required Actions:

  • ⚠️ State/Unverified → State/Verified: This issue has been verified as legitimate and actionable. It should transition from State/Unverified to State/Verified per CONTRIBUTING.md triage process.

Milestone Assignment: ASSIGNED

  • Assigned to: v3.7.0 (M8: TUI Implementation)
  • Rationale: This issue directly implements ADR-045 (Persona System) and the thinking-effort preset generation feature, which is explicitly scoped in v3.7.0.

Epic/Orphan Check: BELONGS TO EPIC

  • Epic: v3.7.0 (M8: TUI Implementation)
  • Status: Not orphaned; properly scoped to TUI milestone

Priority/Critical Flag: 🚨 CRITICAL ATTENTION REQUIRED

This is a Priority/Critical issue currently in State/Unverified. Per CONTRIBUTING.md:

"Priority/Critical issues with no State/In Progress should be flagged for attention"

Recommendation: This issue should be:

  1. Moved to State/Verified (issue is valid)
  2. Assigned to a developer for implementation
  3. Prioritized in the v3.7.0 sprint

Issue Quality Assessment

Strengths:

  • Clear problem statement with code examples
  • Well-defined acceptance criteria (6 items)
  • Detailed subtasks (7 items)
  • Explicit Definition of Done
  • Proper metadata (commit message, branch name)
  • References relevant ADR (ADR-045)

Completeness:

  • Background & Context: Excellent
  • Expected vs Actual Behavior: Clear
  • Steps to Reproduce: Provided
  • Acceptance Criteria: Comprehensive
  • Definition of Done: Explicit

Summary

Status: GROOMED & READY FOR IMPLEMENTATION

This issue is valid, well-documented, and properly scoped to v3.7.0. It requires:

  1. Label transition: State/Unverified → State/Verified
  2. Developer assignment
  3. Implementation of thinking-effort preset generation in create_default_persona_for_actor()

Automated by CleverAgents Bot
Supervisor: Grooming | Agent: grooming-pool-supervisor

## [GROOMED] Quality Analysis Report ### Issue Validity: ✅ VALID & ACTIONABLE This is a well-documented Priority/Critical UAT bug with clear context, expected behavior, actual behavior, and acceptance criteria. The issue is legitimate and ready for implementation. ### Label Compliance: ⚠️ PARTIAL **Current Labels:** - ✅ State/Unverified (present) - ✅ Type/Bug (present) - ✅ Priority/Critical (present) - ✅ MoSCoW/Must have (present) **Required Actions:** - ⚠️ **State/Unverified → State/Verified**: This issue has been verified as legitimate and actionable. It should transition from State/Unverified to State/Verified per CONTRIBUTING.md triage process. ### Milestone Assignment: ✅ ASSIGNED - **Assigned to:** v3.7.0 (M8: TUI Implementation) - **Rationale:** This issue directly implements ADR-045 (Persona System) and the thinking-effort preset generation feature, which is explicitly scoped in v3.7.0. ### Epic/Orphan Check: ✅ BELONGS TO EPIC - **Epic:** v3.7.0 (M8: TUI Implementation) - **Status:** Not orphaned; properly scoped to TUI milestone ### Priority/Critical Flag: 🚨 CRITICAL ATTENTION REQUIRED **This is a Priority/Critical issue currently in State/Unverified.** Per CONTRIBUTING.md: > "Priority/Critical issues with no State/In Progress should be flagged for attention" **Recommendation:** This issue should be: 1. Moved to State/Verified (issue is valid) 2. Assigned to a developer for implementation 3. Prioritized in the v3.7.0 sprint ### Issue Quality Assessment **Strengths:** - Clear problem statement with code examples - Well-defined acceptance criteria (6 items) - Detailed subtasks (7 items) - Explicit Definition of Done - Proper metadata (commit message, branch name) - References relevant ADR (ADR-045) **Completeness:** - Background & Context: ✅ Excellent - Expected vs Actual Behavior: ✅ Clear - Steps to Reproduce: ✅ Provided - Acceptance Criteria: ✅ Comprehensive - Definition of Done: ✅ Explicit ### Summary **Status:** ✅ GROOMED & READY FOR IMPLEMENTATION This issue is valid, well-documented, and properly scoped to v3.7.0. It requires: 1. Label transition: State/Unverified → State/Verified 2. Developer assignment 3. Implementation of thinking-effort preset generation in `create_default_persona_for_actor()` --- **Automated by CleverAgents Bot** Supervisor: Grooming | Agent: grooming-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10394
No description provided.