Skillpedia
النشر والسحابة (DevOps)6.0k · #14516

openspec-bulk-archive-change

ما الذي تفعله

تؤرشف هذه المهارة عدة تغييرات OpenSpec مكتملة في وقت واحد، مع التحقق من أن الكود يطابق كل تغيير. وهي مناسبة لمطورين يشغّلون عدة تغييرات متوازية في OpenSpec.

متى تستخدمها

  • ✓عندما تنتهي عدة تغييرات OpenSpec متوازية وتحتاج إلى أرشفتها معاً.
  • ✓عندما تتعارض ملفات المواصفات بين التغييرات وتحتاج إلى فحصها مقابل الكود.
  • ✓عندما تريد اختيار التغييرات التي تُؤرشف من قائمة.

رابط المهارة

https://github.com/fengshao1227/ccg-workflow/blob/main/.agents/skills/openspec-bulk-archive-change/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/fengshao1227/ccg-workflow/blob/main/.agents/skills/openspec-bulk-archive-change/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أرشف كل تغييرات OpenSpec المنتهية في هذا السبرنت، وافحص تعارضات المواصفات أولاً.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يسرد وكيلك التغييرات النشطة، ويطلب منك الاختيار، ثم يفحص آثار كل تغيير ومهامه ومواصفاته، ويحل التعارضات بالنظر إلى الكود، ثم يؤرشف التغييرات المختارة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Archive multiple completed changes in a single operation.

This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.

Input: None required (prompts for selection)

Steps

  1. Get active changes

    Run openspec list --json to get all active changes.

    If no active changes exist, inform user and stop.

  2. Prompt for change selection

    Use AskUserQuestion tool with multi-select to let user choose changes:

    • Show each change with its schema
    • Include an option for "All changes"
    • Allow any number of selections (1+ works, 2+ is the typical use case)

    IMPORTANT: Do NOT auto-select. Always let the user choose.

  3. Batch validation - gather status for all selected changes

    For each selected change, collect:

    a. Artifact status - Run openspec status --change "<name>" --json

    • Parse schemaName and artifacts list
    • Note which artifacts are done vs other states

    b. Task completion - Read openspec/changes/<name>/tasks.md

    • Count - [ ] (incomplete) vs - [x] (complete)
    • If no tasks file exists, note as "No tasks"

    c. Delta specs - Check openspec/changes/<name>/specs/ directory

    • List which capability specs exist
    • For each, extract requirement names (lines matching ### Requirement: <name>)
  4. Detect spec conflicts

    Build a map of capability -> [changes that touch it]:

    auth -> [change-a, change-b]  <- CONFLICT (2+ changes)
    api  -> [change-c]            <- OK (only 1 change)
    

    A conflict exists when 2+ selected changes have delta specs for the same capability.

  5. Resolve conflicts agentically

    For each conflict, investigate the codebase:

    a. Read the delta specs from each conflicting change to understand what each claims to add/modify

    b. Search the codebase for implementation evidence:

    • Look for code implementing requirements from each delta spec
    • Check for related files, functions, or tests

    c. Determine resolution:

    • If only one change is actually implemented -> sync that one's specs
    • If both implemented -> apply in chronological order (older first, newer overwrites)
    • If neither implemented -> skip spec sync, warn user

    d. Record resolution for each conflict:

    • Which change's specs to apply
    • In what order (if both)
    • Rationale (what was found in codebase)
  6. Show consolidated status table

    Display a table summarizing all changes:

    | Change               | Artifacts | Tasks | Specs   | Conflicts | Status |
    |---------------------|-----------|-------|---------|-----------|--------|
    | schema-management   | Done      | 5/5   | 2 delta | None      | Ready  |
    | project-config      | Done      | 3/3   | 1 delta | None      | Ready  |
    | add-oauth           | Done      | 4/4   | 1 delta | auth (!)  | Ready* |
    | add-verify-skill    | 1 left    | 2/5   | None    | None      | Warn   |
    

    For conflicts, show the resolution:

    * Conflict resolution:
      - auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
    

    For incomplete changes, show warnings:

    Warnings:
    - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
    
  7. Confirm batch operation

    Use AskUserQuestion tool with a single confirmation:

    • "Archive N changes?" with options based on status
    • Options might include:
      • "Archive all N changes"
      • "Archive only N ready changes (skip incomplete)"
      • "Cancel"

    If there are incomplete changes, make clear they'll be archived with warnings.

  8. Execute archive for each confirmed change

    Process changes in the determined order (respecting conflict resolution):

    a. Sync specs if delta specs exist:

    • Use the openspec-sync-specs approach (agent-driven intelligent merge)
    • For conflicts, apply in resolved order
    • Track if sync was done

    b. Perform the archive:

    mkdir -p openspec/changes/archive
    mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
    

    c. Track outcome for each change:

    • Success: archived successfully
    • Failed: error during archive (record error)
    • Skipped: user chose not to archive (if applicable)
  9. Display summary

    Show final resul

الأسئلة الشائعة

هل يؤرشف التغييرات دون أن يسألني؟

لا. تطلب منك اختيار التغييرات التي تريد أرشفتها ولا تختارها تلقائياً.

كيف تتعامل مع المواصفات المتعارضة؟

تتحقق من الكود لمعرفة ما هو منفذ فعلاً.

هل أحتاج إلى OpenSpec؟

نعم. تعمل مع تغييرات OpenSpec وأداة سطر الأوامر الخاصة بها.

التفاصيل

الوصف الأصلي من المؤلف

Archive multiple completed changes at once. Use when archiving several parallel changes.

repo: fengshao1227/ccg-workflow

الشعبية

نجوم GitHub
6.0k
الترتيب
#14516
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة