Skillpedia
الوكلاء8.6k · #12412

session-source-fork

ما الذي تفعله

تشرح هذه المهارة كيفية بدء مقعد وكيل جديد من محادثة سابقة مع Claude أو Codex، باستخدام التفرع. وهي موجهة للفرق التي تريد أن يبدأ الوكيل الجديد من تاريخ جلسة سابقة.

متى تستخدمها

  • ✓عندما تريد أن يبدأ مقعد جديد من محادثة تشغيل سابقة.
  • ✓عندما تكتب عضوًا في مواصفة rig يجب أن يتفرع من جلسة سابقة.
  • ✓عندما تحتاج إلى الاختيار بين التفرع وإعادة البناء والاستئناف والبدء من جديد لمقعد جديد.

رابط المهارة

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md

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

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

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

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

استخدم هذه المهارة لمساعدتي: https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

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

“ابدأ مقعد مراجع جديدًا متفرعًا من جلسة Codex السابقة، لكن أبقه منفصلًا بوضوح عن المقعد الأصلي.”

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

كيف تعمل

تعلن مصدر الجلسة في المواصفة، وتنشئ مقعدًا جديدًا برمزه الخاص، ولا تكتب رمز الأصل على المقعد الجديد أبدًا.

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

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

session_source Fork

session_source is a member-level OpenRig field that declares how a newly-launched managed seat should derive its initial conversation continuity from a prior runtime conversation source.

v1 supports one mode: fork — start a new managed seat from a prior native runtime conversation source without claiming the original seat continued.

The schema is runtime-neutral; implementation is runtime-specific (Claude and Codex have their own native fork commands).

Use this when

  • Authoring a rig spec member that should fork from a prior session
  • Authoring a rig expand payload with session_source
  • Reasoning about whether to use fork vs rebuild vs resume vs fresh for a new seat
  • Composing fork + handover (seat-handover-over-fork) — see seat-continuity-and-handover skill

Don't use this when

  • The seat is being restored, not created. Restore continues an existing managed seat. Fork creates a new seat.
  • The continuity is artifact-backed mental-model rebuild (packet-derived understanding, not native runtime continuity). Use mode: rebuild (see seat-continuity-and-handover for the rebuild surface) — do NOT collapse fork into artifact-backed reentry; the distinction is load-bearing.
  • The runtime is terminal. Terminal runtime rejects session_source.

The shape (canonical YAML)

members:
  - id: reviewer-2
    runtime: claude-code        # or "codex"; not valid on terminal
    agent_ref: specs/agents/reviewer.yaml
    profile: reviewer
    cwd: .
    session_source:
      mode: fork
      ref:
        kind: native_id          # v1 fork mode supports native_id only
        value: "0b0165d7-cb4d-4650-90de-15c0a1ede9e6"

Rules:

  • mode v1 only valid value: fork.
  • ref.kind v1 supports native_id only. Schema rejects artifact_path, name, last, and artifact_set pre-launch with explicit deferred/weaker/wrong-mode error messages (see packages/daemon/src/domain/rigspec-schema.ts validateSessionSourceFork). Adapter-level refusal exists as defensive handling but should not be reachable in v1 because schema rejects first.
  • value required for ref.kind: native_id in v1 (the only schema-accepted kind). Future-state value semantics for artifact_path / name / last are not active in v1 because schema rejects those kinds pre-launch.
  • rig expand accepts the same shape so dynamically-added members can carry session-source attribution.

The primitive does NOT introduce a new top-level command. It flows through existing rig spec and expansion pathways.

State model

session_source is a launch-time input, not a long-lived stateful field:

  1. Declared — present in member config or expansion payload
  2. Resolved — at launch time, OpenRig resolves the ref against the runtime
  3. Realized — runtime fork succeeds; new managed seat receives a NEW native continuity token (Claude session id or Codex thread id). OpenRig persists that NEW token. Parent token is NEVER written onto the new seat.
  4. Failed — resolution or fork failed; seat not launched as a fork; clear error names the resolution step that failed

Once realized, session_source is essentially history. Restoring the seat later is restore of the new seat, not re-fork-from-parent.

Failure modes (5)

  1. Source session id not found — runtime cannot resolve native_id. Action: emit error naming runtime + missing id; do NOT silently launch fresh. (Future-state note: when artifact_path is supported in a follow-up slice, it could become a candidate fallback for Claude; in v1 schema rejects artifact_path pre-launch so no fallback path exists.)
  2. Source artifact path missing (out of v1 scope) — would apply once ref.kind: artifact_path becomes schema-accepted. v1 schema rejects this kind pre-launch.
  3. Unsupported runtime/kind combination (largely pre-empted in v1 by schema rejection) — schema rejects all non-native_id kinds upfront. Adapter-level refusal exists as defensive handling but is not reached in v1.
  4. Fork launch failed after source resolution — runtime command (claude --resume <parent> --fork-session or codex fork <id>) returned non-zero or hung. Preserve runtime stderr; do not record new seat as launched; do not write parent token onto seat.
  5. Persistence inconsistency — fork succeeded but seat-token persistence cannot record new continuity token. Internal failure: seat is not considered launched
الأسئلة الشائعة

هل يحل المقعد الجديد محل القديم؟

لا، تقول المهارة إن التفرع ينشئ مقعدًا جديدًا ولا يدّعي أن الأصلي استمر.

ما البيئات المدعومة؟

تدعم النسخة الأولى Claude وCodex، باستخدام معرفات محادثاتهما الأصلية.

هل يمكنها استعادة مقعد موجود؟

لا، الاستعادة تواصل مقعدًا موجودًا، أما التفرع فينشئ مقعدًا جديدًا.

التفاصيل

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

Use when authoring a rig spec member or `rig expand` payload that needs to start a new managed seat from a prior runtime conversation source — `session_source: { mode: fork, ref: { kind, value } }`. v1 supports `mode: fork` with `ref.kind: native_id` for Claude and Codex. The new seat persists a NEW post-fork token; the parent token is NEVER written onto the new seat. NOT for restoring an existing seat or for artifact-backed mental-model rebuild.

repo: mvschwarz/openrig

الشعبية

نجوم GitHub
8.6k
الترتيب
#12412
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

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

0

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

التعليقات

  • …

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

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