شعار Architecture First

Architecture First

المجتمع
AnastasiyaW
architecture-first

Decide module boundaries before the first file: what modules exist, which way dependencies point, who owns state, and what each module may know. Use when starting a project, service, site, API, or subsystem; adding a feature with no obvious home; resolving a circular import or inverted framework dependency; or writing an ARCHITECTURE.md or ADR. Do not use for a one-file script, throwaway experiment, bug fix inside an established seam, naming/function-shape cleanup (use code-complexity), an existing oversized module (use refactoring-safely), or capacity/data scaling decisions (use system-and-data-design). This defines earned boundaries; it does not license speculative layers.

Add to TypingMind

نظرة عامة

الناشرAnastasiyaW
المستودعcodex-claude-code-config
اسم المهارةarchitecture-first
النجوم
212
التفريعات
32
الملفات المرفقة
12
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

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

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Architecture first — the shape before the first file

Most bad structure is not a bad decision. It is an absent one: code goes where the smallest diff puts it, and the smallest diff is always "next to the last thing". This skill exists to make the layout an explicit, cheap, early decision.

Scope guard — read first

Match the ceremony to the problem. Over-applying this is its own failure mode.

SituationWhat this skill asks of you
Script, spike, one file, throwawayNothing. Skip.
One module, <500 lines, one reason to changeName the module and its one job. Stop.
Service / site / API, several concernsThe full pre-code checklist below.
Multiple teams or deployables, shared domainChecklist + bounded-context map + one ADR per boundary
Multi-stage work or external release prerequisiteChecklist + a small stage map before the first implementation boundary

The one law

Dependencies point inward, toward policy. Business rules must not import the web framework, the ORM, the queue, or the file layout. The reverse is required.

Violating it silently is the failure — a violation that is written down, with the reason and the cost, is a decision. A violation nobody named is erosion.

Practical test: could this module be exercised by a test with no network, no database and no framework? If not, something outer leaked inward.

Pre-code checklist — before the first file

  1. Name the modules by reason to change, not by technical layer. queue, billing, catalog — not controllers, models, utils. A module that changes for two unrelated reasons is two modules.
  2. Say what each module owns. Especially state: every piece of mutable state has exactly one owning module, and everyone else asks that module. Module-level mutable state shared across features is the coupling that later makes a split expensive.
  3. Draw the dependency arrows. Any cycle is a design bug, not a build inconvenience. Any arrow from domain to framework is inverted — fix it with an interface owned by the inner side.
  4. Establish the ubiquitous language. One term, one meaning, in code and in speech. If the same word means different things in two places, you have found a bounded context boundary — draw it there.
  5. Define the aggregates. What must be consistent in one step, and what may lag. Transaction boundaries follow this, not the other way round.
  6. Write one vertical slice end-to-end — UI to store to test — before broadening. A slice that works proves the seams; six half-built layers prove nothing.
  7. Record it. One page: modules, ownership, data flow, external systems. Plus one short ADR per decision that was genuinely a choice (context, options, decision, consequences). Both live in git, next to the code.
  8. Name the promotion boundaries. When one verified result becomes the input to another stage, name its contract, inputs, output, and invalidation keys before implementation. A missing signer, VM, account, or remote service is a future BLOCKED stage, not a reason to keep reopening already-proven code.

Stage contracts - when proof becomes an input

For multi-stage work, architecture includes delivery boundaries as well as module boundaries. Keep these states separate:

  • VERIFIED: the scoped behavior passed at one exact revision.
  • SEALED: the verified scope has an immutable receipt and may be consumed by a following stage.
  • BLOCKED: a named external prerequisite is absent; upstream proof remains valid.
  • SUPERSEDED: a contract, source, or input digest changed, so a successor must be verified instead of editing history.

The stage map is deliberately smaller than a release plan. For each boundary, name the owning scope, frozen contract, inputs, output, and what invalidates it. Use the machine-readable ledger only when there is a real hand-off between stages: ../proof-verify/references/proven-stage-contracts.md. Do not add it to a one-file change merely because the word "stage" exists.

Review checklist — once code exists

  • Does any inner module import an outer one? Name it or fix it.
  • Is there module-level mutable state touched by more than one feature?
  • Does one file hold routes/handlers for more than one reason to change?
  • Are there two names for the same concept, or one name for two?
  • Can each module's tests run without the framework?
  • Does the ARCHITECTURE.md still describe what is actually there?

Fast decision table

QuestionDefault answer
Layer folders or feature folders?Feature (vertical slices). Layer folders scatter one change across four directories.
Where does validation live?Input shape at the edge; business rules inside. Never only at the edge.
Interface for a single implementation?No — until a second caller or a test double actually needs it.
Microservices?Not yet. Modular monolith with real boundaries first; extract when a module needs its own deploy or scaling.
Where does the ORM model live?Outer. The domain object is not the row.
Shared "utils" module?A smell. Utils is where things go when nobody decided; name the reason instead.

References — load on demand

  • references/clean-architecture/boundaries-and-layers.md — boundaries, Humble Object
  • references/clean-architecture/solid-and-components.md — SOLID applied correctly, REP/CCP/CRP, ADP/SDP/SAP
  • references/clean-architecture/details-and-code-organization.md — DB/web/frameworks as details
  • references/clean-architecture/python-implementation.md — entities, use cases, repositories, wiring
  • references/domain-driven-design/bounded-contexts.md — context mapping
  • references/domain-driven-design/ubiquitous-language.md — one term, one meaning
  • references/domain-driven-design/building-blocks.md — entities, value objects, aggregates
  • references/domain-driven-design/domain-events.md, repositories-factories.md, strategic-design.md
  • *-original.md — the source skills' own framework prose, kept verbatim

Gotchas

  • "We'll structure it later." Later costs more per caller, and callers only grow. The cheapest moment is before the first file; the second cheapest is now.
  • Ceremony as architecture. Four layers around a CRUD endpoint is not architecture, it is cost. The scope guard above exists to stop this.
  • Folders instead of boundaries. Moving files without changing who imports whom changes nothing. The arrows are the architecture; folders only display it.
  • The domain importing the framework "just for a type". That is the whole violation, arriving politely.

Troubleshooting

SymptomCauseFix
Circular importTwo modules both own part of one conceptExtract the shared concept into a third module both depend on
One change touches six files across four foldersLayer folders, not feature foldersRe-cut by feature; keep the change local
Tests need a live database to assert a ruleRule lives outside the domainMove the rule inward, inject the store
Nobody can say which module owns XNobody decidedDecide now, write it in ARCHITECTURE.md, move the state

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

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

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

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

Decide module boundaries before the first file: what modules exist, which way dependencies point, who owns state, and what each module may know. Use when starting a project, service, site, API, or subsystem; adding a feature with no obvious home; resolving a circular import or inverted framework dependency; or writing an ARCHITECTURE.md or ADR. Do not use for a one-file script, throwaway experiment, bug fix inside an established seam, naming/function-shape cleanup (use code-complexity), an existing oversized module (use refactoring-safely), or capacity/data scaling decisions (use system-and...

لماذا تستخدم Architecture First على TypingMind؟

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

كيف أثبّت Architecture First في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/development/architecture-first. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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