feat(#353): add mapify prompt-profile list command (slice 1)#374
Conversation
Adds the `mapify prompt-profile` sub-command group and the first command `prompt-profile list` implementing the prompt profile lifecycle manifest format for issue #353. Manifest format: `.map/prompt-profiles/<id>/manifest.json` with required keys (id, title, version) and optional keys (description, owner, targets, eval_requirements, rollback_notes). Active pointer: `.map/prompt-profiles/active.json` with `{"active": "<id>"|null}` as the rollback primitive. The `list` command: - reads all valid profile manifests from .map/prompt-profiles/ - checks active.json for the current active profile - displays a Rich table with ID/title/version/status/description - marks the active profile in the Status column - emits a stale-pointer warning when active.json names a profile that no longer exists - supports --json for machine-readable output - gracefully skips directories without valid manifests 20 tests in tests/test_prompt_profile_commands.py covering empty list, installed profiles, malformed manifest degradation, JSON output, active profile marking, and stale pointer warning. Co-Authored-By: Claude <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds ChangesPrompt profile listing
Architecture skill status
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant prompt_profile_list
participant PromptProfiles
participant Output
Operator->>prompt_profile_list: invoke list
prompt_profile_list->>PromptProfiles: read manifests and active.json
PromptProfiles-->>prompt_profile_list: return valid profiles and active pointer
prompt_profile_list->>Output: render table or JSON
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
mapify prompt-profilesub-command group to__init__.pymapify prompt-profile list— the slice 1 deliverable for [Prompt lifecycle] Add eval-gated prompt profile canary and rollback controls #353tests/test_prompt_profile_commands.pydocs/ARCHITECTURE.mdmarking [Prompt lifecycle] Add eval-gated prompt profile canary and rollback controls #353 slice 1 as completeWhat the command does
.map/prompt-profiles/<id>/manifest.json(required:id,title,version; optional:description,owner,targets,eval_requirements,rollback_notes).map/prompt-profiles/active.jsonto determine which profile is currently activeactivevsinstalledstatus--jsonemits{"profiles": [...], "active": "<id>"|null}for machine-readable outputactive.jsonnames a profile that no longer exists (stale pointer)Manifest format
.map/prompt-profiles/<id>/manifest.json:{ "id": "efficiency-v2", "title": "Efficiency v2", "version": "1.0.0", "description": "Tighter actor prompts for token efficiency", "owner": "azalio", "targets": [{"surface": "skill:map-efficient"}], "eval_requirements": ["skill-eval:map-efficient"], "rollback_notes": "Revert if Monitor false-positive rate increases" }.map/prompt-profiles/active.json(rollback primitive — change pointer = rollback):{"active": "efficiency-v2"}Test plan
--jsonoutput shape and required fieldsCloses #353 slice 1
Generated by Claude Code
Summary by CodeRabbit
New Features
mapify prompt-profile listto display installed prompt profiles.Documentation