agentleFS
bruuuuucebruuuuuce/mana/skills/profile-selector/SKILL.md

profile-selector

Skill2 starsChanged 4 months agoMITView on GitHub

Maps a user's natural language intent to the correct Mana profile, writes .mana/active-profile to persist the selection, and returns the exact command to run.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 7 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a user says "I want to switch to..." or "which profile should I use for..."

    line 48
  2. Distinctive:

    When a user describes their lifecycle phase, role, or goal and asks what to run.

    line 49
  3. Very specific:

    When mana-help-agent detects a profile switch intent in the user's message.

    line 51
  4. Distinctive:

    Do not use it to skip required approval gates.

    line 54
  5. Very specific:

    Do not use it to select profiles that require specialist access the current user does not have (e.g., am-release-ready for a developer with …

    line 55
  6. Distinctive:

    Do not use it when a specific profile has already been approved and recorded.

    line 57
  7. Very specific:

    Do not overwrite .mana/active-profile without confirming with the user when a profile is already active.

    line 58
  8. Very specific:

    Read .mana/active-profile if present.

    line 106
  9. Very specific:

    Read the list of available profiles from profiles/ directory.

    line 107
  10. Distinctive:

    If the intent is ambiguous, ask one concise clarifying question about role or phase.

    line 109
  11. Very specific:

    Write the selected profile name to .mana/active-profile in the active project root.

    line 110
  12. Very specific:

    When a profile switch is recorded in .mana/active-profile, log the choice and rationale in decisions/developer-choice-log.md when an active …

    line 136
  13. Very specific:

    Read .mana/global/engineering-guards.md to detect whether any guard blocks execution of the selected profile.

    line 140
  14. Very specific:

    No MCP write operations. Read-only access to local files and profiles/ is sufficient.

    line 154
  15. Very specific:

    When routing a request that includes a Jira issue key, prefer profiles or commands that preserve story evidence.

    line 156
  16. Very specific:

    When routing review or validation work, recommend ./mana evidence-index after Jira, Sonar, dependency, test, validation, or PR artifacts …

    line 161
  17. Distinctive:

    Do not select a profile and bypass the approval gate it contains.

    line 183
  18. Very specific:

    Do not write .mana/active-profile if the user did not confirm the switch.

    line 184
  19. Distinctive:

    Do not use this skill to decide whether a branch is actually ready for PR.

    line 185
  20. Very specific:

    Follow docs/standards/agent-skill-output-standard.md (Agent And Skill Output Standard) for all generated artifacts.

    line 188

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Profile Selector

Purpose

Map a user's natural language description of their situation, role, or goal to the most appropriate Mana profile. Write the profile name to .mana/active-profile to persist the selection. Return the exact command to run and a brief explanation of what the profile does.

This skill reduces the friction of knowing which profile to invoke. It is especially useful when a developer or team member is in a chat session and wants to switch phase without looking up the profile catalogue manually.

When To Use It

  • When a user says "I want to switch to..." or "which profile should I use for..."
  • When a user describes their lifecycle phase, role, or goal and asks what to run.
  • During onboarding, when the framework is new and profile names are unfamiliar.
  • When mana-help-agent detects a profile switch intent in the user's message.

When Not To Use It

  • Do not use it to skip required approval gates.
  • Do not use it to select profiles that require specialist access the current user does not have (e.g., am-release-ready for a developer with no AM role).
  • Do not use it when a specific profile has already been approved and recorded.
  • Do not overwrite .mana/active-profile without confirming with the user when a profile is already active.

Inputs

  • user_intent
  • current_phase
  • available_profiles
  • active_workspace

Outputs

  • selected_profile
  • profile_switch_command
  • active_profile_written

Profile Decision Table

Situation or IntentRoleProfile
Start a story, planning, technical slicingDeveloper / TLstory-start
Story ready for development, TL verificationTeam Leaderstory-ready-for-dev
Architecture review, ADR, NFR, service boundaryArchitectarchitecture-review
Team planning, sequencing, dependencies, review loadTeam Leaderteam-planning; estimates use current-story evidence unless historical calibration is explicitly approved
Epic/story partitioning, overlap, sibling-story gapsBA / PO / Team Leaderteam-planning or story-ready-for-dev plus ./mana jira-mcp --fetch-epic-story-pack <KEY>
Full epic structure, contradictions, and proposed implementation graphBA / PO / Team Leaderepic-analysis --jira-key <EPIC-KEY>; add --allow-service-discovery only with explicit consent
Production pre-mortem before commit or pushDeveloperjessica-fletcher
Branch validation before PRDeveloper / TLbranch-ready
PR readiness, PR package, handoffDeveloperpr-ready
Review PRs where I am requested reviewerReviewer / TLrequested-pr-review
Review one PR by numberReviewer / TLrequested-pr-review --pr <number>
Read one Jira story quicklyDeveloper / TL / Reviewer./mana jira-mcp --get-issue <KEY>
Audit Jira state against Git/PR/release evidenceDeveloper / TL / Release Ownerjira-state-audit
Cache epic and sibling stories as MarkdownBA / PO / Team Leader./mana jira-mcp --fetch-epic-story-pack <KEY>
Configure local Sonar scanner evidenceDeveloper / TL./mana sonar --init-config then ./mana sonar --check
Run local Sonar evidence before branch or PR reviewDeveloper / Reviewer / TL./mana sonar --analyze
Collect local dependency evidenceDeveloper / Reviewer / TL./mana dependency-evidence --collect
Build compact evidence indexDeveloper / Reviewer / TL./mana evidence-index
Estimate risk before modifying a classDeveloper / TLdev-assist with sonar-change-risk
Compare story acceptance criteria with branch or PRDeveloper / Reviewer / TLbranch-ready, pr-ready, or requested-pr-review with jira-acceptance-criteria-normalizer
Check engineering guard hits in a diffArchitect / TL / Reviewerbranch-ready, pr-ready, or requested-pr-review with architecture-guard-detector
Release readiness, continuity, rollbackApplication Manageram-release-ready
CI validation gateCI / TLci-validation
Discover, author, or run approval-gated GUI browser testsDeveloper / QAgui-test-validation; requires an isolated target and approved Playwright entries
Author or run approval-gated API testsDeveloper / QAapi-test-validation; isolated target and approved Newman entries required
Verify persisted test state without mutationsDeveloper / QA / DBAdatabase-read-verification; isolated PostgreSQL and approved read-only query required
General framework question, onboarding, next stepAnymana-help
Pre-commit local checksDeveloperpre-commit

Execution Logic

  1. Read .mana/active-profile if present; report the current active profile.
  2. Read the list of available profiles from profiles/ directory.
  3. Match the user's intent to the decision table above.
  4. If the intent is ambiguous, ask one concise clarifying question about role or phase.
  5. Write the selected profile name to .mana/active-profile in the active project root.
  6. Return the profile name, the command to run it, and a one-sentence description of what the profile does.
  7. Warn if the user's role does not match the profile's intended owner.

Decision Rules

  • blocker: intent maps to a profile that requires human approval the user does not currently have (e.g., DBA or AM gate).
  • warning: current active profile differs from the selected one; confirm the switch with the user before writing.
  • info: profile selected and command ready.

Failure Modes

  • The user's intent may map to multiple profiles; prefer the most downstream phase when ambiguous (e.g., branch-ready over pre-commit if both apply).
  • .mana/active-profile may be stale from a previous session; always report the existing value before overwriting.
  • The profile list in profiles/ may differ from the decision table if new profiles are added; fall back to reading profiles/*.yaml directly.

Required Human Review

The user must confirm the profile switch when a currently active profile exists. Profile selection does not replace the human owner's accountability for delivery decisions within the chosen phase.

Developer Choice Log

When a profile switch is recorded in .mana/active-profile, log the choice and rationale in decisions/developer-choice-log.md when an active workspace exists.

Service Context Layer

Read .mana/global/engineering-guards.md to detect whether any guard blocks execution of the selected profile. Report violations as blockers.

Interaction With Codex

Codex invokes this skill when the user expresses intent to change phase or profile during a chat session. The skill writes .mana/active-profile; Codex confirms the write and displays the command.

Interaction With Junie

Junie may invoke this skill to align local execution with the phase selected by the developer in the IDE. Junie does not overwrite .mana/active-profile without user confirmation.

Interaction With MCP

No MCP write operations. Read-only access to local files and profiles/ is sufficient. No external system access required. When routing a request that includes a Jira issue key, prefer profiles or commands that preserve story evidence. For simple story reads, use ./mana jira-mcp --get-issue <KEY>. For planning, review, validation, and pre-mortem profiles, ensure the selected agent compares story text and acceptance criteria against the requested feasibility or branch/PR analysis. When routing review or validation work, recommend ./mana evidence-index after Jira, Sonar, dependency, test, validation, or PR artifacts are collected. Use it to help agents load summaries first and deep-load only relevant evidence.

Correct Usage Examples

  • User says "I'm about to commit and want to run the pre-mortem" → selects jessica-fletcher.
  • User says "we're in branch validation now" → selects branch-ready.
  • User says "I need to prepare the PR package" → selects pr-ready.
  • User says "review the PRs assigned to me" → selects requested-pr-review.
  • User says "review PR 123" → selects requested-pr-review with command scripts/run-profile.sh requested-pr-review --pr 123 --project-root ..
  • User says "read Jira story PROJ-1234" → recommend ./mana jira-mcp --get-issue PROJ-1234 in a linked project.
  • User says "is PROJ-1234 correctly Done/Released?" → selects jira-state-audit with command scripts/run-profile.sh jira-state-audit --jira-key PROJ-1234 --project-root ..
  • User says "I collected Sonar and dependency evidence" → recommend ./mana evidence-index before branch-ready or requested-pr-review.
  • User says "I just started this story" → selects story-start.
  • User says "switch to AM release readiness" → selects am-release-ready, warns if user lacks AM role.

Incorrect Usage Examples

  • Do not select a profile and bypass the approval gate it contains.
  • Do not write .mana/active-profile if the user did not confirm the switch.
  • Do not use this skill to decide whether a branch is actually ready for PR.

Output Standard

Follow docs/standards/agent-skill-output-standard.md (Agent And Skill Output Standard) for all generated artifacts. Use templates/standard-agent-skill-report.template.md when no more specific template exists.

Internal reasoning must use compact caveman mode: terse fragments, evidence-first notes, no long narrative, and no private chain-of-thought in final artifacts. Maintain a context budget: keep a short working summary with objective, base branch or PR, issue keys, workspace path, checked evidence, open hypotheses, discarded hypotheses, and next checks instead of accumulating raw transcripts, full diffs, repeated file dumps, or copied tool output.

Diagram

flowchart TD
    Intent[User intent in chat] --> Read[Read active-profile and profiles/]
    Read --> Match[Match to decision table]
    Match --> Ambiguous{Ambiguous?}
    Ambiguous -->|yes| Clarify[Ask one clarifying question]
    Ambiguous -->|no| Confirm{Profile already active?}
    Clarify --> Match
    Confirm -->|different| Warn[Warn: overwrite active profile?]
    Confirm -->|none or same| Write[Write .mana/active-profile]
    Warn --> Write
    Write --> Command[Return profile_switch_command]

Example Output

skill: profile-selector
status: ready
selected_profile: jessica-fletcher
profile_switch_command: "scripts/run-profile.sh jessica-fletcher --project-root ."
active_profile_written: ".mana/active-profile"
summary: "Switched active profile to jessica-fletcher (production pre-mortem before commit)."
warnings: []
human_review_required: false

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.