بنقرة واحدة
prioritize-proposals
Analyze active OpenSpec proposals and produce a prioritized "what to do next" report
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze active OpenSpec proposals and produce a prioritized "what to do next" report
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Generate throughput and quality reports from coordinator audit data and episodic memory
Execute roadmap items iteratively with policy-aware vendor routing and learning feedback
Orchestrate the full plan-review-implement-validate-PR lifecycle with multi-vendor review convergence
Merge approved PR, migrate open tasks, archive OpenSpec proposal, and cleanup branches
Ingest raw session transcripts from coding-agent harnesses via vendor-specific adapters, normalize to a common event schema, triage for struggle signals, and write structured findings to episodic memory
HTTP fallback bridge for coordinator when MCP transport is unavailable
| name | prioritize-proposals |
| description | Analyze active OpenSpec proposals and produce a prioritized "what to do next" report |
| category | Git Workflow |
| tags | ["openspec","prioritization","triage","planning"] |
| triggers | ["prioritize proposals","what to do next","rank proposals","triage proposals"] |
Analyze all active OpenSpec change proposals against recent code history and produce a prioritized "what to do next" ordered list optimized for minimal file conflicts and parallel agent work.
$ARGUMENTS - Optional flags:
--change-id <id>[,<id>] — limit analysis to specific change IDs (comma-separated)--since <git-ref> — analyze commits since this ref (default: HEAD~50)--format <md|json> — output format (default: md)--retain <N> — keep the N most recent dated-run directories under openspec/priorities/ (default: 30). Older directories are moved to openspec/priorities/archive/, never deleted.openspec/changes/# Defaults
SINCE_REF="HEAD~50"
FORMAT="md"
CHANGE_IDS="" # empty = all active proposals
RETAIN_N=30 # keep 30 most recent dated-run dirs in openspec/priorities/; older to archive/
# Parse flags from $ARGUMENTS
# --change-id add-foo,update-bar → CHANGE_IDS="add-foo,update-bar"
# --since HEAD~20 → SINCE_REF="HEAD~20"
# --format json → FORMAT="json"
# --retain 50 → RETAIN_N=50
List all active OpenSpec change proposals and gather metadata:
# List active changes
openspec list
# For each active change, gather:
# - proposal.md contents (the Why and What)
# - tasks.md contents (implementation status)
# - spec deltas (which specs are affected)
# - design.md (if present)
For each proposal, extract and record:
openspec/changes/proposal.md## Impact sectiontasks.mddesign.md existsIf --change-id was provided, limit inventory to those specific IDs only. Verify each requested ID exists; warn if any are not found.
Gather recent commit history and file changes:
# Get recent commits with files changed
git log --oneline --name-only $SINCE_REF..HEAD
# Get summary of files changed
git diff --stat $SINCE_REF..HEAD
# Get the list of unique files changed
git diff --name-only $SINCE_REF..HEAD | sort -u
Build a map of recently changed files and their commit frequency.
For each active proposal, evaluate three dimensions:
Compare the proposal's target files/specs against recent commits:
Evaluate implementation readiness:
For each pair of proposals, compare their target files:
Build a conflict matrix showing which proposals overlap.
Assign a composite priority score based on:
| Factor | Weight | Scoring |
|---|---|---|
| Relevance | High | Still Relevant > Needs Verification > Needs Refinement > Likely Addressed |
| Readiness | High | Ready > Partially Ready > Needs Planning > Blocked |
| Task completion | Medium | Higher % complete = higher priority (momentum) |
| Conflict isolation | Medium | Fewer conflicts with other proposals = higher priority |
| Scope size | Low | Smaller scope = quicker wins = slightly higher priority |
Sort proposals by composite score (descending).
After ranking, group proposals by conflict status:
Present these groupings in the report.
Produce the prioritization report.
--format md)# Proposal Prioritization Report
**Date**: YYYY-MM-DD HH:MM:SS
**Analyzed Range**: <SINCE_REF>..HEAD (<N> commits)
**Proposals Analyzed**: <count>
## Priority Order
### 1. <change-id> — <title>
- **Relevance**: Still Relevant
- **Readiness**: Ready (0/5 tasks complete)
- **Conflicts**: None
- **Recommendation**: Implement next
- **Next Step**: `/implement-feature <change-id>`
### 2. <change-id> — <title>
- **Relevance**: Needs Refinement (target files changed since proposal)
- **Readiness**: Ready (0/3 tasks complete)
- **Conflicts**: Overlaps with #1 on `src/auth.py`
- **Recommendation**: Implement after #1, update proposal.md first
- **Next Step**: `/iterate-on-plan <change-id>`
### 3. <change-id> — <title>
- **Relevance**: Likely Addressed (recent commits cover core requirements)
- **Readiness**: N/A
- **Conflicts**: N/A
- **Recommendation**: Verify and archive
- **Next Step**: `openspec archive <change-id>`
## Parallel Workstreams
### Stream A (start immediately)
- <change-id-1>: <title>
- <change-id-4>: <title>
### Stream B (after Stream A completes)
- <change-id-2>: <title>
### Sequential (conflicts with higher-priority proposals)
- <change-id-3>: Wait for <change-id-1>
## Conflict Matrix
| | proposal-a | proposal-b | proposal-c |
|---|---|---|---|
| proposal-a | — | `src/auth.py` | none |
| proposal-b | `src/auth.py` | — | none |
| proposal-c | none | none | — |
## Proposals Needing Attention
### Likely Addressed
- <change-id>: Recent commits appear to cover this. Verify and consider archiving.
### Needs Refinement
- <change-id>: Code drift detected. Update: proposal.md, tasks.md
--format json)Output a JSON object with the same structure:
{
"date": "YYYY-MM-DDTHH:MM:SS",
"analyzed_range": { "from": "<ref>", "to": "HEAD", "commit_count": N },
"proposals": [
{
"rank": 1,
"change_id": "<id>",
"title": "<title>",
"relevance": "still_relevant",
"readiness": "ready",
"task_progress": { "completed": 0, "total": 5 },
"conflicts": [],
"recommendation": "implement_next",
"next_step": "/implement-feature <id>"
}
],
"parallel_streams": {
"A": ["<id-1>", "<id-4>"],
"B": ["<id-2>"],
"sequential": [{ "id": "<id-3>", "blocked_by": "<id-1>" }]
},
"conflict_matrix": { "<id-a>": { "<id-b>": ["src/auth.py"] } },
"needs_attention": {
"likely_addressed": ["<id>"],
"needs_refinement": ["<id>"]
}
}
Reports are persisted as event-class artifacts under openspec/priorities/. Each run creates a fresh dated-run directory; a flat-file latest.{md,json} is rewritten on every run for cheap "most recent" access. The legacy write path openspec/changes/prioritized-proposals.{md,json} is no longer used.
# 1. Compute run-id (UTC date + HHMMSS + short HEAD SHA)
RUN_ID="$(skills/.venv/bin/python skills/prioritize-proposals/scripts/priorities_paths.py run-id)"
# Example: 2026-06-10-143052-a93fe59
DATED_DIR="openspec/priorities/${RUN_ID}"
mkdir -p "${DATED_DIR}"
# 2. Write the markdown report (always written, regardless of --format)
# Include a timestamp and analyzed git range in the report header.
cat > "${DATED_DIR}/report.md" <<MD
# Proposal Prioritization Report
**Run ID**: ${RUN_ID}
**Generated**: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
**Analyzed Range**: \`${SINCE_REF}..HEAD\`
…body of the report…
MD
# 3. If --format json, write report.json wrapped with the mandatory artifact header
if [[ "${FORMAT}" == "json" ]]; then
# The report body JSON is built by the analysis steps above; pipe it through
# the header wrapper which adds the codeviz-aligned _header block.
echo "${REPORT_BODY_JSON}" \
| skills/.venv/bin/python skills/prioritize-proposals/scripts/artifact_header.py \
--run-id "${RUN_ID}" \
--out "${DATED_DIR}/report.json"
fi
# 4. Rewrite the latest flat-file pointer(s) — regular files, not symlinks.
cp "${DATED_DIR}/report.md" openspec/priorities/latest.md
if [[ -f "${DATED_DIR}/report.json" ]]; then
cp "${DATED_DIR}/report.json" openspec/priorities/latest.json
fi
# 5. Run retention: keep the N most recent dated dirs; move older to archive/.
skills/.venv/bin/python skills/prioritize-proposals/scripts/retention.py \
--base openspec/priorities --retain "${RETAIN_N}"
Reject the legacy write path. This skill MUST NOT write to openspec/changes/prioritized-proposals.md or openspec/changes/prioritized-proposals.json. Those paths belong to the openspec/changes/ namespace and were the wrong home for a meta-report; the new home is openspec/priorities/.
Display the report to the user with actionable next steps:
Prioritization complete. <N> proposals analyzed.
Top recommendation: /implement-feature <top-change-id>
Full report: openspec/priorities/${RUN_ID}/report.md
Latest mirror: openspec/priorities/latest.md
openspec/priorities/<YYYY-MM-DD>-HHMMSS-<short-git-sha>/
report.md (always)report.json carrying the mandatory _header block (if --format json)openspec/priorities/latest.mdopenspec/priorities/latest.json (if --format json was ever used)--retain N (default 30) moved to openspec/priorities/archive/, never deletedAfter reviewing the prioritization:
/implement-feature <top-change-id>
Or to refine a proposal that needs updates:
/iterate-on-plan <change-id>