Skip to content

feat: refine action system prompts using OMX persona contracts as reference #62

@ellen-goc

Description

@ellen-goc

Problem Statement

Each askcc action has a system prompt defined in askcc/definitions.py with an opening persona line (e.g. "You are a software architect..."). These are functional but loosely scoped — they lack the narrow operating contracts, explicit constraints, evidence requirements, and termination criteria that make AI personas produce consistently focused output.

oh-my-codex (OMX) defines 43 specialized AI personas in its prompts/ directory. Each persona is a tight, self-contained contract with:

  • A single, narrow responsibility
  • Explicit constraints on what the persona will NOT do
  • Hard evidence requirements (file:line citations before any claim)
  • Clear termination/completion criteria

Several OMX personas map directly to askcc actions and should be used as references to tighten the existing prompts.

Persona Mapping

askcc action Current persona line OMX reference persona Key improvements to adopt
prepare "You are an issue preparation specialist..." analyst.md Explicit: converts scope → testable ACs; identifies gaps and edge cases before planning; flags assumptions that could invalidate ACs
plan "You are a software architect..." planner.md Explicit: inspects repository first, classifies task type, grounds every decision in file-level evidence; no speculative steps
develop "You are an expert software developer..." executor.md Explicit: iterates until fully resolved; explores → implements → verifies loop; hard termination condition (all ACs verified, tests pass)
issue-review "You are an issue reviewer..." critic.md Explicit: cites specific gaps with line-level references; distinguishes "unclear" from "wrong"; no rewriting — only points to what needs fixing
pr-review "You are a code reviewer..." architect.md + code-reviewer.md architect.md is explicitly read-only and advisory — all recommendations grounded in file-level evidence with codebase citations (file:line); never writes code during review
explore "You are a solutions architect..." explore.md + researcher.md Explicit: exhausts existing codebase evidence before proposing new approaches; ranks options by implementation risk
diagnose "You are a diagnostic engineer..." debugger.md Explicit: traces bugs to their origin via stack trace analysis and data flow tracing; fixes root causes — never symptoms; reproduction validated before any fix is proposed

Acceptance Criteria

  • Each *_AGENT_PROMPT in askcc/definitions.py is updated to adopt the corresponding OMX persona's operating contract style
  • Each prompt includes: (1) narrow responsibility statement, (2) explicit constraints (what it will NOT do), (3) evidence requirement (no claims without file:line citations), (4) termination/completion criteria
  • The pr-review prompt explicitly marks the reviewer as read-only (no code changes during review)
  • The develop prompt includes an explicit iterative loop: explore → implement → verify, with hard exit condition
  • The diagnose prompt explicitly prohibits fixing symptoms — root cause must be identified and confirmed first
  • All existing prompt behaviour (gh CLI usage, issue updates, comment posting, DECISION_GUIDANCE) is preserved
  • Tests updated if prompt content is tested

Dependencies

Tasks

  • Read each OMX reference persona file (linked above)
  • For each *_AGENT_PROMPT: draft revised opening contract section
  • Review diff to confirm no existing behaviour is removed
  • Update askcc/definitions.py
  • Run tests

Proposed Approach

For each prompt, update only the identity/operating contract section at the top (the "You are a..." paragraph and any constraint statements immediately following it). Leave the structural instructions (issue update steps, comment posting, DECISION_GUIDANCE block) unchanged. This is a targeted, low-risk change — the output format and gh CLI behaviour stay identical; only the AI's cognitive framing is tightened.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions