A modern project structure optimized for efficient AI-assisted development using Claude Code and OpenAI Codex.
This repository provides a standardized structure for AI-enhanced software development workflows. Rather than directly inputting commands, documentation, and feature requests into the CLI of Claude Code or OpenAI Codex, this structure offers a more organized, version-controlled, and collaborative approach to working with AI coding assistants.
ai_assisted_development_structure/
├── .claude/
│ ├── agents/ # Custom subagent definitions for Claude Code
│ │ ├── api-documenter.md
│ │ └── prd-drafter.md
│ └── commands/ # Custom Claude Code command definitions
│ ├── COMMANDS.md # Documentation for commands system
│ └── prime.md # Context initialization command
├── ai_docs/ # AI-specific documentation
│ ├── AI_DOCS.md # Documentation for AI docs system
│ ├── claude_thinking.md
│ └── openai_reasoning_models.md
├── specs/ # Feature specifications
│ ├── SPECS.md # Documentation for specs system
│ └── openai_reasoning.md
└── README.md
Custom reusable commands that streamline interactions with Claude Code:
- Project Context Initialization: The
prime.mdcommand quickly primes Claude with project structure and important documentation - Standardized Workflows: Create commands for code generation, testing, analysis, and more
- Invocation Syntax: Use
/project:command_nameto execute commands
Specialized AI assistants that operate in separate context windows for task-specific workflows:
- Context Preservation: Each subagent maintains its own context window, preventing quality degradation in complex multi-stage tasks
- Specialized Expertise: Custom system prompts tailored for specific domains (code review, API documentation, PRD drafting, etc.)
- Automatic Delegation: Claude intelligently routes tasks to appropriate subagents based on context and requirements
- Tool Management: Configure specific tool access for each subagent's needs
- File Format: Markdown files with YAML frontmatter containing metadata (name, description, tools, model)
- Invocation Methods: Both automatic delegation and explicit invocation by mentioning the subagent
- Locations: Can be defined at project level (
.claude/agents/) or user level (~/.claude/agents/)
Specialized documentation that enhances AI models' understanding of your project:
- Domain-Specific Knowledge: Terminology, architecture, and design patterns
- Implementation Details: System relationships and code examples
- Enhanced Generation: Helps Claude generate code aligned with your project's patterns
- Invocation Syntax: Use
@[path/to/document]to reference docs in conversations
Structured specifications for planned features:
- Implementation Blueprint: Detailed specs for types, methods, tests, and validation
- Consistent Design: Standardized format ensures all necessary details are included
- AI-Ready Format: Optimized for consumption by Claude Code
- Invocation Syntax: Use
@[path/to/spec.md]to reference in conversations
- Persistent Context: Documentation remains consistent across sessions
- Focused Inputs: Provide only relevant context for each task
- Knowledge Reuse: Share documentation across team members
- Versioned Context: Track changes to AI-specific documentation over time
- Reduced Repetition: Eliminate redundant explanations and setup commands
- Standardized Patterns: Ensure consistent AI-assisted development across projects
- Collaborative Development: Multiple developers can contribute to and review AI-specific artifacts
- Version Control: Track changes to AI commands, documentation, and specs
- Better Understanding: AI models receive clear, structured information
- Consistent Conventions: Generated code follows established project patterns
- Reduced Hallucinations: Explicit documentation reduces AI "guessing"
- Faster Results: Well-documented context leads to faster, more accurate generations
- Organized Knowledge Base: Scale AI interactions as project grows
- Onboarding Efficiency: New developers can quickly understand project context
- Evolving Documentation: Update AI docs alongside code changes
- Modular Structure: Add new commands, docs, and specs as needed
The prime.md command fills Claude's context window with essential project information:
- Run
/project:primein Claude Code - Claude will:
- Display the project structure
- Read key documentation files
- Build a comprehensive understanding of the project
This allows Claude to provide more accurate assistance with your project.
Subagents use a simple markdown format with YAML frontmatter:
---
name: your-agent-name
description: When and how this agent should be used
tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted
model: sonnet # Optional - sonnet, opus, or haiku
color: blue # Optional - agent color in UI
---
Your agent's system prompt goes here. Define the role, capabilities,
and approach to solving problems. Include specific instructions,
best practices, and any constraints the agent should follow.Example Subagent Types:
- Code reviewers for specific languages or frameworks
- API documentation specialists
- Test writers and debugging experts
- Performance optimization specialists
- Security auditors
- Keep Documentation Current: Update AI docs as your codebase evolves
- Be Explicit: Provide clear patterns and examples in documentation
- Standardize Commands: Create consistent commands for common tasks
- Use Version Control: Commit changes to AI artifacts alongside code changes
- Include Examples: Add representative code snippets to aid AI understanding
- Create Focused Subagents: Design single-purpose subagents with detailed system prompts and appropriate tool restrictions
- Clone this repository or use it as a template
- Customize the structure for your project's needs
- Add your project-specific documentation to each section
- Create custom subagents for your common workflows
- Commit changes to version control
- Use the prime command in Claude Code to initialize context