Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

File-Level Source Sync Example

This example demonstrates the file-level source sync feature in AllAgents.

Directory Structure

workspaces/
├── file-source-sync/           # The workspace
│   ├── .allagents/
│   │   └── workspace.yaml
│   ├── shared-config/          # Default source (workspace.source)
│   │   ├── AGENTS.md
│   │   └── config/
│   │       └── settings.json
│   └── README.md
└── team-config/                # Sibling directory for file-level override
    └── rules.md

How It Works

The workspace.yaml demonstrates three source patterns:

  1. String shorthand - AGENTS.md resolves to shared-config/AGENTS.md
  2. Relative source - source: config/settings.json resolves to shared-config/config/settings.json
  3. File-level override - source: ../team-config/rules.md uses a different directory

Running the Example

cd examples/workspaces/file-source-sync
allagents workspace sync --dry-run

After sync, the workspace root will contain:

  • AGENTS.md (from shared-config, with WORKSPACE-RULES injected)
  • CLAUDE.md (auto-copied from AGENTS.md for claude client)
  • settings.json (from shared-config/config/)
  • TEAM-RULES.md (from team-config/rules.md)

Key Behaviors

  • Source is truth: Local files are overwritten on every sync
  • Deleted files restored: Delete AGENTS.md locally, sync restores it
  • WORKSPACE-RULES injection: AGENTS.md and CLAUDE.md get workspace discovery rules