Purpose: How to choose and apply the right organizational pattern
Last Updated: 2026-02-15
Use for: Repository-specific context
Structure: Organize by what the information does
{repo}/
├── concepts/ # What it is
├── examples/ # Working code
├── guides/ # How to do it
├── lookup/ # Quick reference
└── errors/ # Troubleshooting
Example: openagents-repo/
Use for: Multi-technology development context
Structure: Organize by what you're doing (concern), then how (approach/tech)
{concern}/
├── {approach}/ # How you're doing it
└── {tech}/ # What you're using
Example: development/frontend/react/, ui/web/design/
| Question | Answer | Use Pattern |
|---|---|---|
| Is this repository-specific? | YES | Pattern A (Function-Based) |
| Does content span multiple technologies? | YES | Pattern B (Concern-Based) |
| Single domain/technology? | YES | Pattern A (Function-Based) |
.opencode/context/mkdir -p {category}/{subcategory}
navigation.md to each directoryopenagents-repo/
├── concepts/agents.md
├── examples/subagent-example.md
├── guides/creating-agents.md
├── lookup/commands.md
└── errors/tool-errors.md
development/
├── frontend/
│ ├── react/
│ └── vue/
├── backend/
│ ├── node/
│ └── python/
└── data/
└── postgres/
ui/
├── web/
│ ├── design/
│ ├── animation/
│ └── react-patterns.md
└── terminal/
└── cli-design.md
| Issue | Solution |
|---|---|
| File fits multiple categories | Choose primary purpose, reference from others |
| Too many files in one directory | Create subcategories |
| Unclear hierarchy | Use concern-based pattern |
| Navigation too complex | Simplify structure, use specialized navigation |