Validates that a directory conforms to the gptme agent workspace structure.
This tool defines what makes a valid gptme agent workspace. It's used by:
agent templateCI to validate the template itself- Agent forks to validate their workspace structure
- Developers to check workspace compliance
# Validate current directory
python3 scripts/workspace-validator/validate.py
# Validate specific workspace
python3 scripts/workspace-validator/validate.py --workspace /path/to/workspace
# Run only specific checks
python3 scripts/workspace-validator/validate.py --check files,dirs
# Quiet mode (errors and warnings only)
python3 scripts/workspace-validator/validate.py --quietfrom scripts.workspace_validator import validate_workspace
from pathlib import Path
result = validate_workspace(Path("/path/to/workspace"))
if result.passed:
print("Workspace is valid!")
else:
for error in result.errors:
print(f"Error: {error}")gptme.toml- Agent configurationABOUT.md- Agent identity and backgroundREADME.md- Project documentation
ARCHITECTURE.md- Technical architectureTASKS.md- Task management documentationGLOSSARY.md- Terms and abbreviations
journal/- Daily logs and session recordsknowledge/- Long-term documentationlessons/- Behavioral patterns and learningstasks/- Task files
people/- Collaborator profilestools/- Tool documentationscripts/- Automation scripts
- Parses
gptme.toml - Validates
[agent]section with name - Checks
[prompt].filesreferences exist
- Checks
fork.shexists and is executable (if present)
0: Validation passed (may have warnings)1: Validation failed (has errors)
- name: Validate workspace structure
run: |
python3 gptme-contrib/scripts/workspace-validator/validate.pyIf your workspace uses gptme-contrib as a submodule:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Validate workspace
run: python3 gptme-contrib/scripts/workspace-validator/validate.py