Framework 2.0

Protocol Files Reference

Protocol files form the foundation of the Trinity Framework 2.0. These standardized files provide essential structure, identity, and recovery mechanisms for agent workspaces. This reference explains each protocol file's purpose, structure, and implementation requirements.

Note: All three protocol files must be present in the root directory of each agent workspace for Framework 2.0 compliance.

Core Protocol Files Overview

Trinity Framework 2.0 requires three essential protocol files:

AGENT.md

Purpose: Defines agent identity, role, and recovery procedures

Required for: Identity management, operational directives, recovery

Identity Recovery Directives

STATUS.md

Purpose: Tracks current operational status and priorities

Required for: Progress tracking, operational awareness, prioritization

Status Priorities Progress

AUTO-COMPACT.md

Purpose: Manages context limitations and recovery

Required for: Context tracking, checkpointing, recovery procedures

Context Checkpoints Recovery

AGENT.md Protocol File

The AGENT.md file defines an agent's identity, role, responsibilities, and recovery procedures. It's the primary reference point for an agent to understand its purpose and operational parameters.

Required Sections

Section Purpose Requirements
Identity & Mission Defines who the agent is and its primary mission Must include role name, version, workspace path, and primary mission statement
Core Principles Outlines the fundamental operational principles Must include context resilience, workspace standardization, and protocol-based recovery
Auto-Compact Recovery Protocol Defines how the agent should recover after context reset Must include immediate steps, recovery performance targets, and recovery redirect protocol
Key Paths and Locations Documents important file system locations Must include workspace path and other essential directories
Tools and Resources Lists available tools and their purposes Must include core framework tools and role-specific utilities

Example AGENT.md Structure

# AGENT_NAME - Trinity Framework 2.0

**Role**: [Role Description]
**Version**: 2.0
**Updated**: [Date]
**Workspace**: [Absolute Path]

## TRINITY FRAMEWORK 2.0 GUIDELINES

### Core Principles
1. **Context Resilience**: Maintain operational continuity across context resets
2. **Workspace Standardization**: Follow consistent file structure patterns
3. **Protocol-Based Recovery**: Use standardized auto-compact recovery procedures

## 🚨 AUTO-COMPACT RECOVERY PROTOCOL

### Immediate Recovery Steps
1. **Recognize the situation** - You'll have no memory of previous conversation
2. **Read this file immediately** - It's your primary recovery document
3. **Check status** - Read STATUS.md for current priorities

Role-Specific Considerations

Each agent role implements AGENT.md with specific focus areas:

STATUS.md Protocol File

The STATUS.md file tracks the current operational status, priorities, and recent accomplishments. It provides situational awareness and helps maintain focus across context resets.

Required Sections

Section Purpose Requirements
Framework Status Current framework implementation status Must include framework version, compliance status, and maintenance cycle
Project Status Status of current projects and initiatives Must include active projects with completion percentages
Next Priorities Upcoming tasks in priority order Must include 3-5 specific, actionable priorities
Recent Accomplishments Recently completed tasks and milestones Must include timestamp and detailed accomplishment list
Context Health Current context utilization metrics Must include utilization percentage, available checkpoints, and remaining capacity

Example STATUS.md Structure

# AGENT_NAME Status

**Last Updated**: [Date]
**Agent**: [Agent Name]
**Framework**: Trinity 2.0
**Workspace**: [Absolute Path]

## FRAMEWORK 2.0 STATUS

### Maintenance Status: ACTIVE
- **Current PHASE**: [Phase]
- **Compliance**: [Percentage] protocol file and workspace structure compliance
- **Maintenance Cycle**: UNIT-based operational cycle active

## Project Status
- [Project 1]: [Status] ([Completion Percentage])
- [Project 2]: [Status] ([Completion Percentage])

Role-Specific Considerations

Each agent role implements STATUS.md with specific focus areas:

AUTO-COMPACT.md Protocol File

The AUTO-COMPACT.md file manages context limitations and provides recovery mechanisms. It tracks context utilization, creates checkpoints, and enables smooth recovery after context resets.

Required Sections

Section Purpose Requirements
Context Management Metrics Current context utilization and checkpoints Must include utilization percentage, token count, checkpoint status, and remaining capacity
Checkpoint Data Serialized checkpoint information Must include JSON-formatted checkpoint data with timestamps and thresholds
Checkpoint Restoration Instructions Steps for recovering from checkpoints Must include clear, sequential steps for restoration after context reset
Current Implementation Context Summary of current implementation state Must include 5-10 key points about current implementation status
Post-Compact Recovery Plan Specific steps for after compact Must include 3-6 specific recovery steps in priority order

Example AUTO-COMPACT.md Structure

## ⚠️ MANDATORY CONTEXT TRACKING - ALL AGENTS - FRAMEWORK 2.0 REQUIREMENT ⚠️

Execute after EVERY response:
```bash
cd /path/to/context/tools
./run-context-check.sh check OPERATION_TYPE
```

## Context Management Metrics
- **Last Updated**: [Timestamp]
- **Context Utilization**: [Percentage]
- **Token Count**: [Current]/[Maximum]
- **Checkpoint Status**: [Status]

Role-Specific Considerations

Each agent role implements AUTO-COMPACT.md with specific focus areas:

Implementation Requirements

File Location

All protocol files must be placed in the root directory of each agent workspace:

/path/to/agent/workspace/
├── AGENT.md
├── STATUS.md
└── AUTO-COMPACT.md

Content Formatting

Protocol files must follow these formatting requirements:

Verification

Use the verification script to ensure protocol file compliance:

$ ./tools/verify-protocol-files.sh /path/to/agent/workspace

Best Practices

Important: Never delete or significantly modify protocol files without creating proper backups. These files are essential for operational continuity.

← Back to Documentation Home