Repository navigation
07 reference file structure
Complete directory and file organization reference for the Coherence - Agentic Persona Mapping (APM) framework.
- Overview
- Root Directory Structure
- APM Directory (.apm)
- Claude Code Integration (.claude)
- Installation Structure
- File Naming Conventions
- Permission Requirements
Coherence APM v4.2.0 follows a unified directory structure optimized for:
- Native Sub-Agent Integration with Claude Code's slash command system
- Coherence Orchestration with centralized intelligence coordination
- Enhanced TTS Audio Experience with unified voice notification system
- Modular Architecture with clear separation between .apm/ and .claude/ concerns
- Coherence Framework: Centralized orchestration with intelligent agent coordination
- Unified Context Engineering: Enhanced information flow between specialized personas
- 67 Slash Commands: Complete command interface for all development workflows
- Cross-Platform TTS: Unified voice notification system across all platforms
{{PROJECT_ROOT}}/
βββ .apm/ # Coherence APM Framework Installation
βββ .claude/ # Claude Code Integration & Commands
βββ project_docs/ # Project Documentation & Reports
βββ payload/ # Installation Templates & Resources
βββ dist/ # Distribution Builds
βββ scripts/ # Utility Scripts
βββ CLAUDE.md # Claude Code Instructions
βββ README.md # Project Overview
βββ VERSION # Current Version (v4.2.0)
βββ build-distribution.sh # Distribution Builder
| File | Description | Version | Purpose |
|---|---|---|---|
CLAUDE.md |
Coherence framework activation instructions | v4.2.0 | Framework integration |
README.md |
Project overview and capabilities | v4.2.0 | User documentation |
VERSION |
Current framework version | 4.2.0 | Version tracking |
build-distribution.sh |
Distribution packaging script | v4.2.0 | Release management |
Directory Purpose:
-
.apm/- Core framework with agents, voice scripts, and orchestration -
.claude/- Commands, hooks, and Claude Code integration -
project_docs/- Documentation, reports, and planning artifacts
The .apm directory contains the complete Coherence APM framework installation:
{{APM_ROOT}}/
βββ agents/
β βββ personas/ # Individual Persona Directories
β β βββ analyst/ # Business Analyst persona
β β βββ architect/ # System Architect persona
β β βββ dev/ # Developer persona
β β βββ pm/ # Project Manager persona
β β βββ po/ # Product Owner persona
β β βββ qa/ # QA Engineer persona
β β βββ sm/ # Scrum Master persona
β βββ voice/ # Voice Notification Scripts
β β βββ speakOrchestrator.sh
β β βββ speakAnalyst.sh
β β βββ speakArchitect.sh
β β βββ speakDeveloper.sh
β β βββ speakPm.sh
β β βββ speakPo.sh
β β βββ speakQa.sh
β β βββ speakSm.sh
β β βββ speakDesignArchitect.sh
β β βββ speakBase.sh
β βββ checklists/ # Quality & Process Checklists
β βββ orchestrator/ # Coherence Orchestration Logic
β βββ monitoring/ # System Monitoring & Metrics
β βββ data/ # Agent Knowledge Base
βββ scripts/ # APM Utility Scripts
β βββ ap-manager.sh
β βββ tts-manager.sh
β βββ notification-manager.sh
β βββ configure-tts.sh
βββ .installer/ # Installation Framework
βββ .payload/ # Template Payload System
Contains persona definition files generated from master JSON definitions.
| File | Persona | Generated From |
|---|---|---|
analyst.persona.md |
Business Analyst | installer/personas/_master/analyst.persona.json |
architect.persona.md |
System Architect | installer/personas/_master/architect.persona.json |
developer.persona.md |
Developer | installer/personas/_master/developer.persona.json |
pm.persona.md |
Project Manager | installer/personas/_master/pm.persona.json |
po.persona.md |
Product Owner | installer/personas/_master/po.persona.json |
qa.persona.md |
QA Engineer | installer/personas/_master/qa.persona.json |
sm.persona.md |
Scrum Master | installer/personas/_master/sm.persona.json |
design-architect.persona.md |
Design Architect | installer/personas/_master/design-architect.persona.json |
Voice notification scripts for audio feedback.
| Script | Persona | Platform |
|---|---|---|
speakOrchestrator.sh |
Coherence Orchestrator | Linux/macOS/WSL |
speakAnalyst.sh |
Business Analyst | Linux/macOS/WSL |
speakArchitect.sh |
System Architect | Linux/macOS/WSL |
speakDeveloper.sh |
Developer | Linux/macOS/WSL |
speakPm.sh |
Project Manager | Linux/macOS/WSL |
speakPo.sh |
Product Owner | Linux/macOS/WSL |
speakQa.sh |
QA Engineer | Linux/macOS/WSL |
speakSm.sh |
Scrum Master | Linux/macOS/WSL |
speakDesignArchitect.sh |
Design Architect | Linux/macOS/WSL |
Session management with automatic archiving.
session_notes/
βββ archive/
β βββ 2025-01-10-completed-sessions/
β βββ 2025-01-14-archived-sessions/
βββ 2025-01-15-14-30-00-Orchestrator-Setup.md # Active session
βββ 2025-01-15-15-45-12-Development-Sprint.md # Active session
βββ 2025-01-15-16-20-33-QA-Framework-Testing.md # Active session
Session Note Naming Convention:
YYYY-MM-DD-HH-mm-ss-{Description}.md
Behavioral and operational rules for APM agents.
| File | Purpose | Scope |
|---|---|---|
orchestrator-rules.md |
Coherence Orchestrator behavior | Coordination, delegation |
session-management-rules.md |
Session handling | Note-taking, transitions |
backlog-management-rules.md |
Backlog updates | Story tracking, acceptance criteria |
parallel-execution-rules.md |
Parallel processing | Sub-agent coordination |
qa-framework-rules.md |
QA operations | Testing, quality metrics |
Configuration files and schemas.
| File | Content | Format |
|---|---|---|
apm-config.json |
APM system configuration | JSON |
persona-config.json |
Persona-specific settings | JSON |
hooks-config.json |
Hook system configuration | JSON |
voice-config.json |
Voice notification settings | JSON |
The project_docs directory contains comprehensive project documentation:
{{PROJECT_DOCS_PATH}}/
βββ README.md # Project Documentation Overview
βββ backlog.md # Product Backlog (CRITICAL)
βββ architecture.md # System Architecture
βββ api-documentation.md # API Reference
βββ deployment-guide.md # Deployment Instructions
βββ troubleshooting.md # Common Issues & Solutions
βββ reports/ # Generated Reports
β βββ persona-usage-report.md
β βββ qa-metrics-report.md
β βββ sprint-velocity-report.md
βββ archive/ # Historical Documentation
βββ v3.5.0-documentation/
βββ legacy-architecture/
π¨ CRITICAL: The most important file in the project. All personas must update this file.
# Product Backlog
## Current Sprint (Sprint 5)
### In Progress
- **[Story-001]** User Authentication System [8 points] - Developer: John
- [x] Login form implementation
- [x] Password validation
- [ ] Session management
- [ ] Password reset functionality
### Ready for Sprint
- **[Story-002]** Product Catalog [13 points]
- **[Story-003]** Shopping Cart [5 points]
## Epics
### Epic 1: User Management (60% Complete)
- Authentication System (In Progress)
- User Profile Management (Ready)
- Access Control (Backlog)The .claude directory integrates Coherence APM with Claude Code's slash command system:
{{CLAUDE_ROOT}}/
βββ commands/ # 67 Slash Commands
β βββ coherence.md # Coherence Orchestrator (primary)
β βββ ap.md # Coherence Orchestrator (legacy alias)
β βββ analyst.md # Business Analyst
β βββ architect.md # System Architect
β βββ developer.md # Developer
β βββ pm.md # Project Manager
β βββ po.md # Product Owner
β βββ qa.md # QA Engineer
β βββ sm.md # Scrum Master
β βββ design-architect.md # Design Architect
β βββ planning-*.md # Planning workflow commands
β βββ qa-*.md # QA framework commands
β βββ parallel-*.md # Parallel execution commands
β βββ implementation-*.md # Implementation commands
β βββ documentation-*.md # Documentation commands
β βββ [... 50+ additional commands]
βββ hooks/ # Claude Code Integration Hooks
β βββ pre_tool_use.py # Pre-execution processing
β βββ post_tool_use.py # Post-execution processing
β βββ user_prompt_submit.py # Prompt enhancement
β βββ notification.py # Voice notification system
β βββ pre_compact.py # Session compaction
β βββ hook_utils.py # Utility functions
βββ output-styles/ # Custom Output Formatting
β βββ apm-orchestrator.md # Orchestrator output style
β βββ README.md # Output style documentation
βββ agents/ # Claude Agent Configuration
βββ personas/ # Persona-specific configs
βββ coordination/ # Multi-agent coordination
βββ qa-framework/ # QA framework integration
All Claude commands follow this structure:
# Command Title
Brief description of the command.
## Prerequisites
- Required conditions
- Dependencies
## Process Flow
1. Step 1: Description
2. Step 2: Description
3. Step 3: Description
## Success Criteria
- Expected outcomes
- Validation stepsThe installer system manages APM deployment and updates:
installer/
βββ personas/
β βββ _master/ # Master Persona Definitions
β βββ analyst.persona.json
β βββ analyst.persona.yaml
β βββ architect.persona.json
β βββ developer.persona.json
β βββ pm.persona.json
β βββ po.persona.json
β βββ qa.persona.json
β βββ sm.persona.json
β βββ design-architect.persona.json
βββ templates/ # Template System
β βββ APM-README.md.template
β βββ claude/
β β βββ commands/ # Claude Command Templates
β βββ agents/
β β βββ personas/ # Persona Templates
β β βββ voice/ # Voice Script Templates
β βββ hooks/ # Hook Templates
β βββ documentation/ # Documentation Templates
β β βββ 01-getting-started/
β β βββ 02-personas/
β β βββ 03-workflows/
β β βββ 04-commands/
β β βββ 05-configuration/
β β βββ 06-troubleshooting/
β β βββ 07-advanced/
β β βββ 08-reference/
β βββ rules/ # Rule Templates
βββ scripts/ # Installation Scripts
β βββ install.sh
β βββ generate-personas.sh
β βββ build-distribution.sh
β βββ update-documentation.sh
βββ VERSION # Installer Version
βββ README.md # Installer Guide
APM v4.0.0 introduces the unified persona system with single source of truth:
{
"name": "developer",
"display_name": "Developer Agent",
"description": "Full-stack development specialist",
"voice_script": "speakDeveloper.sh",
"capabilities": [
"code_implementation",
"unit_testing",
"code_review",
"technical_documentation"
],
"commands": [
{
"name": "implement",
"description": "Implement feature or fix",
"parameters": {"story_id": "string", "acceptance_criteria": "array"}
}
]
}-
Master Definition:
/installer/personas/_master/developer.persona.json -
APM Template: Generated to
/installer/templates/agents/personas/developer.persona.md.template -
Claude Template: Generated to
/installer/templates/claude/commands/developer.md.template -
Installation: Deployed to
{{APM_ROOT}}/agents/personas/developer.persona.md
-
Format:
YYYY-MM-DD-HH-mm-ss-{Description}.md -
Examples:
2025-01-15-14-30-00-Orchestrator-Setup.md2025-01-15-16-45-22-Sprint-Planning-Session.md
-
Format:
{persona-name}.persona.{extension} -
Examples:
-
developer.persona.json(Master definition) -
developer.persona.md(Generated persona file)
-
-
Format:
speak{PersonaName}.sh -
Examples:
speakDeveloper.shspeakOrchestrator.shspeakDesignArchitect.sh
-
Format:
{command-name}.md -
Examples:
-
ap.md(Coherence Orchestrator) -
parallel-sprint.md(Parallel development) -
qa-framework.md(QA Framework)
-
-
Format:
{base-name}.{extension}.template -
Examples:
README.md.templatedeveloper.persona.md.templateapm-config.json.template
-
Format:
{rule-category}-rules.md -
Examples:
orchestrator-rules.mdsession-management-rules.mdbacklog-management-rules.md
{{APM_ROOT}}/ # 755 (rwxr-xr-x)
βββ agents/ # 755 (rwxr-xr-x)
β βββ personas/ # 755 (rwxr-xr-x)
β β βββ *.persona.md # 644 (rw-r--r--)
β βββ voice/ # 755 (rwxr-xr-x)
β βββ *.sh # 755 (rwxr-xr-x)
βββ session_notes/ # 755 (rwxr-xr-x)
β βββ *.md # 644 (rw-r--r--)
βββ rules/ # 755 (rwxr-xr-x)
β βββ *.md # 644 (rw-r--r--)
βββ config/ # 755 (rwxr-xr-x)
βββ *.json # 644 (rw-r--r--)All voice scripts require execution permissions:
chmod +x {{APM_ROOT}}/agents/voice/*.shMust be writable for session management:
chmod 755 {{APM_ROOT}}/session_notes/
chmod 755 {{APM_ROOT}}/session_notes/archive/- Read Access: All users need read access to persona and rule files
- Write Access: Only APM system needs write access to session notes
- Execute Access: Voice scripts need execute permissions
- Use absolute paths with template variables
- Validate all file paths before access
- Sanitize user-provided file names
-
Build Time: Templates processed during
build-distribution.sh - Install Time: Templates deployed to target locations
- Runtime: Template variables resolved dynamically
-
Active Session: Created in
{{APM_ROOT}}/session_notes/ -
Session End: Moved to
{{APM_ROOT}}/session_notes/archive/YYYY-MM-DD/ - Cleanup: Old archives removed after 90 days (configurable)
- Version Check: Compare current vs. installed versions
- Backup: Create backup of existing configuration
- Merge: Merge new configuration with user customizations
- Validate: Verify configuration integrity
| Category | Count | Size (approx) |
|---|---|---|
| Core Files | 12 | 2.1 MB |
| Persona Definitions | 9 | 180 KB |
| Voice Scripts | 9 | 45 KB |
| Rule Files | 8 | 120 KB |
| Template Files | 95+ | 3.8 MB |
| Documentation | 60+ | 1.2 MB |
| Total Installation | ~200 files | ~7.5 MB |
- Files Removed: 141 deprecated files
- Lines Removed: 25,599 lines of code
- Size Reduction: 40% smaller installation
- Template Consolidation: 3x duplication eliminated
File Structure Version: {{PROJECT_VERSION}}
Last Updated: {{CURRENT_DATE}}
Total Files Documented: 200+ files and directories