Skillpedia
الوكلاء11k · #11799

hive.colony-progress-tracker

ما الذي تفعله

تقدم هذه المهارة لعامل ذكاء اصطناعي طريقة لحجز المهام وتسجيل التقدم في قاعدة بيانات مشتركة. وهي مناسبة لمن يشغّلون عدة عمال ذكاء اصطناعي على قائمة مهام واحدة.

متى تستخدمها

  • ✓عندما يُعطى عامل الذكاء الاصطناعي رقم مهمة أو مسار قاعدة بيانات ليستعمله.
  • ✓عندما يحتاج عدة عمال إلى مشاركة قائمة واحدة دون أن يأخذوا المهمة نفسها.
  • ✓عندما يجب على عامل الذكاء الاصطناعي تسجيل كل خطوة وفحص قبل أن ينتقل إلى التالية.

رابط المهارة

https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/colony-progress-tracker/SKILL.md

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

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

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

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

استخدم هذه المهارة لمساعدتي: https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/colony-progress-tracker/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

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

“أريد أن تعمل على المهمة المعلّقة التالية في قائمتنا المشتركة، وأن تسجّل كل خطوة عند الانتهاء منها.”

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

كيف تعمل

يحجز العامل صفًا للمهمة في قاعدة بيانات صغيرة ويعمل على خطواتها ويسجّل ما فعله. وتُسجَّل الفحوصات المطلوبة أيضًا، ليرى عامل آخر أين وصل العمل.

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

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

Operational Protocol: Colony Progress Tracker

Applies when your spawn message has db_path: and colony_id: fields. The DB is your durable working memory — tells you what's done, what to skip, which SOP gates you owe.

Access via terminal_exec running sqlite3 "<db_path>" "...". Tables: tasks (queue), steps (per-task decomposition), sop_checklist (hard gates).

Claim: assigned task (check this FIRST)

If your spawn message includes a task_id: field, the queen pre-assigned a specific row to you. Claim that row by id — do not use the generic next-pending pattern below:

sqlite3 "<db_path>" <<'SQL'
UPDATE tasks SET status='claimed', worker_id='<worker-id>',
  claim_token=lower(hex(randomblob(8))),
  claimed_at=datetime('now'), updated_at=datetime('now')
WHERE id='<task_id>' AND status='pending'
RETURNING id, goal, payload;
SQL

Empty output → another worker raced you or the row is already done. Stop and report. Non-empty → that row is yours, proceed to "Load the plan".

Claim: next pending (fallback when no task_id is assigned)

If your spawn message did NOT include task_id: — you are a generic fan-out worker racing on a shared queue. Use the generic next-pending claim:

sqlite3 "<db_path>" <<'SQL'
UPDATE tasks SET status='claimed', worker_id='<worker-id>',
  claim_token=lower(hex(randomblob(8))),
  claimed_at=datetime('now'), updated_at=datetime('now')
WHERE id=(SELECT id FROM tasks WHERE status='pending'
  ORDER BY priority DESC, seq, created_at LIMIT 1)
RETURNING id, goal, payload;
SQL

Empty output → queue drained, exit. Otherwise the returned id is yours. Never SELECT-then-UPDATE — races.

Load the plan

sqlite3 "<db_path>" "SELECT seq, id, title, status FROM steps WHERE task_id='<task-id>' ORDER BY seq;"
sqlite3 "<db_path>" "SELECT key, description, required, done_at FROM sop_checklist WHERE task_id='<task-id>';"

Skip any step where status='done'. That's the point — don't redo completed work.

Execute a step

Before tool calls:

sqlite3 "<db_path>" "UPDATE steps SET status='in_progress', worker_id='<worker-id>', started_at=datetime('now') WHERE id='<step-id>';"

After success (one-line evidence: path, URL, key result):

sqlite3 "<db_path>" "UPDATE steps SET status='done', evidence='<what you did>', completed_at=datetime('now') WHERE id='<step-id>';"

MANDATORY: SOP gate check before marking task done

sqlite3 "<db_path>" "SELECT key, description FROM sop_checklist WHERE task_id='<task-id>' AND required=1 AND done_at IS NULL;"
  • Empty → proceed to "Mark task done".
  • Non-empty → each row is work you still owe. Do it, then check it off:
sqlite3 "<db_path>" "UPDATE sop_checklist SET done_at=datetime('now'), done_by='<worker-id>', note='<why>' WHERE task_id='<task-id>' AND key='<key>';"

Never mark a task done while this SELECT returns rows. This gate exists specifically to stop you from declaring success while skipping required steps.

Mark task done / failed

# Success:
sqlite3 "<db_path>" "UPDATE tasks SET status='done', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<worker-id>';"

# Unrecoverable failure:
sqlite3 "<db_path>" "UPDATE tasks SET status='failed', last_error='<one sentence>', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<worker-id>';"

The AND worker_id=? guard means a reclaimed row won't accept your write — treat zero rows affected as "your claim was revoked, stop."

Loop

After done/failed → claim the next task. Exit only when claim returns empty.

Errors + debug

  • "database is locked": retry with 100ms → 1s backoff, max 5 attempts. busy_timeout=5000 handles most contention silently.
  • Queue health: SELECT status, count(*) FROM tasks GROUP BY status;
  • Your in-flight work: SELECT id, goal, status FROM tasks WHERE worker_id='<worker-id>';

Anti-patterns (will break the queue)

  • Don't DDL (CREATE/ALTER/DROP).
  • Don't DELETE — failed tasks stay as failed for audit.
  • Don't skip Protocol 4 (SOP gate) before marking done.
  • Don't hold a task >15min without updates — the stale-claim reclaimer revokes your claim.
  • Don't invent task IDs. Workers update existing rows; only the queen enqueues new ones.
الأسئلة الشائعة

ما فائدة قاعدة البيانات؟

تحتفظ بقائمة المهام وخطوات كل مهمة والفحوصات التي يجب أن تنجح.

ماذا يحدث إذا حاول عاملان المهمة نفسها؟

يستطيع واحد فقط حجز المهمة المعلّقة، ويتوقف الآخر ويبلّغ.

لمن هذه المهارة؟

لمن يشغّلون عمال ذكاء اصطناعي بأسلوب المستعمرة على قائمة مهام مشتركة.

التفاصيل

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

Claim tasks, record step progress, and verify SOP gates in the colony SQLite queue. Applies when your spawn message includes a db_path field.

repo: aden-hive/hive

الشعبية

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

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

0

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

التعليقات

  • …

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

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