Skip to content

Commit f3bf8f2

Browse files
github-actions[bot]shopwareBot
andauthored
[create-pull-request] automated change (#1965)
Co-authored-by: shopwareBot <[email protected]>
1 parent 19b1692 commit f3bf8f2

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Co-locate Administration Technical Documentation with Source Code
3+
date: 2025-10-14
4+
area: administration
5+
tags: [administration, documentation, ai, agents, developer-experience]
6+
---
7+
8+
# Co-locate Administration Technical Documentation with Source Code
9+
10+
::: info
11+
This document represents an architecture decision record (ADR) and has been mirrored from the ADR section in our Shopware 6 repository.
12+
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/adr/2025-10-14-colocate-administration-technical-docs.md)
13+
:::
14+
15+
## Context
16+
17+
The Shopware Administration codebase contains AGENTS.md files throughout the source tree (`src/Administration/Resources/app/administration/src/**`) that serve as concise reference guides for AI assistants and developers. These files provide quick architectural guidance, critical rules, and key patterns.
18+
19+
However, comprehensive technical documentation traditionally lives in a separate documentation repository. This separation creates several challenges:
20+
21+
1. **Difficult Cross-Referencing**: AGENTS.md files cannot easily reference detailed documentation when it lives in a different repository, requiring absolute URLs or external links that may break.
22+
2. **Information Duplication**: Without easy references, AGENTS.md files would need to duplicate detailed explanations, leading to maintenance overhead and potential inconsistencies.
23+
3. **AI Context Limitations**: AI assistants working with the codebase cannot easily access external documentation repositories, limiting their ability to understand complex architectural patterns and make informed suggestions.
24+
4. **Version Synchronization**: Keeping documentation in sync with code changes across repositories is error-prone, especially for rapidly evolving areas.
25+
26+
## Decision
27+
28+
We will co-locate the technical documentation for the Administration component directly within the source tree at `src/Administration/Resources/app/administration/technical-docs/` instead of maintaining it in a separate documentation repository.
29+
30+
This approach enables:
31+
32+
- **Direct References**: AGENTS.md files can reference detailed documentation using relative paths (e.g., `> **Detailed Docs**: technical-docs/04-data-layer/`)
33+
- **Single Source of Truth**: Documentation lives alongside the code it describes, ensuring version alignment
34+
- **AI-Accessible Context**: AI assistants can access both code and comprehensive documentation in a single workspace, improving code understanding and suggestions
35+
- **Atomic Changes**: Documentation updates can be committed with related code changes in the same pull request
36+
37+
The technical documentation is organized in numbered sections (01-overview, 02-architecture, etc.) to provide structured, comprehensive guides that AGENTS.md files can reference without duplication.
38+
39+
## Consequences
40+
41+
### Positive
42+
43+
- AGENTS.md files remain concise while providing access to detailed documentation through references
44+
- AI assistants have complete context when analyzing or modifying Administration code
45+
- Documentation changes are automatically synchronized with code changes
46+
- Reduced duplication between AGENTS.md files and detailed documentation
47+
- Easier for developers to find relevant documentation when working in the codebase
48+
49+
### Neutral
50+
51+
- This is an experimental pattern initially applied only to the Administration component
52+
- If successful, this pattern may be adopted for other parts of Shopware 6 (Core, Storefront, etc.)
53+
- The effectiveness of this approach will be evaluated based on real-world usage
54+
55+
### Trade-offs
56+
57+
- Documentation for the technical Administration component is separated from the central documentation repository
58+
59+
We will monitor the effectiveness of this pattern for the Administration component before deciding whether to expand it to other areas of the codebase.

0 commit comments

Comments
 (0)