implement-service

Design and implement domain services with Result-based error handling and AppScope integration.

219|41|Updated Feb 21, 2024
One-click install
npx skills add https://github.com/proto-at-block/bitkey --skill implement-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implement-service
Source: https://github.com/proto-at-block/bitkey/tree/main/app/ai-rules/skills/implement-service
Command: npx skills add https://github.com/proto-at-block/bitkey --skill implement-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design and implement domain services with clear business logic, safe error handling, AppScope integration, and orchestrated workflows to standardize service layers across modules.

Core Features & Use Cases

  • Define domain service interfaces in public modules to express domain language and constraints.
  • Implement in internal modules with :impl and AppScope injection to compose services and dependencies.
  • Create fakes in a :fake module to support deterministic testing and validation.
  • Write tests using fakes to verify error handling, orchestration, and contract compliance.
  • Use existing patterns and references to align with architectural conventions.

Quick Start

Follow the steps to design the interface in the public module, implement in the :impl module, create a fake, and write tests using fakes.

Frequently Asked Questions about implement-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design domain services with proper error handling and orchestration?

Design domain services by defining public interfaces, implementing them with dependency injection and AppScope, and enforcing Result-based error handling for reliable orchestrated workflows across mobile architecture modules.

What is the best way to structure domain service interfaces and implementations across modules?

Define domain service interfaces in public modules to express domain language, implement them in internal :impl modules with AppScope injection, and create fakes in a :fake module to support deterministic testing and contract validation.

How do I test domain service orchestration and error handling?

Test domain service orchestration by generating fakes in a dedicated :fake module, then write tests using those fakes to verify Result-based error handling, orchestration logic, and contract compliance across modules.

Does this approach support dependency injection for domain services in mobile architectures?

Yes, domain service implementation uses dependency injection patterns with AppScope integration to compose services and dependencies, ensuring separation of concerns in line with documented architectural conventions for mobile architectures.

Why use Result-based error handling for domain service workflows?

Result-based error handling provides structured, safe error management for domain service workflows, ensuring reliable orchestration and clear business logic validation across module boundaries.

Can I use this domain service pattern for contract validation across multiple modules?

Yes, the pattern applies to building and testing domain services including contract validation across modules, using fakes and interface design to verify orchestration and error handling compliance.