Add cross-project pattern registry for retrieval-augmented generalization

- Create patterns/ directory with README, manifest, and 10 initial patterns
  covering Ollama JSON fallback, API escaping, deprecation, PTY auth,
  queue-poll, LLM-as-parser, credential rotation, reverse proxy binding,
  human approval gates, and transient retry.
- Wire pattern loading into architecture/pipeline.js based on task tags.
- Update architecture/orchestrator.js to load patterns and surface them in
  the system prompt.
- Update MEMORY.md, ARCHITECTURE.md, and CONTEXT.md to document the registry
  and record the decision.
This commit is contained in:
JC Beasley
2026-08-06 12:46:09 -07:00
parent d8989f9371
commit 0bd719ab91
17 changed files with 676 additions and 32 deletions
+15 -2
View File
@@ -98,6 +98,9 @@ class AgentOrchestrator {
// Load relevant memory
await this.pipeline.loadRelevantMemory(userInput, 5);
// Load cross-project patterns based on task input
await this.pipeline.loadPatterns(userInput);
// Build final packet
const packet = this.pipeline.buildPacket(userInput);
@@ -130,10 +133,20 @@ class AgentOrchestrator {
'',
'---',
'',
'# Memory',
contextPacket.memory.substring(0, 1000) // Truncate for brevity
'# Preferences',
contextPacket.preferences.substring(0, 2000) // Truncate for brevity
];
if (contextPacket.memory && contextPacket.memory.trim()) {
parts.push(
'',
'---',
'',
'# Memory',
contextPacket.memory.substring(0, 1000) // Truncate for brevity
);
}
return parts.join('\n');
}