home / skills / shotaiuchi / dotclaude / feature-logic

feature-logic skill

/dotclaude/skills/feature-logic

This skill implements core business logic, validation, workflows, and state management to reliably deliver feature-informed rules.

npx playbooks add skill shotaiuchi/dotclaude --skill feature-logic

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: feature-logic
description: >-
  Business logic implementation. Apply when implementing core business
  rules, validation logic, workflows, state machines, and domain-specific
  algorithms for new features.
user-invocable: false
---

# Business Logic Implementer Implementation

Implement core business logic for new features.

## Implementation Checklist

### Business Rules
- Implement domain rules matching specification requirements
- Verify boundary conditions and edge case handling
- Check for proper separation of business logic from infrastructure
- Ensure business rules are unit testable in isolation
- Validate rule consistency across related operations

### Validation Logic
- Implement input validation at domain boundary
- Verify validation error messages are descriptive and actionable
- Check for proper validation ordering (cheap checks first)
- Ensure cross-field and cross-entity validation rules
- Validate sanitization of user-provided data

### Workflow & State Management
- Implement state transitions with proper guard conditions
- Verify invalid state transition prevention
- Check for proper event emission on state changes
- Ensure workflow steps are idempotent where required
- Validate concurrent state modification handling

### Algorithm Correctness
- Verify algorithm produces correct output for all input ranges
- Check for proper handling of empty, null, and boundary inputs
- Ensure deterministic behavior for same inputs
- Validate computational complexity meets performance requirements
- Check for proper error propagation through computation chains

## Output Format

Report implementation status:

| Status | Description |
|--------|-------------|
| Complete | Fully implemented and verified |
| Partial | Implementation started, needs remaining work |
| Blocked | Cannot proceed due to dependency or decision needed |
| Skipped | Not applicable to this feature |

Overview

This skill helps implement and verify core business logic for new features, ensuring rules, validations, workflows, state management, and algorithms meet domain requirements. It provides a practical checklist and reporting format to assess implementation status and readiness. Use it to reduce defects and accelerate delivery of reliable domain behavior.

How this skill works

The skill inspects feature implementations against a focused checklist: business rules, validation logic, workflow and state transitions, and algorithm correctness. For each area it verifies requirements, edge cases, testability, and performance, then outputs a concise status report (Complete, Partial, Blocked, or Skipped). It highlights gaps and actionable remediation steps to guide developers and reviewers.

When to use it

  • When implementing core domain rules for a new feature
  • During pull request reviews that touch business logic
  • Before writing unit and integration tests for feature behavior
  • When designing or validating state machines and workflows
  • When optimizing or validating domain-specific algorithms

Best practices

  • Keep business logic separated from infrastructure and side effects
  • Write unit tests that cover boundary conditions and edge cases
  • Validate inputs at the domain boundary and order checks from cheap to expensive
  • Define explicit guard conditions and prevent invalid state transitions
  • Ensure workflows are idempotent where required and handle concurrency

Example use cases

  • Implementing pricing, discount, or eligibility rules for commerce features
  • Adding multi-step approval workflows with state transitions and events
  • Validating complex form input with cross-field and cross-entity constraints
  • Implementing deterministic algorithms for matching, ranking, or scoring
  • Reviewing code changes for proper error propagation and computational complexity

FAQ

What outputs does the skill produce?

It produces a concise implementation status for each checklist area (Complete, Partial, Blocked, or Skipped) and lists missing checks or failing conditions to address.

How do I handle a Blocked status?

Identify the blocking dependency or unresolved decision, document required inputs, and prioritize resolving the dependency or clarifying the decision before continuing implementation.