Spring AI Documentation Alignment
Use this skill when asked to improve, rewrite, audit, align, or extend documentation for:
spring-ai/spring-ai-core
spring-ai/spring-ai-agent
- the aggregate entry point
spring-ai/README.md
The goal is to keep the Spring AI documentation accurate, coherent, navigable, and grounded in the current Java code and Maven metadata.
Documentation Surfaces
Primary files:
spring-ai/README.md: top-level summary and access point for Spring AI integration docs.
spring-ai/spring-ai-core/README.md: user-facing overview for core Spring AI utilities.
spring-ai/spring-ai-agent/README.md: user-facing overview for the ReAct agent executor.
Source-of-truth code and metadata:
spring-ai/spring-ai-core/pom.xml
spring-ai/spring-ai-agent/pom.xml
spring-ai/spring-ai-core/src/main/java
spring-ai/spring-ai-agent/src/main/java
- focused tests and examples under each module's
src/test/java and src/test/resources
Workflow
Inspect the existing docs before editing.
- Read the relevant README and Maven site markdown.
- Read the matching
pom.xml for artifact ids, dependency names, Java level, and module purpose.
- Search the module source for the documented APIs, builders, methods, and package names.
Verify examples against code.
- Confirm class names, package names, builder methods, state keys, and imports exist.
- Prefer examples copied or adapted from tests when they are current.
- Do not document APIs from old examples if the current source no longer supports them.
Align the module narrative.
spring-ai-core should describe reusable Spring AI integration utilities: streaming chat generation, tool service support, state serialization, and message serialization.
spring-ai-agent should describe the Spring AI ReAct agent executor built on LangGraph4j, including graph construction, tool callbacks, chat model configuration, execution flow, and optional LangGraph Studio integration.
- Keep module names and Maven artifact ids exact:
langgraph4j-spring-ai
langgraph4j-springai-agentexecutor
Update spring-ai/README.md whenever module docs change.
- Provide a short project-level summary.
- Add direct links to
spring-ai-core and spring-ai-agent documentation.
- Mention each module's purpose in one or two sentences.
- Keep it as a navigation hub, not a duplicated full manual.
Keep README concise, practical, and immediately useful from GitHub..
Keep README and site docs consistent.
- README files should be concise, practical, and immediately useful from GitHub.
- Site markdown can include deeper tutorial structure, diagrams, and generated reference content.
- If a concept appears in both places, names, examples, and links must agree.
-->
Validate the final docs.
- Check Markdown headings, links, fenced code blocks, and relative paths.
- Search for stale terms such as old artifact ids, obsolete builder method names, broken image paths, or generated placeholder links like
[None](None).
- Run documentation-related Maven commands only if the task requires generated site validation.
Writing Standards
- Use clear technical prose aimed at Java developers adopting LangGraph4j with Spring AI.
- Start each module README with what the module does, when to use it, and the Maven dependency.
- Prefer short sections with concrete examples over broad marketing language.
- Keep code blocks compilable in spirit: include enough context to explain usage without turning docs into full applications.
- Use consistent spelling:
LangGraph4j
Spring AI
ReAct
ChatModel
ChatClient
ToolCallback
- Avoid emojis in new prose unless preserving an existing heading style is explicitly desired.
- Do not invent features, configuration flags, or dependency coordinates.
Recommended README Shape
For spring-ai/README.md:
# LangGraph4j Spring AI Integration
Short summary.
## Modules
- [spring-ai-core](spring-ai-core/README.md): ...
- [spring-ai-agent](spring-ai-agent/README.md): ...
## Documentation
- [Core Maven site docs](spring-ai-core/src/site/markdown/index.md)
- [Agent Maven site docs](spring-ai-agent/src/site/markdown/index.md)
For module READMEs:
# Module Title
Short purpose statement.
## Features
## Installation
## Usage
## Related Documentation
Common Fixes
- Replace stale dependency snippets with coordinates from the module
pom.xml.
- Replace broken or generated placeholder links with real repository-relative links.
- Move duplicated long explanations from
spring-ai/README.md into module docs and link to them.
- Prefer diagrams already present in
src/site/resources or Mermaid blocks already maintained in the docs.
- Preserve generated tutorial files when they are still useful, but clearly separate generated reference content from hand-written getting-started guidance.
Done Criteria
A documentation update is complete when:
spring-ai/README.md gives a useful summary and direct access to both module docs.
- The changed module docs match current Java APIs and Maven coordinates.
- Cross-links resolve relative to their Markdown file locations.
- Examples use current Spring AI and LangGraph4j names.
- There are no obvious stale placeholders, contradictory descriptions, or unsupported claims.
1---2name: docs-springai3description: Refine, align, and maintain technical documentation for the LangGraph4j Spring AI modules spring-ai/spring-ai-core and spring-ai/spring-ai-agent, including their README files, Maven site markdown, examples, cross-links, and the summary entry point in spring-ai/README.md.4---56# Spring AI Documentation Alignment78Use this skill when asked to improve, rewrite, audit, align, or extend documentation for:910- `spring-ai/spring-ai-core`11- `spring-ai/spring-ai-agent`12- the aggregate entry point `spring-ai/README.md`1314The goal is to keep the Spring AI documentation accurate, coherent, navigable, and grounded in the current Java code and Maven metadata.1516## Documentation Surfaces1718Primary files:1920- `spring-ai/README.md`: top-level summary and access point for Spring AI integration docs.21- `spring-ai/spring-ai-core/README.md`: user-facing overview for core Spring AI utilities.22- `spring-ai/spring-ai-agent/README.md`: user-facing overview for the ReAct agent executor.2324<!--25Site documentation:2627- `spring-ai/spring-ai-core/src/site/markdown/index.md`28- `spring-ai/spring-ai-core/src/site/markdown/*.md`29- `spring-ai/spring-ai-agent/src/site/markdown/index.md`30-->3132Source-of-truth code and metadata:3334- `spring-ai/spring-ai-core/pom.xml`35- `spring-ai/spring-ai-agent/pom.xml`36- `spring-ai/spring-ai-core/src/main/java`37- `spring-ai/spring-ai-agent/src/main/java`38- focused tests and examples under each module's `src/test/java` and `src/test/resources`3940## Workflow41421. Inspect the existing docs before editing.43 - Read the relevant README and Maven site markdown.44 - Read the matching `pom.xml` for artifact ids, dependency names, Java level, and module purpose.45 - Search the module source for the documented APIs, builders, methods, and package names.46472. Verify examples against code.48 - Confirm class names, package names, builder methods, state keys, and imports exist.49 - Prefer examples copied or adapted from tests when they are current.50 - Do not document APIs from old examples if the current source no longer supports them.51523. Align the module narrative.53 - `spring-ai-core` should describe reusable Spring AI integration utilities: streaming chat generation, tool service support, state serialization, and message serialization.54 - `spring-ai-agent` should describe the Spring AI ReAct agent executor built on LangGraph4j, including graph construction, tool callbacks, chat model configuration, execution flow, and optional LangGraph Studio integration.55 - Keep module names and Maven artifact ids exact:56 - `langgraph4j-spring-ai`57 - `langgraph4j-springai-agentexecutor`58594. Update `spring-ai/README.md` whenever module docs change.60 - Provide a short project-level summary.61 - Add direct links to `spring-ai-core` and `spring-ai-agent` documentation.62 - Mention each module's purpose in one or two sentences.63 - Keep it as a navigation hub, not a duplicated full manual.64655. Keep README concise, practical, and immediately useful from GitHub..6667<!-->685. Keep README and site docs consistent.69 - README files should be concise, practical, and immediately useful from GitHub.70 - Site markdown can include deeper tutorial structure, diagrams, and generated reference content.71 - If a concept appears in both places, names, examples, and links must agree.72-->73746. Validate the final docs.75 - Check Markdown headings, links, fenced code blocks, and relative paths.76 - Search for stale terms such as old artifact ids, obsolete builder method names, broken image paths, or generated placeholder links like `[None](None)`.77 - Run documentation-related Maven commands only if the task requires generated site validation.7879## Writing Standards8081- Use clear technical prose aimed at Java developers adopting LangGraph4j with Spring AI.82- Start each module README with what the module does, when to use it, and the Maven dependency.83- Prefer short sections with concrete examples over broad marketing language.84- Keep code blocks compilable in spirit: include enough context to explain usage without turning docs into full applications.85- Use consistent spelling:86 - `LangGraph4j`87 - `Spring AI`88 - `ReAct`89 - `ChatModel`90 - `ChatClient`91 - `ToolCallback`92- Avoid emojis in new prose unless preserving an existing heading style is explicitly desired.93- Do not invent features, configuration flags, or dependency coordinates.9495## Recommended README Shape9697For `spring-ai/README.md`:9899```markdown100# LangGraph4j Spring AI Integration101102Short summary.103104## Modules105106- [spring-ai-core](spring-ai-core/README.md): ...107- [spring-ai-agent](spring-ai-agent/README.md): ...108109## Documentation110111- [Core Maven site docs](spring-ai-core/src/site/markdown/index.md)112- [Agent Maven site docs](spring-ai-agent/src/site/markdown/index.md)113```114115For module READMEs:116117```markdown118# Module Title119120Short purpose statement.121122## Features123124## Installation125126## Usage127128## Related Documentation129```130131## Common Fixes132133- Replace stale dependency snippets with coordinates from the module `pom.xml`.134- Replace broken or generated placeholder links with real repository-relative links.135- Move duplicated long explanations from `spring-ai/README.md` into module docs and link to them.136- Prefer diagrams already present in `src/site/resources` or Mermaid blocks already maintained in the docs.137- Preserve generated tutorial files when they are still useful, but clearly separate generated reference content from hand-written getting-started guidance.138139## Done Criteria140141A documentation update is complete when:142143- `spring-ai/README.md` gives a useful summary and direct access to both module docs.144- The changed module docs match current Java APIs and Maven coordinates.145- Cross-links resolve relative to their Markdown file locations.146- Examples use current Spring AI and LangGraph4j names.147- There are no obvious stale placeholders, contradictory descriptions, or unsupported claims.