Skip to content

refactor: replace agent identity directives with context directives#828

Merged
chubes4 merged 1 commit intomainfrom
refactor/directive-context-model
Mar 17, 2026
Merged

refactor: replace agent identity directives with context directives#828
chubes4 merged 1 commit intomainfrom
refactor/directive-context-model

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 17, 2026

Summary

The directive system had 3 "agent identity" directives that each created a competing AI persona on top of the memory files (SOUL.md, MEMORY.md) that already define who the agent is.

Old model — directives define identity:

  • ChatAgentDirective (priority 15): "You are a decisive configuration specialist"
  • PipelineCoreDirective (priority 10): "You are an AI content processing agent"
  • SystemAgentDirective (priority 20): "You are a system infrastructure specialist"

These fired before memory files (priority 20), overriding the agent's real identity before it even loaded.

New model — memory files define identity, directives provide context:

  • ChatContextDirective (priority 25): "This is a live chat session..."
  • PipelineContextDirective (priority 25): "This is an automated pipeline step..."
  • SystemContextDirective (priority 25): "This is a background system task..."

All at priority 25, after memory files at 20. They tell the agent what it's doing, not who it is.

Bug fix: 3 directives silently not loading

Discovered that SiteContextDirective, DailyMemorySelectorDirective, and SystemAgentDirective had add_filter side effects but no require_once in bootstrap.php — so their filters never registered. Added the missing requires.

System task prompt rewrites

All 4 AI-using system tasks rewritten to drop "you are a system agent" framing and reference the agent's own memory instead.

BEFORE:                                          AFTER:
P10  PipelineCoreDirective (identity)            P20  CoreMemoryFilesDirective (identity)
P15  ChatAgentDirective (identity)               P25  ChatContextDirective (context)
P20  CoreMemoryFilesDirective (identity)         P25  PipelineContextDirective (context)
P20  SystemAgentDirective (DEAD - never loaded)  P25  SystemContextDirective (context)
P80  SiteContextDirective (DEAD - never loaded)  P80  SiteContextDirective (now loads)

The old model had each context (chat, pipeline, system) defining its own
AI persona ('you are a decisive configuration specialist', 'you are an AI
content processing agent', 'you are a system infrastructure specialist').
This competed with the agent's actual identity in SOUL.md/MEMORY.md which
is already injected via CoreMemoryFilesDirective.

New model: memory files define identity, directives provide context.

Renames:
- ChatAgentDirective → ChatContextDirective
- PipelineCoreDirective → PipelineContextDirective
- SystemAgentDirective → SystemContextDirective

Priority change: 10/15/20 → all 25 (after memory files at 20)

Content: prompts now say 'this is a chat session / pipeline step / system
task' and reference the memory files above, instead of declaring a new
persona.

Also fixes 3 directives that were silently not loading because their files
had add_filter side effects but no require_once in bootstrap.php:
- SiteContextDirective (WordPress metadata for all contexts)
- DailyMemorySelectorDirective (daily memory for pipelines)
- SystemContextDirective (system task context)

Includes system task prompt rewrites: DailyMemoryTask, AltTextTask,
MetaDescriptionTask, InternalLinkingTask — removes 'you are a system
agent' framing, references agent's own memory instead.
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

Homeboy Results — data-machine

Lint

⚡ Scope: changed files only

lint (changed files only)

Test

⚡ Scope: changed files only

test (changed files only)

Audit

⚡ Scope: changed files only

audit (changed files only)

Tooling versions
  • Homeboy CLI: homeboy 0.78.0+a74ba80e
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

Homeboy Action v1

@chubes4 chubes4 merged commit 31ba652 into main Mar 17, 2026
3 checks passed
@chubes4 chubes4 deleted the refactor/directive-context-model branch March 17, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant