feat: add phase 3 prompt customization backend

- parse prompt model and argument-hint metadata and persist model on prompt invocations
- expand markdown-linked file context in scanned prompt and instruction bodies
- discover .claude/rules instructions and support Claude-style paths metadata
- discover customization roots up to the nearest parent repository and watch them for changes
- apply per-turn prompt model overrides before sidecar execution

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-04-02 12:21:59 +02:00
co-authored by Copilot
parent bcbdd2ef29
commit 6eadb36c10
17 changed files with 779 additions and 114 deletions
+8
View File
@@ -4,6 +4,7 @@ import type { SidecarModelCapability } from '@shared/contracts/sidecar';
import {
buildAvailableModelCatalog,
findModel,
findModelByReference,
normalizePatternModels,
resolveReasoningEffort,
} from '@shared/domain/models';
@@ -62,6 +63,13 @@ describe('dynamic model catalog', () => {
expect(resolveReasoningEffort(model, 'high')).toBeUndefined();
});
test('resolves model references by id or display name', () => {
const catalog = buildAvailableModelCatalog(availableModels);
expect(findModelByReference('gpt-5.4', catalog)?.id).toBe('gpt-5.4');
expect(findModelByReference('Claude Sonnet 4.5', catalog)?.id).toBe('claude-sonnet-4.5');
});
test('normalizes pattern agents before runtime execution', () => {
const normalized = normalizePatternModels(
createPattern(),