البداية السريعة

انشر تعليمة، ثم اقرأها كما يقرؤها الوكيل. نحو خمس دقائق، في الطرفية. (تفضّل ألّا تستخدم الطرفية؟ اكتب وانشر في المحرّر بدلًا من ذلك.)

1. ثبّت أداة سطر الأوامر (CLI)

Shell
npm install -g instruction.md
instruction --version

كل ما يعمل دون اتصال (validate، format، deliver، digest) يعمل دون حساب.

2. اكتب مستندًا

Shell
instruction init support-agent --template agent

ينشئ هذا الأمر قالبًا باسم support-agent.md. وأبسط مستند يبدو هكذا:

support-agent.md
---
spec: "1"
title: Support agent
---
# Support agent

You answer billing questions for Acme.

MUST[verify-identity]: verify the customer's identity before discussing an account.
BECAUSE: an account holds another person's data.

3. شاهد ما سيستلمه الوكيل

Shell
instruction validate support-agent.md
instruction deliver support-agent.md environment=staging

هذه هي الغاية من المواصفة: البايتات محدّدة، فما تراه هنا هو ما يستلمه كل قارئ ملتزم بها. يسرد instruction validate كل ما في المستند مما قد يُرفض النشر بسببه. قالب الوكيل يعلن مُعاملًا إلزاميًّا هو environment، ويأخذ deliver قيمته بالصيغة name=value ويكتبها في النص.

4. سجّل الدخول وانشر

Shell
instruction login
instruction push support-agent.md --visibility public --publish --message "first version"

لديك الآن إصدار ثابت لا يتغيّر ومرجع (ref) باسم @latest يشير إليه. للمستند معرّف أساسي وعنوان يتّبعه الوكلاء: instruction://<you>/support-agent.

5. اقرأها كما يقرؤها الوكيل

Shell
instruction watch instruction://<you>/support-agent@latest --out AGENT.md

هذا الأمر يتّبع المرجع: يكتب المستند كما يُسلَّم، ويعيد كتابته كلما نشرت. أوقفه بالضغط على Ctrl-C. والوكيل يفعل الشيء نفسه عبر MCP، دون استعلام متكرّر، وذلك بالاشتراك (تدفّق subscriptions/listen، وبه أيضًا يعلم watch بالتغيير).

6. انشر تغييرًا

Shell
instruction push support-agent.md --to <id> --publish --message "tighten the refund rule"

كل ما يتّبع @latest يحصل عليه. وإن أردت مرجعًا لا يتحرّك إلا بقرار منك، فانشر إلى @stable واجعل الوكلاء يتّبعونه بدلًا من ذلك.

بعد ذلك