Parent
Epic: #43
Problem
During manuscript drafting, agents need to look up domain model terms, definitions, avoid lists, and relationships. Currently this requires reading the JSON file directly. A terraphim role provides /search REPL access to the domain model via Aho-Corasick indexed entries.
Proposed Role
File: publishing/config/publishing-editor-role.json
{
"Publishing Editor": {
"shortname": "publishing-editor",
"relevance_function": "terraphim-graph",
"kg": {
"knowledge_graph_local": {
"input_type": "markdown",
"path": "~/.config/terraphim/kg/publishing/"
}
},
"haystacks": [
{
"location": "${ACTIVE_TITLE_DIR}",
"service": "Ripgrep",
"extra_parameters": { "glob": "*.json" }
},
{
"location": "${ACTIVE_TITLE_DIR}/manuscript",
"service": "Ripgrep",
"extra_parameters": { "glob": "*.md" }
},
{
"location": "${ACTIVE_TITLE_DIR}/artefacts",
"service": "Ripgrep",
"extra_parameters": { "glob": "*.md" }
}
]
}
}
Usage
# Select the publishing editor role
terraphim-agent --role "Publishing Editor"
# Search for a term
terraphim-agent suggest --role "Publishing Editor" --json "decision trace"
# Validate text against the publishing KG
terraphim-agent validate --role "Publishing Editor" --connectivity "context graph decision trace provenance"
Integration with local-knowledge Skill
The local-knowledge skill already provides /search REPL access. This role extends it with:
- Publishing-specific KG path (
kg/publishing/ instead of global kg/)
- Manuscript and artefacts as haystacks (searchable via Ripgrep)
${ACTIVE_TITLE_DIR} substitution from .active-title marker file
Dependencies
- KG entries generated by
derive-kg-entries.py (existing)
- Per-title KG switching (#TBD switch-title issue)
Parent
Epic: #43
Problem
During manuscript drafting, agents need to look up domain model terms, definitions, avoid lists, and relationships. Currently this requires reading the JSON file directly. A terraphim role provides
/searchREPL access to the domain model via Aho-Corasick indexed entries.Proposed Role
File:
publishing/config/publishing-editor-role.json{ "Publishing Editor": { "shortname": "publishing-editor", "relevance_function": "terraphim-graph", "kg": { "knowledge_graph_local": { "input_type": "markdown", "path": "~/.config/terraphim/kg/publishing/" } }, "haystacks": [ { "location": "${ACTIVE_TITLE_DIR}", "service": "Ripgrep", "extra_parameters": { "glob": "*.json" } }, { "location": "${ACTIVE_TITLE_DIR}/manuscript", "service": "Ripgrep", "extra_parameters": { "glob": "*.md" } }, { "location": "${ACTIVE_TITLE_DIR}/artefacts", "service": "Ripgrep", "extra_parameters": { "glob": "*.md" } } ] } }Usage
Integration with local-knowledge Skill
The
local-knowledgeskill already provides/searchREPL access. This role extends it with:kg/publishing/instead of globalkg/)${ACTIVE_TITLE_DIR}substitution from.active-titlemarker fileDependencies
derive-kg-entries.py(existing)