Project Structure Overview
Relevant source files
The following files were used as context for generating this wiki page:
- cli-tool/templates/javascript-typescript/CLAUDE.md
- cli-tool/components/agents/expert-advisors/modernization.md
- cli-tool/components/agents/documentation/arch.md
- cli-tool/components/skills/document-processing/documentation-templates/SKILL.md
- cli-tool/components/skills/development/agent-md-refactor/SKILL.md
- cli-tool/templates/common/CLAUDE.md
- cli-tool/components/agents/data-ai/hlbpa.md
This overview describes the architectural organization and directory conventions used across the Claude Code Templates project. The project follows a component-based architecture designed for AI-driven development, specifically tailored for the Claude Code CLI tool. It prioritizes progressive disclosure and clean separation between agents, skills, commands, and templates.
The project is structured to support specialized AI agents (such as the Senior Cloud Architect Agent or Modernization Agent) and modular skills that extend the capabilities of the primary CLI environment.
Sources: cli-tool/templates/javascript-typescript/CLAUDE.md, cli-tool/components/agents/documentation/arch.md, cli-tool/components/agents/expert-advisors/modernization.md
1. Core Component Categories
The project organizes its functionality into four primary categories: Agents, Skills, Commands, and Templates. Each category serves a distinct role in the development lifecycle, from high-level architectural planning to low-level code refactoring.
| Category | Description | Primary Location |
|---|---|---|
| Agents | Specialized personas with defined roles and guidelines (e.g., Technical Writer, Cloud Architect). | cli-tool/components/agents/ |
| Skills | Modular capabilities for specific tasks like refactoring or requirements clarification. | cli-tool/components/skills/ |
| Commands | Orchestrated workflows and utility tasks executed by the CLI. | cli-tool/components/commands/ |
| Templates | Boilerplate configurations and standards for different tech stacks. | cli-tool/templates/ |
Sources: cli-tool/components/agents/documentation/se-technical-writer.md, cli-tool/components/skills/development/agent-md-refactor/SKILL.md, cli-tool/components/commands/orchestration/feature-dev.md
1.1 Agent Architecture
Agents are defined by specialized Markdown files that specify their role, responsibilities, and constraints. They often follow a "no-code" or "strategy-first" approach to ensure architectural integrity before implementation begins.
The diagram shows the hierarchy of specialized agents within the project and their primary outputs.
Sources: cli-tool/components/agents/documentation/arch.md:1-15, cli-tool/components/agents/expert-advisors/modernization.md:10-30
2. Directory Hierarchy and Conventions
The project implements a standard directory layout to ensure consistency across different components and templates.
2.1 Standardized Source Structure
For JavaScript and TypeScript projects, the project follows a layered organizational pattern to separate concerns such as UI, logic, and external services.
| Path | Purpose |
|---|---|
src/components/ | Reusable UI components. |
src/hooks/ | Custom logic and state management hooks. |
src/services/ | API calls and external system integrations. |
src/utils/ | Shared utility functions and helpers. |
src/types/ | Global TypeScript definitions. |
Sources: cli-tool/templates/javascript-typescript/CLAUDE.md:82-93
2.2 Documentation and Metadata
The project uses specialized files for AI context management:
- CLAUDE.md: Located at the root, providing universal guidelines, naming conventions, and common development patterns for AI agents.
- .claude/: A hidden directory used to store detailed, refactored instructions following progressive disclosure principles.
- docs/features/: Stores per-feature analysis files generated during modernization or discovery phases.
Sources: cli-tool/templates/common/CLAUDE.md, cli-tool/components/skills/development/agent-md-refactor/SKILL.md:95-103, cli-tool/components/agents/expert-advisors/modernization.md:46-52
3. Component Interaction Flow
The interaction between different system components typically follows a structured sequence, particularly during modernization or feature development.
This sequence illustrates how a specialized agent interacts with the codebase and the user to transform a legacy structure into a modernized implementation.
Sources: cli-tool/components/agents/expert-advisors/modernization.md:65-120
4. Progressive Disclosure Pattern
To prevent context window saturation, the project encourages a "Progressive Disclosure" pattern for agent instructions. This involves keeping a minimal root file while delegating specific details to sub-directories.
The diagram shows how the project structure organizes instructions to maintain a small context footprint in the root file.
Sources: cli-tool/components/skills/development/agent-md-refactor/SKILL.md:90-115
5. Modernization Target Structure
When a project is modernized, a specific folder named /modernizedone/ is created at the repository root. This folder adheres to a clean architecture structure:
- cross-cuttings/: Shared libraries, utilities, and common contracts.
- src/: The main application code, often divided into Domain, Application, and Infrastructure layers.
- tests/: Dedicated test projects.
- docs/: Modernization-specific documentation.
Sources: cli-tool/components/agents/expert-advisors/modernization.md:144-155
Conclusion
The project structure is characterized by a strict separation between operational CLI components (agents, skills, commands) and the templates they manage. By utilizing standardized naming conventions and the progressive disclosure principle for documentation, the architecture ensures that both human developers and AI agents can navigate the codebase with high precision and minimal overhead.
Sources: cli-tool/templates/common/CLAUDE.md, cli-tool/components/skills/development/agent-md-refactor/SKILL.md