/claude-warden:warden-architecturefrom claude-warden
Project directory structure template — approved directories, depth limits, forbidden patterns
Ships in claude-warden. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Policy Area: ARCH — Architecture Version: 2.0 Last Reviewed: 2026-02-11 Owner: Human+AI References: workflow.md Enforcement: Active (CLAUDE.md rule) + Hard (hooks)
This is a TEMPLATE for projects using Warden. Customize it for your project's specific directory structure and naming conventions.
This directive defines the only approved directories and file locations for your project. Any file or directory not listed here is unauthorized. The AI must consult this directive before creating any file and must update this directive (with human approval) before creating any new directory.
For the Warden Framework's own structure, see the "Framework Directory Structure" section in README.md.
IMPORTANT: This is an EXAMPLE structure. Replace it with your project's actual directories. The following shows common patterns for different project types — choose one or adapt as needed.
Option 1: Simple CLI/Library Project
/project-root/
├── src/ # Source code
│ ├── core/ # Core functionality
│ ├── utils/ # Utilities (max 5 files)
│ └── cli/ # CLI interface (if applicable)
├── tests/ # Tests mirror src/ structure
│ ├── test_core/
│ └── test_utils/
├── docs/ # Documentation (non-governance)
└── .claude/ # Governance files (see .claude/rules/policy.md)
Option 2: Web Application (Frontend + Backend)
/project-root/
├── backend/
│ ├── app/
│ │ ├── models/ # Data models
│ │ ├── routes/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── core/ # Config, middleware
│ ├── tests/ # Mirrors backend/app/ structure
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API client
│ │ └── utils/ # Utilities (max 5 files)
│ └── package.json
├── scripts/ # Build/deploy scripts
├── docs/ # Documentation
└── .claude/ # Governance files (see .claude/rules/policy.md)
Option 3: Monorepo/Multi-Service
/project-root/
├── services/
│ ├── api/ # API service
│ │ ├── src/
│ │ └── tests/
│ ├── worker/ # Background worker
│ │ ├── src/
│ │ └── tests/
│ └── web/ # Web frontend
│ ├── src/
│ └── tests/
├── shared/ # Shared code
│ ├── types/
│ └── utils/
├── docs/ # Documentation
└── .claude/ # Governance files (see .claude/rules/policy.md)
After choosing a structure, delete the unused options and list ONLY your project's approved directories.
Before creating ANY new file, the AI must:
The AI may never create a directory that is not listed in INS-DA1-001.
No directory may be nested more than 5 levels from project root (max 6 path segments including file).
/backend/app/models/user.py (4 segments) — allowed/backend/app/services/auth/oauth.py (5 segments) — allowed/backend/app/services/auth/providers/oauth/google.py (7 segments) — forbidden/backend/app/services/auth_oauth_google.py or restructureThe following directory names may never be created anywhere in the project:
temp, tmp, old, backup, bak, archivemisc, stuff, other, randomhelpers (use utils/ if needed, but only in approved locations)lib (use core/ for shared code)new, v2, refactored (version in git, not in directory names)Test files MUST mirror the source structure exactly:
backend/app/services/project_service.pybackend/tests/test_services/test_project_service.pytest_{source_filename}.pyTest files are NEVER placed next to source files. They always live under /tests/.
The frontend/src/utils/ directory is limited to 5 files maximum. If the cap is reached:
This prevents utils from becoming a dumping ground.
The project may never contain two directories serving the same purpose. Examples of forbidden duplicates:
utils/ and helpers/types/ and interfaces/services/ and api/ (for client-side API calls)models/ and entities/If a naming conflict arises, document the resolution and rationale in .claude/rules/feedback.md for governance review.
No empty directories may exist in the project. If a directory is created, it must contain at least one file. If all files are removed from a directory, the directory must also be removed and its entry evaluated in this directive.
When the approved tree is modified to add new directories for data models or schemas, document the change and its purpose in .claude/rules/feedback.md. If you create a data-models.md rule file (recommended when you have multiple models), update it to reflect the new model locations.
When a new top-level directory is added (e.g., a new service, a new frontend app), document the rationale in .claude/rules/feedback.md, including:
This creates a decision record for future reference.
Optional: If you want automated linting of directory structure, create a .folderslintrc file matching your approved directories from INS-DA1-001.
Example for Option 2 (Web Application):
{
"root": ".",
"rules": [
"backend/app/models/*",
"backend/app/routes/*",
"backend/app/services/*",
"backend/app/core/*",
"backend/tests/**",
"frontend/src/components/*",
"frontend/src/pages/*",
"frontend/src/services/*",
"frontend/src/utils/*",
"scripts/*",
"docs/*"
]
}
Replace these rules with your project's actual approved directories.
Customize this checklist based on your project's approved structure:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hawkanng/claude-warden --plugin claude-warden7 skills in this plugin
/warden-feedbackGovernance feedback tracking — gaps, friction, and improvement suggestions/warden-policyWarden governance constitution — defines policy areas, directive rules, and enforcement hierarchy/warden-second-opinionTwo-tier diagnostic protocol — spawns fresh subagents to analyze problems when stuck. Invoke manually or triggered by rabbit hole detection./warden-securitySecurity and privacy by design — GDPR principles, secure coding defaults, and data handling rules/warden-setupInitialize Claude Warden in a project — creates governance files, seeds deny entries, and migrates from curl-install/warden-workflowDevelopment workflow protocol — PROPOSE, PLAN, BUILD, VERIFY, CLOSE phases with UAT checkpointsOther plugins' skills for the same job