# directory-structure

directory-structure defines a standard top-level repository layout for your AI coding assistant, mapping source files, tests, and configuration.

- rule · `type=rule` · Claude Code, Cline, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop) · ★ 1054 repo stars
- Author: Bhartendu-Kumar
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/directory-structure.mdc
- Updated: 2025-07-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/directory-structure

## What it does

The rule outlines the project tree using a Mermaid diagram. It establishes standard locations for application code in `src/`, test suites in `test/`, shared helpers in `utils/`, configurations in `config/`, and data files in `data/`.

It also reserves directories for project tasks, documentation in `docs/`, and assistant configuration folders such as `.clinerules`. Because `alwaysApply` is set to `false`, the assistant references this layout only when project structure decisions arise.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/directory-structure.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/directory-structure.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/directory-structure.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/directory-structure.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/directory-structure.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/directory-structure.mdc

## When to use it
- organize newly created files into standard project folders
- separate documentation, tests, and configuration cleanly
- guide the AI agent when generating top-level directories

## Example prompts
- Set up a new repository layout following the directory structure rule
- Where should I place integration tests according to the project layout?
- Review our project tree against directory-structure

## Similar
- [expo-project-structure](https://affpapa.org/en/nevibecode/skills/expo-project-structure.md) — skill · 27400 installs
- [folder-structure-blueprint-generator](https://affpapa.org/en/nevibecode/skills/folder-structure-blueprint-generator.md) — skill · 9438 installs
- [project-structure](https://affpapa.org/en/nevibecode/skills/modelcontextprotocol-project-structure.md) — skill · ★ 92149 repo stars
- [file-organization](https://affpapa.org/en/nevibecode/skills/akillness-file-organization.md) — skill · 406 installs
- [sales-org-structure](https://affpapa.org/en/nevibecode/skills/sales-org-structure.md) — skill · 33600 installs
- [HeyClaude — Claude & AI workflow directory](https://affpapa.org/en/nevibecode/mcp/heyclaude-claude-ai-workflow-directory.md) — MCP server · ★ 309 repo stars

From the same set: [bhartendu-kumar/rules_template](https://affpapa.org/en/nevibecode/by/bhartendu-kumar/rules_template.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
