Service Standards Blueprint
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Single Source of Truth (SSOT) for service creation standards that ensure consistent implementation across all services by both AI and humans. Covers structure, naming, dependencies, and required patterns.
Why This Matters
- Consistency: Every service looks same and is easy to understand
- Onboarding: New team members and AI understand codebase quickly
- Maintainability: Fix once, apply everywhere
- Quality: One standard equals consistent quality
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- <e.g., env vars, request payload, file paths, schema>
- Entry Conditions:
- <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>
- Outputs:
- <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>
- Artifacts Required (Deliverables):
- <e.g., Code Diff, Unit Tests, Migration Script, API Docs>
- Acceptance Evidence:
- <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>
- Success Criteria:
- <e.g., p95 < 300ms, coverage ≥ 80%>
Skill Composition
Quick Start
Assumptions
- Microservices architecture in use
- Multiple services being developed
- Need for consistency across services
- Standard technology stack
- CI/CD pipelines in place
Compatibility
- Node.js: 16+
- TypeScript: 4.5+
- Docker: Latest
- Kubernetes: 1.20+
- Testing frameworks: Jest, Mocha, etc.
Test Scenario Matrix
| Scenario |
Input |
Expected Output |
Verification |
| Create service |
Blueprint config |
Standard service structure |
Folder structure |
| Health check |
GET /healthz |
200 OK |
Response status |
| Ready check |
GET /readyz |
200 OK (if deps ready) |
Response status |
| Metrics |
GET /metrics |
Prometheus format |
Metric format |
| Config load |
Environment vars |
Validated config |
No errors |
Technical Guardrails
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done
A service is complete when:
Anti-patterns
- Snowflake services: Every service is completely different
- Copy-paste drift: Copy then modify until they diverge
- Undocumented exceptions: Do things differently without explaining why
- Version sprawl: Different dependency versions
- No ownership: No owner for service/alerts/runbooks
Reference Links
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: service-standards-blueprint3description: Single Source of Truth (SSOT) for service creation standards that ensure Use when this capability is needed.4---56# Service Standards Blueprint78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Single Source of Truth (SSOT) for service creation standards that ensure consistent implementation across all services by both AI and humans. Covers structure, naming, dependencies, and required patterns.1819## Why This Matters20- **Consistency**: Every service looks same and is easy to understand21- **Onboarding**: New team members and AI understand codebase quickly22- **Maintainability**: Fix once, apply everywhere23- **Quality**: One standard equals consistent quality2425## Core Concepts & Rules2627### 1. Core Principles28- Follow established patterns and conventions29- Maintain consistency across codebase30- Document decisions and trade-offs3132### 2. Implementation Guidelines33- Start with the simplest viable solution34- Iterate based on feedback and requirements35- Test thoroughly before deployment363738## Inputs / Outputs / Contracts39* **Inputs**:40 - <e.g., env vars, request payload, file paths, schema>41* **Entry Conditions**:42 - <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>43* **Outputs**:44 - <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>45* **Artifacts Required (Deliverables)**:46 - <e.g., Code Diff, Unit Tests, Migration Script, API Docs>47* **Acceptance Evidence**:48 - <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>49* **Success Criteria**:50 - <e.g., p95 < 300ms, coverage ≥ 80%>5152## Skill Composition53* **Depends on**: [api-style-guide](./api-style-guide/SKILL.md), [config-env-conventions](./config-env-conventions/SKILL.md)54* **Compatible with**: [logging-metrics-tracing-standard](./logging-metrics-tracing-standard/SKILL.md), [security-baseline-controls](./security-baseline-controls/SKILL.md)55* **Conflicts with**: None56* **Related Skills**: [definition-of-done](../68-quality-gates-ci-policies/definition-of-done/SKILL.md), [service-scaffold-generator](../67-codegen-scaffolding-automation/service-scaffold-generator/SKILL.md)5758## Quick Start59#6061## Assumptions62- Microservices architecture in use63- Multiple services being developed64- Need for consistency across services65- Standard technology stack66- CI/CD pipelines in place6768## Compatibility69- **Node.js**: 16+70- **TypeScript**: 4.5+71- **Docker**: Latest72- **Kubernetes**: 1.20+73- **Testing frameworks**: Jest, Mocha, etc.7475## Test Scenario Matrix76| Scenario | Input | Expected Output | Verification |77|----------|-------|-----------------|--------------|78| Create service | Blueprint config | Standard service structure | Folder structure |79| Health check | GET /healthz | 200 OK | Response status |80| Ready check | GET /readyz | 200 OK (if deps ready) | Response status |81| Metrics | GET /metrics | Prometheus format | Metric format |82| Config load | Environment vars | Validated config | No errors |8384## Technical Guardrails85#8687## Agent Directives & Error Recovery88*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*8990- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.91- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.92- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.93- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.949596## Definition of Done97A service is complete when:9899- [ ] Service follows folder structure standard100- [ ] All required endpoints implemented (health, ready, metrics)101- [ ] Config follows convention102- [ ] Logging format matches standard103- [ ] Tests meet coverage threshold104- [ ] Documentation complete105- [ ] Error shape + codes documented (catalog)106- [ ] Dashboards/alerts exist for SLOs107- [ ] Runbook exists for top alerts108- [ ] Security baseline implemented109110## Anti-patterns1111. **Snowflake services**: Every service is completely different1122. **Copy-paste drift**: Copy then modify until they diverge1133. **Undocumented exceptions**: Do things differently without explaining why1144. **Version sprawl**: Different dependency versions1155. **No ownership**: No owner for service/alerts/runbooks116117## Reference Links118- [12-Factor App](https://12factor.net/)119- [Microservices Patterns](https://microservices.io/patterns/)120- [Node.js Best Practices](https://github.com/goldbergyoni/nodebestpractices)121- [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)122123## Versioning & Changelog124125* **Version**: 1.0.0126* **Changelog**:127 - 2026-02-22: Initial version with complete template structure128129---130> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.131<!-- tomevault:4.0:skill_md:2026-04-13 -->