Skip to main content

/backend-service-implement

Bridge spec to code — generate full service implementations with business logic from TODO stubs and upstream specs.


Overview

Takes scaffold stubs (from /backend-scaffold) and upstream specs (API contract, data model, task breakdown) to generate production-ready service implementations with business logic, helpers, error handling, and pagination. Supports Node.js/TypeScript, PHP (Laravel/Symfony), and Go.


Usage

/backend-service-implement
/backend-service-implement backend-scaffold backend-api-contract backend-data-model backend-task-breakdown
ArgumentRequiredDescription
backend-scaffoldNoPath to scaffold output (route handlers with TODO stubs)
backend-api-contractNoPath to OpenAPI 3.1 YAML
backend-data-modelNoPath to data model document
backend-task-breakdownNoPath to BE task breakdown

When run without arguments, launches an interactive wizard.


What It Produces

Files at $JAAN_OUTPUTS_DIR/backend/service-implement/{id}-{slug}/:

FileContent
{id}-{slug}.mdImplementation guide with architecture notes
*-services.tsService layer with full business logic
*-helpers.tsShared helpers (error factory, pagination, auth)
*-routes.tsUpdated route handlers calling services
*-tests.tsUnit test stubs for each service method
*-readme.mdSetup + run instructions

What It Asks

QuestionWhenWhy
Implementation scopeAlwaysWhich services/resources to implement
Business logic gapsSpec ambiguityClarify domain rules not in spec
Auth patternNot in tech.mdJWT / API key / session
Error handling depthNot in tech.mdBasic / full RFC 9457

Multi-Stack Support

StackFrameworkORM/DBPatterns
Node.js / TypeScriptFastify v5+PrismaCRUD + state machines + helpers
PHPLaravel 12 / Symfony 7Eloquent / DoctrineService classes + Form Requests
GoChi / stdlibsqlc / GORMHandler functions + repository pattern

Workflow Chain

/backend-scaffold --> /backend-service-implement --> /qa-test-generate

Example

Input:

/backend-service-implement path/to/scaffold path/to/api.yaml path/to/data-model.md

Output:

jaan-to/outputs/backend/service-implement/01-user-api/
├── 01-user-api.md
├── 01-user-api-services.ts
├── 01-user-api-helpers.ts
├── 01-user-api-routes.ts
├── 01-user-api-tests.ts
└── 01-user-api-readme.md

Tips

  • Run /backend-scaffold first to generate the stubs this skill fills in
  • Provide all 4 upstream artifacts for best results
  • Review the implementation guide (.md) for business logic decisions
  • Use /qa-test-generate to generate tests for the implemented services


Technical Details

  • Logical Name: backend-service-implement
  • Command: /backend-service-implement
  • Role: dev (backend)
  • Output: $JAAN_OUTPUTS_DIR/backend/service-implement/{id}-{slug}/