شعار Hai Ssot

Hai Ssot

المجتمع
hylarucoder
hai-ssot

Diagnoses single-source-of-truth violations—duplicated literals or rules, shape drift, scattered defaults, redundant conversion chains, overloaded vocabulary, and behavior forks—with file:line evidence, false-positive adjudication, and a treatment recipe. Use when the user suspects definitions may diverge, adding one concept requires edits in many places, layers repeatedly convert or validate the same value, or asks about SSOT/双源/漂移/同名异形. Use hai-architecture when the root decision is module ownership rather than duplicated authority.

نظرة عامة

الناشرhylarucoder
المستودعhai-stack
اسم المهارةhai-ssot
النجوم
284
التفريعات
15
الملفات المرفقة
3
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

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

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Hai SSOT

For Chinese readers, see SKILL.zh_CN.md. The English SKILL.md is the execution source of truth.

Overview

Hunt down places where one fact, one shape, or one word has more than one authoritative home — or where one name secretly serves several facts. Produce a findings report that an engineer can execute from: every finding numbered, evidenced, honestly adjudicated, and routed to a concrete disposition. The skill is a diagnostic with a strong opinion about treatment, not a linter.

The Core Law

SSOT violations are especially likely at boundaries a single type system cannot protect: language↔database, language↔wire, typed↔untyped payloads, code↔docs, and production↔fixtures. They also occur inside one language when modules independently redeclare constants, shapes, defaults, or derivations; compilers do not prevent semantically duplicated authorities.

Two corollaries that direct the hunt:

  1. Start at the cross-stack seams because risk is high there, then follow each concept through its intra-language definitions and consumers.
  2. A test that pins two copies equal ("parity test", "pin test", "currency test") is a flag: either the copy should not exist (eliminate it, then delete the test), or both sides are genuinely real artifacts that cannot share a source (then the test IS the correct treatment). Locate every such test early — each one marks either a violation or a treatment already applied.

The Ten Symptom Classes

Use the symptom table to choose likely classes, then read only those class recipes in references/detection-cookbook.md before searching.

#SymptomOne-line definitionCanonical tell
1Multi-source literalsOne wire string / enum value defined independently in N placesSame quoted literal in two modules; a private const shadowing a public one
2Shape proliferationOne concept carried by N type/schema shapes across seamsHand-written schema on one side of a wire mirroring the producing type on the other; typed→untyped "regressions" where a typed object gets flattened back into a string-keyed map at a seam
3Word overloadOne word meaning N different things (the mirror of #1)The domain's most valuable word (e.g. "memory" as product moat) also used for infrastructure ("in-memory"); a term with 2-3 documented senses
4Legacy-vocabulary mapping layersOld vocabulary survives inside display/fixture mapping functions after a wire rename — and the mappings themselves get copy-pastedThe same old→new word map appearing in two files; fixtures asserting retired vocabulary
5Dual-pathway behavior forksThe same operation behaves differently depending on which entry path/host ran itA CLI path skipping the safety pipeline the server path runs; one caller passing explicit-empty where another gets defaults
6Scattered defaultsThe same fallback value born independently at multiple layersA default directory/timeout/limit defined as a constant in one layer AND as an inline fallback in another, neither referencing the other
7Pure-subset shape pairsType B = type A minus k fields, plus a field-by-field copy converterA converter function that only copies fields; the "information" carried by the second shape is merely hiding fields
8Same-name-different-shapeTwo exported types with the same name in the same semantic domain but different fieldsRunSnapshot in two sibling modules meaning related-but-different things
9Redundant conversion chainsOne concept reshaped at multiple hops along a single call path, where the intermediate shapes add no informationA value converted A→B→C on its way through layers; round-trips (A→B→A); typed→string→typed relays where a value is serialized and re-parsed inside one process. Kill question per hop: "what information does this shape add?" — no answer means the hop merges
10Re-implemented derivationsThe same rule — validation, normalization, parsing, a derived field — implemented independently at N layers, each a drift pointThe same regex/threshold/branching duplicated with small diffs; a date string parsed at three layers; isActive/displayName computed differently in two views

Severity logic: a violation that has already caused a production symptom (silent empty rendering, correctness bug, wrong cursor) outranks everything; next, violations on persisted or user-visible wire; then cross-team/cross-stack seams; intra-module duplication last.

Honest Adjudication — what NOT to flag

Findings are leads, not verdicts. Run these checks before a finding enters the report; record exonerated candidates in a "not counted" note so the next sweeper doesn't re-litigate:

  • Module-qualified generic names are idiomatic, not violations. A short generic type name qualified by its module (stream.Message vs processor.Message) is the standard-library pattern in every module system (see the cookbook's language notes for per-language exemplars). Flag same-name types only when they share a semantic domain and confuse a cross-module reader (class #8), or collide in one file.
  • Forward contracts are alive even with zero producers. A registry entry / enum value with no backend producer may be consumed by a frontend switch as a forward contract. Grep every consumer surface (web, contract, seeds) before calling anything dead. Disposition for these: annotate and group, never delete on producer-absence alone.
  • Persisted wire literals are frozen. The fix unifies definition sites; the string values on disk/in events never change. Even naming inconsistencies baked into the wire (mixed prefixes) get documented, not repaired.
  • A shape change is legitimate when it carries information — adds a sequence number, hides internal fields for an audience, renames into a consumer's vocabulary. The disease is reshaping that carries nothing (class #7), typed→map regressions, and chains where every hop re-converts without adding anything (class #9). Judge each hop separately: a chain can contain one real boundary and two gratuitous ones.
  • Re-checks at trust boundaries are defense, not duplication. A server re-validating client input, or a DB constraint backing an app-level check, is deliberate redundancy across trust levels. Class #10 flags re-implemented rules at the same trust level — two layers behind the same boundary each owning their own copy of the regex, threshold, or parse.
  • Port/impl module pairs and per-plugin modules are conventions, not fragmentation. Don't recommend flattening them in an SSOT report.
  • Deliberate, adjudicated dual vocabularies can exist (e.g. an ADR chose a flat result type with a closed discriminator). Check decision records before flagging; contrast honestly — a 4-field type with a closed-set kind is not the same disease as a 9-field union with no discriminator semantics.

The credibility of the whole report rests on this section. One overreaching finding ("unify all the Messages!") teaches the reader to ignore the real ones.

Treatment Recipes

Every confirmed finding routes to exactly one recipe; the recipe determines the disposition:

RecipeWhenNotes
CodegenOne side can mechanically generate the other (type → schema, registry → enum file)Strongest fix; pairs with a currency test (guards "forgot to regenerate" — that is a constructive gap a compiler can't close, so the test is legitimate)
Parity guardBoth sides are real artifacts that cannot share a source (language enum vs DB CHECK constraint)Include a red drill: deliberately desync once and confirm the guard fires
Constant promotionBare string keys in map envelopes crossing layersPromote to a named constant next to its siblings; both writer and reader reference it
Typed payloadShape proliferation / map regressions at seamsOften a phase of a larger contract plan; don't band-aid per-field
Convert at the edgeRedundant conversion chainsConvert once where the value enters the system; pass one canonical type through the interior; merge hops that add no information
Single rule ownerRe-implemented derivationsHoist the rule into one named function/type and make every layer call it; where possible encode the proof in the type (parse, don't validate) so downstream layers cannot re-do the work
Vocabulary close-outWord overload, legacy mapping layersGlossary entry + rename of the cheap side; map function single-sourced or fixtures moved to current vocabulary
AdjudicationBehavior forksThese need a decision, not a patch: unify the behavior, or promote the fork into an explicitly documented contract. Present both options with a default recommendation
Delete the pinAfter any recipe eliminates a copy, delete the parity test that was holding the copies together — its survival is evidence of remaining multi-source

Workflow

  1. Scope. Agree on the sweep surface (a module, a contract plane, the whole repo). Note any prior sweeps/plans to avoid re-finding adjudicated items.
  2. Map the seams first. List type-system-unreachable boundaries, then the internal modules that independently define or derive the same concepts. Seams are priority entrypoints, not the only possible location of findings.
  3. Hunt per symptom class using the cookbook greps. For each candidate, capture file:line for every definition/use site — counts matter ("this literal is defined in exactly 2 places", "adding one event touches 6 files" is the change-amplification number that lands the point).
  4. Verify producer AND consumer for anything you might call dead or removable. The three-surface discipline: backend producers, frontend/contract consumers, seeds/fixtures.
  5. Adjudicate honestly (section above). Sort exonerated candidates into the "not counted" note.
  6. Write the report using references/output-template.md: numbered findings, evidence, severity, recipe, disposition table, positive list ("already-healthy patterns to copy" — naming what the repo already does right makes the report constructive and gives fixes a local precedent to imitate).
  7. Execute quick wins if asked — constant promotions and literal de-duplications are usually safe same-day (zero wire change, full test gate). Bigger recipes get routed to plans; behavior forks get routed to the user as decisions.

Hand off when

  • The finding's root cause is a module-boundary or layering problem → hai-architecture.
  • A finding needs a new name, or the report turns into a rename list → hai-naming.
  • The dispositions need to become a phased, verifiable plan → hai-goal.
  • The user wants to reframe the whole contract surface rather than patch findings → geju.

What this skill is NOT

  • Not a linter: it reports adjudicated findings with treatment routes, not raw matches.
  • Not "unify everything": its credibility comes from the not-counted list as much as the findings.
  • Not a wire-migration tool: persisted values are out of bounds; only definition sites move.

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

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

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

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

Diagnoses single-source-of-truth violations—duplicated literals or rules, shape drift, scattered defaults, redundant conversion chains, overloaded vocabulary, and behavior forks—with file:line evidence, false-positive adjudication, and a treatment recipe. Use when the user suspects definitions may diverge, adding one concept requires edits in many places, layers repeatedly convert or validate the same value, or asks about SSOT/双源/漂移/同名异形. Use hai-architecture when the root decision is module ownership rather than duplicated authority.

لماذا تستخدم Hai Ssot على TypingMind؟

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

كيف أثبّت Hai Ssot في TypingMind؟

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

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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