You are tasked with creating a comprehensive development guideline document for **{{LANGUAGE}}** following the template structure provided at the end of this file.
Generates comprehensive development guidelines for any programming language following industry standards and best practices.
/plugin marketplace add devfullcycle/claude-mkt-place/plugin install development-guidelines@fullcycle-claude-marketplaceYou are tasked with creating a comprehensive development guideline document for {{LANGUAGE}} following the template structure provided at the end of this file.
/generate-development-guideline <language> [--param=value ...]
Supported Parameters (all optional):
--orm=<name> - ORM or query builder (e.g., prisma, sqlalchemy, sqlc, gorm, hibernate)--web=<name> - Web framework (e.g., express, fastapi, chi, spring-boot, gin, flask)--framework=<name> - Main framework (e.g., laravel, nestjs, langgraph, langchain, spring, django)--db=<name> - Database driver (e.g., pgx, asyncpg, mysql2, jdbc, psycopg2)--testing=<name> - Testing framework (e.g., jest, pytest, testify, junit, vitest)--logging=<name> - Logging library (e.g., winston, structlog, zap, logrus, log4j)--validation=<name> - Validation library (e.g., zod, pydantic, validator, joi)--http=<name> - HTTP client (e.g., axios, requests, resty, okhttp, httpx)--di=<name> - Dependency injection (e.g., inversify, wire, spring, dagger)--async=<name> - Async runtime (e.g., tokio, asyncio, async-std, gevent)--serialization=<name> - Serialization library (e.g., serde, jackson, gson, msgpack)Examples:
/generate-development-guideline Go --orm=sqlc --web=chi --db=pgx --testing=testify
/generate-development-guideline TypeScript --orm=prisma --web=express --testing=jest --validation=zod
/generate-development-guideline Python --orm=sqlalchemy --web=fastapi --logging=structlog
/generate-development-guideline Rust --orm=diesel --web=axum --async=tokio --serialization=serde
Must have code examples: 7 (Functions), 8 (Errors), 11 (Tests), 22 (Database), 23 (Logs)
[OPCIONAL] section and include ONLY if the language supports that featureParse the command invocation to extract library/framework preferences from the parameters.
Create a "Project Stack" configuration with auto-defaults:
--key=value parameters from the commandtesting: Auto-select most popular framework for the languageformatting: Auto-select standard formatter (black, gofmt, prettier, rustfmt)linting: Auto-select standard linter for the languagelogging: Auto-select stdlib logging if good, or most popular librarybuild_tool: Auto-select native build tool when applicable (make, cargo, gradle)Auto-Default Rules by Language:
Go:
testing: "testing (stdlib) + testify for assertions"
formatting: "gofmt, goimports"
linting: "go vet, staticcheck, golangci-lint"
logging: "log/slog (Go 1.21+)"
build_tool: "go build, make"
Python:
testing: "pytest (most popular) or unittest (stdlib)"
formatting: "black"
linting: "flake8, pylint"
type_checking: "mypy"
logging: "logging (stdlib)"
build_tool: "pip, poetry"
TypeScript/JavaScript:
testing: "jest or vitest"
formatting: "prettier"
linting: "eslint"
type_checking: "tsc"
logging: "winston or pino"
build_tool: "npm, pnpm, yarn"
Rust:
testing: "cargo test (stdlib)"
formatting: "rustfmt"
linting: "clippy"
logging: "tracing or log crate"
build_tool: "cargo"
Example parsing with auto-defaults:
Command: /generate-development-guideline Go --orm=sqlc --web=chi --db=pgx
Result:
{
"language": "Go",
"stack": {
"orm": "sqlc", // User specified
"web": "chi", // User specified
"db": "pgx", // User specified
"testing": "testify", // AUTO-POPULATED
"logging": "log/slog", // AUTO-POPULATED
"formatting": "gofmt", // AUTO-POPULATED
"linting": "staticcheck", // AUTO-POPULATED
"build_tool": "make", // AUTO-POPULATED
"validation": null, // Not applicable for Go
"http": null, // Not specified, not auto-populated
"di": null, // Not specified, not auto-populated
"async": null, // N/A for Go (no async runtime)
"serialization": null // Not specified, not auto-populated
}
}
Output Phase 0 Report:
PROJECT STACK CONFIGURATION
Language: {{LANGUAGE}}
User-Specified Libraries:
- ORM: {{orm}}
- Web Framework: {{web}}
- Database Driver: {{db}}
Auto-Populated Essential Tools:
- Testing: {{testing}} (auto-selected)
- Formatting: {{formatting}} (auto-selected)
- Linting: {{linting}} (auto-selected)
- Logging: {{logging}} (auto-selected)
- Build Tool: {{build_tool}} (auto-selected)
Not Specified (will use language-generic guidance):
- HTTP Client
- Dependency Injection
- [... other categories]
NOTE: Auto-populated tools are language standards that every project should use.
User-specified libraries will be listed in Project Stack section for reference only.
All code examples will use stdlib/language-native features only.
Use WebSearch extensively to find and analyze. Minimum 5 official sources required.
1. Official Documentation (MANDATORY - minimum 3 sources):
2. Authoritative Industry Guidelines (minimum 2 sources):
3. Essential Ecosystem Tools (research for ALL languages):
4. Language Characteristics (deep analysis required):
5. Real-World Examples (find at least 3 production codebases):
6. Library Research (for user-specified AND auto-populated):
For ALL libraries in Project Stack (user-specified + auto-populated):
Research Completeness Check:
Document ALL sources with URLs for the References section.
Based on your research findings, determine:
1. Which [OPCIONAL] sections to include:
Evaluate each optional section:
2. Calculate final section count:
[OPCIONAL])3. Create numbering mapping:
4. Document your decisions:
5. Finalize Project Stack:
CRITICAL: Document generation is split into 4 sub-phases to stay under 32K token output limit.
CONCISENESS RULES (apply to ALL sub-phases):
Global Generation Rules (apply to ALL sub-phases):
1. Numbering:
[OPTIONAL] markers from section titles2. Content Quality:
3. Formatting Consistency:
4. Language-Specific Authenticity:
5. Completeness:
6. Library Integration Strategy (CRITICAL - Moderate Approach):
Code Examples Philosophy:
Example Approach by Section:
Project Stack Section (reference only):
ALWAYS include "Project Stack" section when ANY libraries are in the stack (user-specified OR auto-populated):
## Project Stack
The following libraries were specified for reference in this project:
**User-Specified Libraries**:
- **ORM/Database**: {{orm}} (v{{version}}) - {{purpose}} - {{link}}
- **Web Framework**: {{web}} (v{{version}}) - {{purpose}} - {{link}}
**Auto-Populated Essential Tools**:
- **Testing**: {{testing}} (v{{version}}) - {{purpose}} - {{link}}
- **Formatting**: {{formatting}} - {{purpose}} - {{link}}
- **Linting**: {{linting}} - {{purpose}} - {{link}}
- **Logging**: {{logging}} (v{{version}}) - {{purpose}} - {{link}}
> **Note**: This section lists libraries for quick reference.
> All code examples in this guideline use standard library or language-native features.
> Principles and patterns apply regardless of library choices.
Position: Place Project Stack section immediately after title, before Section 1.
If Project Stack is empty (no user params, language has no auto-defaults): DO NOT include section.
Generate sections 1-8 (Core Principles through Error Handling).
Content:
Line Limit: Maximum 400 lines total for this phase
Write to: {{LANGUAGE}}-development-guidelines.md
Generate sections 9-16 (Concurrency through Benchmarks).
Content:
Line Limit: Maximum 350 lines total for this phase
Append to: {{LANGUAGE}}-development-guidelines.md
Generate sections 17-21 (Optimization through Comments).
Content:
Line Limit: Maximum 250 lines total for this phase
Append to: {{LANGUAGE}}-development-guidelines.md
Generate sections 22-26 (Database through References).
Content:
Line Limit: Maximum 350 lines total for this phase
Append to: {{LANGUAGE}}-development-guidelines.md
Count total lines in the document.
If document has MORE than 1500 lines:
Also verify:
If any requirement fails: Fix before proceeding to Phase 4.
Quick final checks before delivery:
Final Checks:
[OPTIONAL] markers remainIf Project Stack used:
Provide the following:
1. Phase 0 Output (Parameter Parsing):
2. Research Summary (brief, 5-10 lines):
3. Section Inclusion Report:
4. Project Stack Final Report (ONLY if parameters provided):
PROJECT STACK (FINAL)
- ORM: <name> v<version> - <purpose> - <link>
- Web: <name> v<version> - <purpose> - <link>
- Database: <name> v<version> - <purpose> - <link>
- Testing: <name> v<version> - <purpose> - <link>
- Logging: <name> v<version> - <purpose> - <link>
- [only categories that were specified via parameters]
If NO parameters provided: Report "No libraries specified - guideline will be 100% language-generic"
5. Final Document:
{{LANGUAGE}}-development-guidelines.md6. Validation Report:
DO NOT:
[OPCIONAL] markers in final documentDO:
[OPCIONAL] markers from included sectionsScenario: Creating guidelines for a language that has:
Template → Final mapping:
Template Final Document
1. Principles → 1. Principles
2. Project Init → 2. Project Init
3. Structure → 3. Structure
4. [OPCIONAL] Docker → 4. Docker (INCLUDED)
5. Nomenclature → 5. Nomenclature
6. [OPCIONAL] Types → 6. Types (INCLUDED)
7. Functions → 7. Functions
8. Errors → 8. Errors
9. [OPCIONAL] Concurrency → (EXCLUDED)
10. [OPCIONAL] Interfaces → 9. Interfaces (INCLUDED, renumbered)
11. Tests → 10. Tests (renumbered)
12. [OPCIONAL] Mocks → (EXCLUDED)
13. Integration Tests → 11. Integration Tests (renumbered)
... → ...continue renumbering
Key point: Sequential numbers with NO gaps. When you exclude section 9, section 10 becomes section 9.
WRONG (Library-specific content in main sections):
## 22. Database
### 22.1 Using Prisma ORM
npm install prisma @prisma/client
### 22.2 Prisma Schema
[Prisma-specific examples and patterns]
CORRECT (Language-generic content):
## 22. Database
### 22.1 Abordagem
TypeScript supports ORMs, query builders, and raw SQL approaches.
### 22.2 Conexão
Example using standard PostgreSQL driver (pg):
[Generic TypeScript database connection example]
### 22.3 Boas Práticas
[Language-level database best practices]
Project Stack section (ONLY if --orm=prisma was specified):
## Project Stack
- **ORM**: Prisma (v5.8.0) - Type-safe database ORM for Node.js and TypeScript - https://www.prisma.io
FIRST: Parse command parameters to extract Project Stack configuration (Phase 0).
THEN: Read the template structure at the end of this file.
FINALLY: Begin Phase 1 research for {{LANGUAGE}} and specified libraries.
The following template defines the structure and sections for language development guidelines.
Note on Optional Sections: This template contains sections marked as [OPTIONAL] that should be included or excluded according to the language's characteristics and peculiarities. Not all languages have the same features:
- Some languages don't have strong static typing (Types section)
- Some don't have native concurrency primitives (Concurrency section)
- Some don't have support for interfaces or similar abstractions (Interfaces section)
- Profiling and benchmarking tools may not be available or mature
- Docker may not be applicable for all languages
Instruction: When creating guidelines for a specific language, evaluate each [OPTIONAL] section and include only those that make sense for the language in question.
Commands to initialize project with package manager and configure namespace/repository.
Commands to add, remove, and update dependencies.
Standard directory layout for the language, including:
Include if the language and ecosystem benefit from containerized development.
Every development project should use Docker when available to ensure:
List of necessary Docker files (Dockerfile, docker-compose.yaml, .dockerignore).
Dockerfile focused on development.
Use sleep infinity to keep container running.
Configuration with:
Essential list of files/directories to ignore in build.
Table with main commands:
Simplified commands for common operations.
Specific recommendations for using Docker with the language.
Language naming conventions for:
Include only if language has strong static typing.
How to declare types, structs, classes, enums.
Practices to ensure type safety.
How to allocate and initialize data structures.
Patterns for declaring functions with types, parameters, and returns.
MUST include code example showing:
How to return values and handle errors idiomatically.
MUST include "Good vs Bad" example showing:
Language's error handling model (exceptions, error values, result types, etc.).
MUST include code example showing:
How to handle, propagate, and log errors idiomatically.
MUST include "Good vs Bad" example showing:
Include if language has native concurrency primitives (goroutines, async/await, threads, etc.).
Threads, async/await, goroutines, or specific model.
Mutexes, locks, channels, promises.
Common concurrency traps in the language.
Include if language has interfaces, traits, protocols, or similar abstraction mechanisms.
How to design small, cohesive interfaces.
How to implement and validate implementations.
How to compose interfaces to create larger abstractions.
Framework and test writing patterns.
MUST include code example showing:
Parametrized tests when applicable in the language.
MUST include code example showing:
How to make assertions and validations.
Commands to run tests with coverage, specific tests.
MUST include executable commands showing:
Include if language has mature mocking tools or established patterns.
Manual mocks vs mocking libraries.
How to structure code for testability.
Mocks, stubs, fakes, spies.
Build tags, markers, or mechanisms to separate integration tests.
How to run only unit tests or only integration tests.
Use of testcontainers or similar tools when applicable.
Include if there are language-specific tools or established practices for load testing.
Available load testing tools.
How to write benchmarks that simulate real load.
How to test behavior under concurrent access.
Include if language has mature profiling tools.
Tools for performance analysis.
Profilers, debuggers, memory inspectors.
How to capture and analyze profiles.
Include if language has native or established benchmarking framework.
How to write valid benchmarks.
Parametrized benchmarks.
Commands to run and compare benchmarks.
Include relevant language-specific optimization techniques.
Measure first, low-hanging fruit, document trade-offs.
Pre-allocation, caching, object reuse, lazy loading.
Specific techniques to reduce allocations and memory consumption.
General performance best practices (conversions, concatenations, etc.).
Specific vulnerability scanners.
Defensive copying, input validation, sanitization.
Reducing nesting.
Logic separated from I/O.
Extract duplication, but avoid premature abstraction.
Minimize variable scope.
Check vulnerabilities, update, clean.
Comment "why", not "what".
Language's documentation style (docstrings, JSDoc, GoDoc, etc.).
How to document packages/modules.
Available approaches in the language: ORM, Query Builder, or Raw SQL. Discussion of trade-offs for each approach.
How to connect to databases using standard driver or native language library.
CRITICAL: Use ONLY standard library or official language drivers in examples.
MUST include code example showing:
MUST include code example showing:
Migration concept and how they are managed in the language. Common patterns and approaches in the language ecosystem.
DEBUG, INFO, WARN, ERROR, FATAL. How the language categorizes log severity.
Concept of structured logs (JSON, key-value). How to implement using native language features.
MUST include code example showing:
How to implement logging using standard library or native features. Practical examples without external dependencies.
MUST include code example showing:
Metrics collection: latency, error rate, throughput, resources. Code instrumentation principles.
Universal principles adapted for the language:
Links to language documentation, best practices, style guides.
Links to package manager, formatter, linter, testing framework.
Links to profiling tools, load testing, testcontainers.
Forum, resource lists, awesome lists.