شعار Workflow State

Workflow State

المجتمع
scottdurow
workflow-state

Shared workflow state persistence for agent-driven development. Defines how to store and resume planning/execution state on disk using .copilot/state JSON files synchronized with manage_todo_list. Triggers on "workflow state", "resume workflow", "persist tasks", "chat state lost", "continue from plan", "state file".

نظرة عامة

الناشرscottdurow
المستودعpower-platform-full-stack-skills
اسم المهارةworkflow-state
النجوم
39
التفريعات
10
الملفات المرفقة
6
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 6

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها scottdurow على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Workflow State في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/scottdurow/power-platform-full-stack-skills/tree/main/skills/workflow-state
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scottdurow/power-platform-full-stack-skills.git /tmp/power-platform-full-stack-skills
mkdir -p .claude/skills
cp -r /tmp/power-platform-full-stack-skills/skills/workflow-state .claude/skills/workflow-state
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Workflow State في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Workflow State تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Workflow State بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Workflow State — Shared Persistence Skill

Use this skill whenever a workflow spans multiple phases and must survive chat/context loss.

CRITICAL RULES

  1. Create state file before Phase 1. Do not wait until work is underway.
  2. Sync on every todo/phase change. Keep file state aligned with manage_todo_list.
  3. Read state first on resume. Never restart from scratch if a state file exists.
  4. Store decisions and blockers. Task status alone is insufficient for resumption.
  5. Use deterministic paths. Prefer <PROJECT_ROOT>/.copilot/state/<workflow>.json.
  6. No state file, no execution. If a multi-phase workflow has started and the state file is missing, pause implementation and create the state file immediately.
  7. Every manage_todo_list update requires a matching file sync in the same phase. Treat drift between memory and disk as a defect.
  8. Capture lessons learned as you go. When something unexpected happens — a tool limitation, a platform quirk, a pattern that worked well or poorly — append it to lessonsLearned in the active session immediately. These insights improve future agent and skill behavior.
  9. Never overwrite previous sessions. State files contain a sessions array. New tasks append a new session — they never replace or delete existing sessions. See resources/state-schema.md for the multi-session schema.

Standard Path

  • Preferred: <PROJECT_ROOT>/.copilot/state/<workflow-name>.json
  • Fallback: ./.copilot/state/<workflow-name>.json

Workflow

  1. Initialize
    • Create .copilot/state/ if missing.
    • If the state file does not exist, create it using resources/state-schema.md with an empty sessions array.
    • Create a new session object with a sequential id (e.g. session-1), a human-readable label, and status: "active". Append it to sessions and set activeSessionId.
    • Seed initial todos inside the active session before first substantive step.
  2. New Task (state file already exists)
    • Read the state file.
    • If there is an existing active session, mark it completed or abandoned.
    • Append a new session with the next sequential id and set activeSessionId.
    • Never delete or overwrite previous sessions.
  3. Update
    • Update updatedAt, currentPhase, and todos in the active session on each phase/todo change.
    • Append key decisions, blockers, and artifact paths to the active session.
    • Append lessons learned whenever something unexpected happens.
    • Write immediately after each manage_todo_list transition; do not batch.
  4. Resume
    • Read state file.
    • Find the session matching activeSessionId.
    • Rebuild manage_todo_list from that session's todos.
    • Review lessonsLearned across all sessions for high-severity entries.
    • Continue from the active session's currentPhase and unresolved blockers.
    • If in-memory plan conflicts with state file, state file is source of truth.

Enforcement Gates

  • Gate A — Start: Before first major step, verify .copilot/state/<workflow>.json exists, has a sessions array, and has an active session.
  • Gate B — Transition: After every todo status change, persist updated state in the active session immediately.
  • Gate C — Handoff/Resume: Before continuing work after interruption, reload state file, locate the active session via activeSessionId, and rehydrate todo statuses. Check for delegations with status: "in-progress" — these indicate incomplete sub-agent work from a crashed session.
  • Gate D — New Task: Before starting a new task in an existing state file, verify the previous session was properly closed (completed or abandoned) before creating a new one. Carry forward directives from the most recent completed session.
  • Gate E — Completion: Before yielding as "finished", scan all files in .copilot/state/ for sessions with status: "active". If any active sessions exist in any state file, resume them in the most logical order (dependencies first, then independent workstreams) instead of finishing. Only yield as complete when every session across every state file is completed or abandoned.
  • Gate F — Pre-Delegation: (Orchestrator agents only) Before every sub-agent spawn, persist a delegations entry with status: "in-progress". If the orchestrator crashes mid-delegation, Gate C can detect and recover incomplete work.
  • Gate G — Post-Delegation: (Orchestrator agents only) After every sub-agent return, update the delegation entry with status: "completed" and record the result summary and outputArtifacts.
  • Gate H — Cross-Session Directives: (Orchestrator agents only) When starting a new session, carry forward all directives from the most recent completed session. Directives are cumulative until the user explicitly revokes them.

References

  • resources/state-schema.md — Canonical schema fields (including orchestration fields)
  • resources/resume-playbook.md — Step-by-step recovery flow
  • resources/spawn-templates.md — Standard and Lightweight agent spawn prompt templates
  • resources/orchestration-patterns.md — Multi-agent orchestration patterns with examples
  • resources/after-agent-work.md — Post-completion protocol and consolidation step
  • resources/cross-agent-coordination.md — Hub-and-spoke coordination protocol
  • Workflow-specific files (if present) can extend this schema

Decision Categorization

When logging decisions in the state file, categorize them:

json
{
  "decisions": [
    {
      "type": "architecture",
      "description": "...",
      "rationale": "...",
      "alternatives_considered": ["..."],
      "workaround": false
    }
  ]
}

Valid type values: architecture, workaround, platform-limitation, user-requirement.

If workaround: true, include:

  • What the correct solution would be
  • Why it couldn't be implemented
  • When to revisit (what would need to change for the correct solution)

This creates an audit trail so workarounds can be systematically replaced later.

Lessons Learned

Capture reusable insights throughout the workflow. These are things that surprised you, caught you out, or worked especially well — knowledge that would help future runs of the same or similar workflows.

json
{
  "lessonsLearned": [
    {
      "category": "platform-quirk",
      "summary": "Dataverse date-only columns shift by one day when the user's UTC offset is negative",
      "detail": "Always use DateTimeKind.UTC and strip the time component server-side.",
      "appliesTo": ["dataverse-solution-web-api", "ioc-development-pattern"],
      "severity": "high"
    }
  ]
}

Valid category values: platform-quirk, tool-limitation, pattern-that-worked, pattern-to-avoid, performance, security, ux-insight, process.

appliesTo lists skills or agents that should incorporate this lesson. severity: low (nice to know), medium (save time next run), high (would cause bugs or failure if ignored).

When to record:

  • A workaround was needed for a platform limitation
  • A tool or API behaved differently than expected
  • A design pattern proved especially effective or problematic
  • A test revealed an edge case that wasn't obvious upfront
  • A process step was missing, reordered, or redundant

On workflow completion, review lessonsLearned from the active session and surface high-severity entries to the user with a recommendation for which agents or skills should be updated. Also scan lessonsLearned from prior sessions for recurring themes.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

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

ماذا تفعل مهارة الذكاء الاصطناعي Workflow State؟

Shared workflow state persistence for agent-driven development. Defines how to store and resume planning/execution state on disk using .copilot/state JSON files synchronized with manage_todo_list. Triggers on "workflow state", "resume workflow", "persist tasks", "chat state lost", "continue from plan", "state file".

لماذا تستخدم Workflow State على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Workflow State عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Workflow State في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/scottdurow/power-platform-full-stack-skills/tree/main/skills/workflow-state. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Workflow State؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Workflow State؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Workflow State معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Workflow State مجانية؟

نشرها scottdurow على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇