Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة

scaffold-domain

النجوم٦
التفرعات٠
آخر تحديث١٦ يوليو ٢٠٢٦ في ١٧:٠٩

Implement the domain layer (entity / Repository interface / constants / errors / value objects / tests) for one feature, driven by `docs/spec/<feature>/domain.md`. The skill reads the spec, references `internal/domain/README.md` (layer-wide convention: principles, naming, getter style, error wrapping, file separation) plus existing sibling aggregates as a secondary structural template, invokes a test-perspective subagent to define the layer's test viewpoints (invariant preservation, state-transition correctness, value object boundary checks) BEFORE writing code, then generates: entity struct + constructor with invariant checks, unexported fields with auto-generated getters (using `ptr.Copy` for pointer types), constants (`min<Field>Length` / `max<Field>Length` etc. derived from spec field constraints), errors (`ErrInvalid<Field>` derived from field names + invariants), Repository interface with `//go:generate mockgen` directive, value objects, and a test file covering invariants + behavior methods + VO bounda

التثبيت

التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.

مستكشف الملفات
2 ملفات
SKILL.md
readonly