شعار Spec Check

Spec Check

المجتمع
v0lka
spec-check

Detect discrepancies between project specifications and actual code. Use when you suspect specs have drifted from implementation, after a major refactoring, during onboarding to verify spec accuracy, or on explicit user request. For each discrepancy found, interactively asks the user whether to trust the code, trust the spec, trust neither, or ignore.

نظرة عامة

الناشرv0lka
المستودعskills
اسم المهارةspec-check
النجوم
28
التفريعات
1
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/v0lka/skills/tree/main/development/sdd/spec-check
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/v0lka/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/development/sdd/spec-check .claude/skills/spec-check
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Spec Check

Systematically compare project specifications against actual source code to detect drift. For every discrepancy found, ask the user how to resolve it.

This is an interactive, potentially lengthy process. It reads both specs and source code, identifies mismatches, and requires user decisions for each one.


When to Invoke

  • User explicitly requests a spec consistency check
  • After a large refactoring where many specs may be stale
  • When onboarding to a project and needing to verify spec accuracy
  • When a spec seems to contradict what you observe in code
  • Periodically as a maintenance task

Procedure

Step 1 — Determine scope

Ask the user (or infer from context) what scope to check:

ScopeWhat it checks
Single specOne specific spec file vs. its referenced source files
DomainAll specs in a domain directory vs. corresponding code
ContractsAll contract specs vs. actual interfaces in code
FullEntire specs/ directory vs. codebase

For large scopes, inform the user this will be thorough and may surface many findings.

Step 2 — Load the spec

Read the target spec file(s) fully. Extract checkable claims:

  • Key Files — do the referenced files exist at those paths?
  • Core Types / Interfaces — do the type definitions match what's in code?
  • Invariants — does the code actually enforce these properties?
  • Behavior descriptions — does the code implement what the spec describes?
  • Configuration — do parameter names, defaults, and valid values match?
  • Cross-references — do linked spec files exist? Do section anchors resolve?
  • Event catalogs — do documented events match actual event emissions?
  • Breaking Change Checklists — are the listed dependencies accurate?

Step 3 — Load corresponding source code

For each claim in the spec, read the relevant source file(s). Focus on:

  • Type/interface definitions (structural match)
  • Function signatures and behavior (semantic match)
  • Configuration defaults and parameter names
  • Event emissions and subscriptions
  • Import patterns and boundaries

Step 4 — Identify discrepancies

Categorize each finding:

CategoryDescriptionExample
PATH_MISSINGKey File path doesn't existSpec says src/router.go, file was moved to src/core/router.go
TYPE_MISMATCHType definition differsSpec shows 3 fields, code has 5
INTERFACE_DRIFTInterface signature changedMethod was added/removed/renamed
BEHAVIOR_DRIFTDocumented behavior differs from implementationSpec says "retries 3 times", code retries 5 times
CONFIG_DRIFTConfig param name/default/range differsSpec says default is 10, code uses 20
INVARIANT_VIOLATEDCode doesn't enforce a documented invariantSpec says "always validates input", code has a path that skips
CROSS_REF_BROKENReferenced spec or section doesn't existLink to domains/auth.md but file was removed
UNDOCUMENTEDSignificant code exists with no spec coverageNew module has no corresponding domain spec
STALE_CONTENTSpec documents something that was removed from codeSpec describes a feature that was deleted
DUPLICATE_ADR_NUMBERTwo ADR files in specs/decisions/ share the same leading NNN008-a.md and 008-b.md both exist — parallel branches allocated 008 independently and merged cleanly

Step 5 — Report and ask for each discrepancy

For EACH discrepancy, present it clearly to the user and ask for a resolution. Use the following format:

DISCREPANCY: [category]
Spec: [file path] — [what the spec says]
Code: [file path] — [what the code does]

Then ask the user to choose one of:

ResolutionMeaningAction
Trust codeCode is correct, spec is staleUpdate the spec to match code
Trust specSpec is correct, code has a bugFlag for code fix (do NOT auto-fix code)
Trust neitherBoth are wrong, needs rethinkingNote it as an open item for the user to address
IgnoreNot worth fixing right nowSkip, optionally log for later

Step 6 — Apply resolutions

After collecting all user decisions:

  • Trust code → invoke spec-update skill to update the spec
  • Trust spec → report the code locations that need fixing (do NOT modify code within this skill; the user decides when to fix)
  • Trust neither → summarize as an open question requiring design discussion
  • Ignore → skip silently

Step 7 — Summary report

After processing all discrepancies, provide a summary:

SPEC CHECK SUMMARY
══════════════════════════════════════════
Scope: [what was checked]
Specs checked: N
Discrepancies found: N

  Resolved (trust code):    N — specs updated
  Resolved (trust spec):    N — code fixes needed
  Unresolved (neither):     N — requires discussion
  Ignored:                  N

Remaining action items:
- [list of code fixes needed, if any]
- [list of open design questions, if any]

Checking Strategies by Spec Type

Domain README / Detail

  1. Verify every path in "Key Files" exists
  2. Compare "Core Types" code blocks against actual type definitions
  3. For "Behavior" sections: trace the described flow through actual code
  4. For "Invariants": search for code paths that might violate them
  5. For "Configuration": check actual config structs/schemas

Contract

  1. Verify every interface in the "Interfaces" table exists in code
  2. Check method signatures match
  3. Verify "Initialization" matches actual wiring code
  4. Check "Error Propagation" rules are followed at the boundary

Architecture

  1. Verify import rules are not violated (check actual imports)
  2. Verify "Anti-Patterns" are not present in code
  3. Verify "Invariants" hold across the codebase

ADR

ADRs are historical records and generally don't drift. Check only:

  1. Status field — if Accepted and the file's current content is committed (git reports no pending change for it), verify no contradicting newer ADR exists; an uncommitted accepted ADR is still a draft that may be revised in place instead
  2. Referenced code/specs in Context/Decision — verify they still exist
  3. Duplicate numbers — scan the entire specs/decisions/ tree for files sharing the same leading NNN (parse NNN from each NNN-slug.md filename and ignore the slug; include superseded ADRs — a retired record keeps its number). Report each contested number with its claimant files.

DUPLICATE_ADR_NUMBER resolution: renumber the second-landed record to the next free number per the renumber protocol in spec-create — update all references (filename, # ADR-NNN: heading, supersede links, INDEX.md entries, cross-references in other specs) — then re-run the cross-reference check to catch links broken by the renumbering.


Efficiency Notes

  • Start with "Key Files" path verification — it's fast and catches renames/moves
  • Then check type/interface structural matches — these are objective
  • Save behavioral/semantic checks for last — they require deeper analysis
  • For "Full" scope: batch discrepancies by domain and present one domain at a time to avoid overwhelming the user
  • If more than 10 discrepancies are found in a single spec, ask the user whether the spec might need a full rewrite rather than incremental fixes

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

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

Detect discrepancies between project specifications and actual code. Use when you suspect specs have drifted from implementation, after a major refactoring, during onboarding to verify spec accuracy, or on explicit user request. For each discrepancy found, interactively asks the user whether to trust the code, trust the spec, trust neither, or ignore.

لماذا تستخدم Spec Check على TypingMind؟

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

كيف أثبّت Spec Check في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/v0lka/skills/tree/main/development/sdd/spec-check. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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