Local Dev Standard
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Local Development Standards define how developers set up and run projects on their machines, ensuring consistency, reproducibility, and minimal onboarding friction.
Core Principle: "New developers should be productive in under 30 minutes."
Why This Matters
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
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Quick Start
```bash
Clone repository
git clone https://github.com/company/project.git
cd project
Run setup
npm run setup
Start development server
npm run dev
```
Assumptions
- Developer has admin access to machine
- Docker Desktop installed
- Git repository access available
- Internet connection for downloads
Compatibility
- Works on macOS, Linux, Windows (with WSL)
- Language-agnostic principles
- Can be adapted to any stack
Test Scenario Matrix
| Scenario |
Expected Behavior |
Notes |
| New developer |
One-command setup |
Automated script handles everything |
| Existing developer |
Update dependencies only |
Skip already-installed tools |
| Different OS |
OS-specific commands |
Script detects and adapts |
| CI/CD integration |
Minimal setup |
Use Docker for consistency |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
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
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
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: local-dev-standard3description: Local Development Standards define how developers set up and run projects Use when this capability is needed.4---56# Local Dev Standard78## 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## Overview17Local Development Standards define how developers set up and run projects on their machines, ensuring consistency, reproducibility, and minimal onboarding friction.1819**Core Principle**: "New developers should be productive in under 30 minutes."2021---2223## Why This Matters24- **<Benefit>**: <short explanation>25- **<Benefit>**: <short explanation>26- **<Benefit>**: <short explanation>2728## Core Concepts & Rules2930### 1. Core Principles31- Follow established patterns and conventions32- Maintain consistency across codebase33- Document decisions and trade-offs3435### 2. Implementation Guidelines36- Start with the simplest viable solution37- Iterate based on feedback and requirements38- Test thoroughly before deployment394041## Inputs / Outputs / Contracts42* **Inputs**:43 - <e.g., env vars, request payload, file paths, schema>44* **Entry Conditions**:45 - <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>46* **Outputs**:47 - <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>48* **Artifacts Required (Deliverables)**:49 - <e.g., Code Diff, Unit Tests, Migration Script, API Docs>50* **Acceptance Evidence**:51 - <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>52* **Success Criteria**:53 - <e.g., p95 < 300ms, coverage ≥ 80%>5455## Skill Composition56* **Depends on**: None57* **Compatible with**: None58* **Conflicts with**: None59* **Related Skills**: None6061## Quick Start62\`\`\`bash63# Clone repository64git clone https://github.com/company/project.git65cd project6667# Run setup68npm run setup6970# Start development server71npm run dev72\`\`\`7374## Assumptions75- Developer has admin access to machine76- Docker Desktop installed77- Git repository access available78- Internet connection for downloads7980## Compatibility81- Works on macOS, Linux, Windows (with WSL)82- Language-agnostic principles83- Can be adapted to any stack8485---8687## Test Scenario Matrix88| Scenario | Expected Behavior | Notes |89|----------|-------------------|-------|90| New developer | One-command setup | Automated script handles everything |91| Existing developer | Update dependencies only | Skip already-installed tools |92| Different OS | OS-specific commands | Script detects and adapts |93| CI/CD integration | Minimal setup | Use Docker for consistency |9495---9697## Technical Guardrails & Security Threat Model9899### 1. Security & Privacy (Threat Model)100* **Top Threats**: Injection attacks, authentication bypass, data exposure101- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII102- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager103- [ ] **Authorization**: Validate user permissions before state changes104105### 2. Performance & Resources106- [ ] **Execution Efficiency**: Consider time complexity for algorithms107- [ ] **Memory Management**: Use streams/pagination for large data108- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks109110### 3. Architecture & Scalability111- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection112- [ ] **Modularity**: Decouple logic from UI/Frameworks113114### 4. Observability & Reliability115- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`116- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`117- [ ] **Error Handling**: Standardized error codes, no bare except118- [ ] **Observability Artifacts**:119 - **Log Fields**: timestamp, level, message, request_id120 - **Metrics**: request_count, error_count, response_time121 - **Dashboards/Alerts**: High Error Rate > 5%122123124## Agent Directives & Error Recovery125*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*126127- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.128- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.129- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.130- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.131132133## Definition of Done134- [ ] One-command setup script created135- [ ] .env.example template provided136- [ ] Docker Compose configuration137- [ ] Package.json scripts standardized138- [ ] README development section complete139- [ ] VS Code workspace settings140- [ ] Hot reload configured141- [ ] Troubleshooting guide142- [ ] Local development checklist143144---145146## Anti-patterns / Pitfalls147148* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries149* ⚠️ **Watch out for**: Common symptoms and quick fixes150* 💡 **Instead**: Use proper error handling, pagination, and logging151152153## Reference Links154- [Docker Documentation](https://docs.docker.com/)155- [Docker Compose Documentation](https://docs.docker.com/compose/)156- [Node.js Best Practices](https://nodejs.org/en/docs/guides/)157- [VS Code Settings](https://code.visualstudio.com/docs/getstarted/settings)158159---160161## Versioning & Changelog162163* **Version**: 1.0.0164* **Changelog**:165 - 2026-02-22: Initial version with complete template structure166167---168> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.169<!-- tomevault:4.0:skill_md:2026-04-13 -->