skills/documentation/SKILL.md
Generate Javadoc, README files, ADRs (Architecture Decision Records), and technical documentation for Java/Spring Boot projects. Use this skill whenever the user needs to write documentation, create a README, document a class or method, write an ADR, generate Javadoc, or says things like "document this code", "write a README for X", "add Javadoc to this", "write an ADR for this decision", "document this API", "create technical documentation". Always use this skill for any documentation task in a Java/Spring Boot context.
npx skillsauth add jyjeanne/ai-setup-forge documentationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate clear, useful documentation — Javadoc, README, ADRs, and technical guides — for Java/Spring Boot projects.
/**
* Service responsible for managing the user lifecycle including registration,
* profile updates, and account deactivation.
*
* <p>All write operations are transactional. Read operations use
* {@code @Transactional(readOnly = true)} for performance optimization.
*
* <p>Authentication is handled separately by {@link AuthService}.
*
* @author [Author]
* @since 1.0
* @see UserRepository
* @see AuthService
*/
@Service
public class UserServiceImpl implements UserService { ... }
/**
* Retrieves a user by their unique identifier.
*
* @param id the user's unique identifier, must be positive
* @return the user response DTO
* @throws ResourceNotFoundException if no user exists with the given id
* @throws IllegalArgumentException if id is null or negative
*/
UserResponse findById(Long id);
Rules for good Javadoc:
@throws for checked and significant unchecked exceptions{@link ClassName#method()} for cross-references/**
* Domain services for the User bounded context.
*
* <p>Contains the business logic for user management, authentication,
* and authorization. Services in this package orchestrate between
* repositories and external integrations.
*
* <p>All services follow the interface/implementation pattern to
* facilitate testing and dependency inversion.
*/
package com.example.user.service;
# [Project Name]
> One-line description of what this service does.
## Overview
[2-3 paragraph description of the service's purpose, domain, and how it fits
into the broader system.]
## Technology Stack
- Java 21
- Spring Boot 3.x
- PostgreSQL 15
- [Other key dependencies]
## Prerequisites
- Java 21+
- Docker & Docker Compose
- Maven 3.8+
## Getting Started
### Run with Docker Compose
```bash
docker-compose up -d # Start dependencies (DB, Kafka, etc.)
./mvnw spring-boot:run # Start the application
./mvnw test # Unit tests
./mvnw verify # Unit + integration tests
| Variable | Description | Default |
|----------|-------------|---------|
| DB_URL | PostgreSQL JDBC URL | jdbc:postgresql://localhost:5432/mydb |
| DB_USER | Database username | postgres |
| DB_PASS | Database password | (required) |
| KAFKA_BOOTSTRAP | Kafka bootstrap servers | localhost:9092 |
Swagger UI available at: http://localhost:8080/swagger-ui.html
| Method | URL | Description |
|--------|-----|-------------|
| GET | /api/v1/users | List all users (paginated) |
| POST | /api/v1/users | Create a user |
| GET | /api/v1/users/{id} | Get user by ID |
| PUT | /api/v1/users/{id} | Update user |
| DELETE | /api/v1/users/{id} | Delete user |
src/
├── main/java/com/example/
│ ├── config/ # Spring configuration classes
│ ├── controller/ # REST controllers
│ ├── service/ # Business logic (interfaces + impls)
│ ├── repository/ # Spring Data JPA repositories
│ ├── domain/ # JPA entities
│ ├── dto/ # Request/Response DTOs
│ ├── mapper/ # MapStruct mappers
│ └── exception/ # Custom exceptions + global handler
└── test/
├── unit/ # Pure unit tests (Mockito)
└── integration/ # Spring Boot integration tests
See docs/adr/ for Architecture Decision Records.
develop./mvnw verify
---
## ADR (Architecture Decision Record) Template
```markdown
# ADR-[NUMBER]: [Short Title]
**Date**: YYYY-MM-DD
**Status**: [Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
**Deciders**: [List of people involved]
## Context
[Describe the problem, situation, or requirement that forces a decision.
What constraints exist? What is non-negotiable?]
## Decision
[State the decision clearly. What have we decided to do?]
We will use **[technology/pattern/approach]** because [primary reason].
## Considered Alternatives
### Option 1: [Name] ← Chosen
**Pros**: [Why it's good]
**Cons**: [Trade-offs accepted]
### Option 2: [Name]
**Pros**: ...
**Cons**: [Why rejected]
### Option 3: [Name]
**Pros**: ...
**Cons**: [Why rejected]
## Consequences
**Positive**:
- [Benefit 1]
- [Benefit 2]
**Negative / Trade-offs**:
- [Cost 1 — and how we mitigate it]
- [Cost 2]
**Neutral**:
- [Side effects to be aware of]
## Implementation Notes
[Optional: key technical details, migration steps, or code examples
needed to implement the decision]
// ✅ Comment explains WHY, not WHAT
// We use a short-lived token (15 min) to minimize exposure if intercepted
private static final int ACCESS_TOKEN_MINUTES = 15;
// ✅ Comment explains non-obvious business rule
// Per regulation §4.2: orders placed after 3PM ship the following business day
if (orderTime.getHour() >= 15) {
shippingDate = nextBusinessDay(orderTime.toLocalDate());
}
// ✅ TODO with ticket reference
// TODO(JIRA-1234): Replace with circuit breaker once resilience4j is integrated
Thread.sleep(retryDelay);
// ❌ Comment restates the code (useless)
// Increment counter by 1
counter++;
// ❌ Commented-out code (use git instead)
// userRepository.deleteAll();
# Changelog
All notable changes to this project are documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/).
## [Unreleased]
## [1.2.0] - 2024-01-15
### Added
- Product filtering by category and price range (#142)
- Swagger UI documentation for all endpoints
### Changed
- Improved error response format to include `violations` array for 400 errors
### Fixed
- N+1 query in OrderService.findAllWithItems (#138)
- Missing @Transactional on UserService.transferCredits (#141)
### Security
- Updated spring-security to 6.2.1 (CVE-2024-XXXX)
development
Generate breadboard circuit mockups and visual diagrams using HTML5 Canvas drawing techniques. Use when asked to create circuit layouts, visualize electronic component placements, draw breadboard diagrams, mockup 6502 builds, generate retro computer schematics, or design vintage electronics projects. Supports 555 timers, W65C02S microprocessors, 28C256 EEPROMs, W65C22 VIA chips, 7400-series logic gates, LEDs, resistors, capacitors, switches, buttons, crystals, and wires.
development
Apply lean thinking to UX: hypothesis-driven design, collaborative sketching, and rapid experiments instead of heavy deliverables. Use when the user mentions "Lean UX", "design hypothesis", "UX experiment", "collaborative design", or "outcome over output". Covers hypothesis statements, MVPs for UX, and cross-functional collaboration. For Build-Measure-Learn, see lean-startup. For usability audits, see ux-heuristics.
development
Design MVPs, validated learning experiments, and pivot-or-persevere decisions using Build-Measure-Learn. Use when the user mentions "MVP scope", "validated learning", "pivot or persevere", "vanity metrics", or "test assumptions". Covers innovation accounting and actionable metrics. For 5-day prototype testing, see design-sprint. For customer motivation analysis, see jobs-to-be-done.
tools
Instrument, trace, evaluate, and monitor LLM applications and AI agents with LangSmith. Use when setting up observability for LLM pipelines, running offline or online evaluations, managing prompts in the Prompt Hub, creating datasets for regression testing, or deploying agent servers. Triggers on: langsmith, langchain tracing, llm tracing, llm observability, llm evaluation, trace llm calls, @traceable, wrap_openai, langsmith evaluate, langsmith dataset, langsmith feedback, langsmith prompt hub, langsmith project, llm monitoring, llm debugging, llm quality, openevals, langsmith cli, langsmith experiment, annotate llm, llm judge.