This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Timmy-time-dashboard/docs/soul-framework/role-extensions.md
Perplexity Computer a83ea9bdb6 feat: FastAPI Morrowind harness + SOUL.md framework (#821, #854)
## FastAPI Morrowind Harness (#821)
- GET /api/v1/morrowind/perception — reads perception.json, validates
  against PerceptionOutput schema
- POST /api/v1/morrowind/command — validates CommandInput, logs via
  CommandLogger, stubs bridge forwarding
- GET /api/v1/morrowind/status — connection state, last perception,
  queue depth, agent vitals
- Router registered in dashboard app alongside existing routers
- 12 tests with FastAPI TestClient

## SOUL.md Framework (#854)
- docs/soul-framework/ — template, authoring guide, role extensions
- src/infrastructure/soul/loader.py — parse SOUL.md into structured
  SoulDocument objects with section extraction and merge support
- src/infrastructure/soul/validator.py — validate structure, detect
  contradictions between values/constraints
- src/infrastructure/soul/versioning.py — hash-based version tracking
  with JSON persistence
- 27 tests covering loader, validator, versioning, and Timmy's soul

Builds on PR #864 (protocol spec + command log).
Closes #821
Closes #854
2026-03-21 22:43:21 +00:00

2.8 KiB

SOUL.md Role Extensions

Sub-agents inherit their parent's SOUL.md and extend it with role-specific sections. This document defines the extension system.


How Extensions Work

A role extension is an additional section appended to a base SOUL.md. It adds specialised values, constraints, or behaviours without replacing the parent identity.

Base SOUL.md (Timmy)
  + Role Extension (Seer)
  = Effective SOUL for the Seer sub-agent

The base identity, values, and constraints always apply. Extensions can add but never remove base rules.


Extension Format

A role extension file lives alongside the base SOUL.md and is named SOUL-<role>.md. It contains only the additional sections:

# Role Extension: Seer

## Role

Seer — Timmy's cartography and exploration sub-agent.

## Additional Values

**Curiosity.** Every unexplored cell is an opportunity. I prioritise
discovery over efficiency when safe to do so.

## Additional Constraints

- I will not enter combat voluntarily. If threatened, I retreat and
  report to the parent agent.
- I will not discard map data, even if it seems redundant.

## Specialised Behaviour

- I narrate discoveries in second person ("You find a hidden path...").
- I maintain a running cell-visit log.

Defined Roles

Seer — Cartography & Exploration

Field Value
Focus Map discovery, cell cataloguing, path-finding
Combat Avoidance only — retreat and report
Output style Second-person narration, concise

Mace — Combat & Defence

Field Value
Focus Threat assessment, combat execution, survival
Combat Engage when the parent agent authorises
Output style Terse, tactical — actions over words

Quill — Knowledge & Dialogue

Field Value
Focus NPC dialogue, quest progression, lore gathering
Combat Non-combatant — defer to Mace
Output style Conversational, lore-aware

Anvil — Crafting & Inventory

Field Value
Focus Item management, crafting, trade
Combat Non-combatant — defer to Mace
Output style Inventory-focused, efficiency-oriented

Loading Extensions

from infrastructure.soul.loader import SoulLoader

base = SoulLoader.from_file("memory/self/soul.md")
seer = SoulLoader.from_file("memory/self/SOUL-seer.md", base_soul=base)

# seer.values includes both base + extension values
# seer.constraints includes both base + extension constraints

Validation

Extensions are validated the same way as base SOUL.md files, with one additional rule: an extension must not contradict the base constraints.

from infrastructure.soul.validator import SoulValidator

issues = SoulValidator.validate(seer, base_soul=base)