@brutalist/mcp 0.6.15 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brutalist-server.d.ts +2 -0
- package/dist/brutalist-server.d.ts.map +1 -1
- package/dist/brutalist-server.js +22 -21
- package/dist/brutalist-server.js.map +1 -1
- package/dist/cli-agents.d.ts.map +1 -1
- package/dist/cli-agents.js +4 -24
- package/dist/cli-agents.js.map +1 -1
- package/dist/domains/argument-space.d.ts +112 -0
- package/dist/domains/argument-space.d.ts.map +1 -0
- package/dist/domains/argument-space.js +178 -0
- package/dist/domains/argument-space.js.map +1 -0
- package/dist/domains/critic-persona.d.ts +77 -0
- package/dist/domains/critic-persona.d.ts.map +1 -0
- package/dist/domains/critic-persona.js +73 -0
- package/dist/domains/critic-persona.js.map +1 -0
- package/dist/domains/critique-domain.d.ts +33 -0
- package/dist/domains/critique-domain.d.ts.map +1 -0
- package/dist/domains/critique-domain.js +36 -0
- package/dist/domains/critique-domain.js.map +1 -0
- package/dist/domains/execution-strategy.d.ts +119 -0
- package/dist/domains/execution-strategy.d.ts.map +1 -0
- package/dist/domains/execution-strategy.js +95 -0
- package/dist/domains/execution-strategy.js.map +1 -0
- package/dist/generators/tool-generator.d.ts +33 -0
- package/dist/generators/tool-generator.d.ts.map +1 -0
- package/dist/generators/tool-generator.js +136 -0
- package/dist/generators/tool-generator.js.map +1 -0
- package/dist/registry/argument-spaces.d.ts +19 -0
- package/dist/registry/argument-spaces.d.ts.map +1 -0
- package/dist/registry/argument-spaces.js +132 -0
- package/dist/registry/argument-spaces.js.map +1 -0
- package/dist/registry/domains.d.ts +24 -0
- package/dist/registry/domains.d.ts.map +1 -0
- package/dist/registry/domains.js +129 -0
- package/dist/registry/domains.js.map +1 -0
- package/dist/registry/personas.d.ts +20 -0
- package/dist/registry/personas.d.ts.map +1 -0
- package/dist/registry/personas.js +75 -0
- package/dist/registry/personas.js.map +1 -0
- package/dist/streaming/intelligent-buffer.d.ts.map +1 -1
- package/dist/streaming/intelligent-buffer.js +3 -1
- package/dist/streaming/intelligent-buffer.js.map +1 -1
- package/dist/streaming/session-manager.d.ts.map +1 -1
- package/dist/streaming/session-manager.js +4 -2
- package/dist/streaming/session-manager.js.map +1 -1
- package/dist/streaming/sse-transport.d.ts.map +1 -1
- package/dist/streaming/sse-transport.js +2 -0
- package/dist/streaming/sse-transport.js.map +1 -1
- package/dist/streaming/streaming-orchestrator.d.ts.map +1 -1
- package/dist/streaming/streaming-orchestrator.js +3 -1
- package/dist/streaming/streaming-orchestrator.js.map +1 -1
- package/dist/tool-definitions-generated.d.ts +39 -0
- package/dist/tool-definitions-generated.d.ts.map +1 -0
- package/dist/tool-definitions-generated.js +107 -0
- package/dist/tool-definitions-generated.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core abstraction: ExecutionStrategy
|
|
3
|
+
*
|
|
4
|
+
* Defines how critique agents are orchestrated and how their results are synthesized.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default execution limits
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_LIMITS = {
|
|
10
|
+
timeoutPerAgent: 1800000, // 30 minutes per agent
|
|
11
|
+
maxTotalTime: 3600000, // 1 hour total
|
|
12
|
+
maxMemoryMB: 2048, // 2GB
|
|
13
|
+
maxOutputSize: 1000000 // 1M characters
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Pre-built execution strategies
|
|
17
|
+
*/
|
|
18
|
+
export const ExecutionStrategies = {
|
|
19
|
+
/**
|
|
20
|
+
* Standard: Run all available agents in parallel, show all perspectives
|
|
21
|
+
*/
|
|
22
|
+
PARALLEL_CRITIQUE: {
|
|
23
|
+
id: 'parallel_critique',
|
|
24
|
+
name: 'Parallel Critique',
|
|
25
|
+
agentCount: 'all',
|
|
26
|
+
mode: 'parallel',
|
|
27
|
+
synthesis: 'multi_perspective',
|
|
28
|
+
limits: DEFAULT_LIMITS
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Single agent: Fast, focused analysis from one perspective
|
|
32
|
+
*/
|
|
33
|
+
SINGLE_AGENT: {
|
|
34
|
+
id: 'single_agent',
|
|
35
|
+
name: 'Single Agent',
|
|
36
|
+
agentCount: 1,
|
|
37
|
+
mode: 'parallel',
|
|
38
|
+
synthesis: 'concatenate',
|
|
39
|
+
limits: {
|
|
40
|
+
...DEFAULT_LIMITS,
|
|
41
|
+
maxTotalTime: 1800000 // 30 minutes
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Adversarial debate: Agents challenge each other
|
|
46
|
+
*/
|
|
47
|
+
ADVERSARIAL_DEBATE: {
|
|
48
|
+
id: 'adversarial_debate',
|
|
49
|
+
name: 'Adversarial Debate',
|
|
50
|
+
agentCount: 3,
|
|
51
|
+
mode: 'debate',
|
|
52
|
+
synthesis: 'consensus_extraction',
|
|
53
|
+
limits: {
|
|
54
|
+
...DEFAULT_LIMITS,
|
|
55
|
+
maxTotalTime: 5400000 // 90 minutes (multiple rounds)
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Tournament: Agents compete, best wins
|
|
60
|
+
*/
|
|
61
|
+
TOURNAMENT: {
|
|
62
|
+
id: 'tournament',
|
|
63
|
+
name: 'Tournament',
|
|
64
|
+
agentCount: 'all',
|
|
65
|
+
mode: 'tournament',
|
|
66
|
+
synthesis: 'best_of_breed',
|
|
67
|
+
limits: DEFAULT_LIMITS
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Sequential: One agent at a time, each builds on previous
|
|
71
|
+
*/
|
|
72
|
+
SEQUENTIAL_BUILD: {
|
|
73
|
+
id: 'sequential_build',
|
|
74
|
+
name: 'Sequential Build',
|
|
75
|
+
agentCount: 'all',
|
|
76
|
+
mode: 'sequential',
|
|
77
|
+
synthesis: 'concatenate',
|
|
78
|
+
limits: DEFAULT_LIMITS
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Helper to create a custom execution strategy
|
|
83
|
+
*/
|
|
84
|
+
export function createExecutionStrategy(id, name, config) {
|
|
85
|
+
return {
|
|
86
|
+
id,
|
|
87
|
+
name,
|
|
88
|
+
agentCount: config.agentCount || 'all',
|
|
89
|
+
mode: config.mode || 'parallel',
|
|
90
|
+
synthesis: config.synthesis || 'multi_perspective',
|
|
91
|
+
limits: config.limits || DEFAULT_LIMITS,
|
|
92
|
+
customSynthesis: config.customSynthesis
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=execution-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-strategy.js","sourceRoot":"","sources":["../../src/domains/execution-strategy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuDH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,eAAe,EAAE,OAAO,EAAG,uBAAuB;IAClD,YAAY,EAAE,OAAO,EAAM,eAAe;IAC1C,WAAW,EAAE,IAAI,EAAU,MAAM;IACjC,aAAa,EAAE,OAAO,CAAK,gBAAgB;CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,KAAmB;QAC/B,IAAI,EAAE,UAA2B;QACjC,SAAS,EAAE,mBAAsC;QACjD,MAAM,EAAE,cAAc;KACvB;IAED;;OAEG;IACH,YAAY,EAAE;QACZ,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,CAAe;QAC3B,IAAI,EAAE,UAA2B;QACjC,SAAS,EAAE,aAAgC;QAC3C,MAAM,EAAE;YACN,GAAG,cAAc;YACjB,YAAY,EAAE,OAAO,CAAE,aAAa;SACrC;KACF;IAED;;OAEG;IACH,kBAAkB,EAAE;QAClB,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,CAAe;QAC3B,IAAI,EAAE,QAAyB;QAC/B,SAAS,EAAE,sBAAyC;QACpD,MAAM,EAAE;YACN,GAAG,cAAc;YACjB,YAAY,EAAE,OAAO,CAAE,+BAA+B;SACvD;KACF;IAED;;OAEG;IACH,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,KAAmB;QAC/B,IAAI,EAAE,YAA6B;QACnC,SAAS,EAAE,eAAkC;QAC7C,MAAM,EAAE,cAAc;KACvB;IAED;;OAEG;IACH,gBAAgB,EAAE;QAChB,EAAE,EAAE,kBAAkB;QACtB,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,KAAmB;QAC/B,IAAI,EAAE,YAA6B;QACnC,SAAS,EAAE,aAAgC;QAC3C,MAAM,EAAE,cAAc;KACvB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,EAAU,EACV,IAAY,EACZ,MAAkC;IAElC,OAAO;QACL,EAAE;QACF,IAAI;QACJ,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;QACtC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,UAAU;QAC/B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,mBAAmB;QAClD,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,cAAc;QACvC,eAAe,EAAE,MAAM,CAAC,eAAe;KACxC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrutalistToolGenerator: The magic that transforms domains into tools
|
|
3
|
+
*
|
|
4
|
+
* This is the compositional algebra:
|
|
5
|
+
* CritiqueDomain × CriticPersona × ArgumentSpace × ExecutionStrategy = ToolConfig
|
|
6
|
+
*/
|
|
7
|
+
import { CritiqueDomain } from '../domains/critique-domain.js';
|
|
8
|
+
import { CriticPersona } from '../domains/critic-persona.js';
|
|
9
|
+
import { ArgumentSpace } from '../domains/argument-space.js';
|
|
10
|
+
import { ExecutionStrategy } from '../domains/execution-strategy.js';
|
|
11
|
+
import { ToolConfig } from '../types/tool-config.js';
|
|
12
|
+
export declare class BrutalistToolGenerator {
|
|
13
|
+
/**
|
|
14
|
+
* Generate a single tool from domain + persona + argument space + strategy
|
|
15
|
+
*/
|
|
16
|
+
generateTool(domain: CritiqueDomain, persona: CriticPersona, argSpace: ArgumentSpace, strategy: ExecutionStrategy): ToolConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Compose multiple domains into a single composite tool
|
|
19
|
+
*/
|
|
20
|
+
composeDomainsToTool(domains: CritiqueDomain[], persona: CriticPersona, argSpace: ArgumentSpace, strategy: ExecutionStrategy): ToolConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Generate multiple tools from a domain across different personas/strategies
|
|
23
|
+
*/
|
|
24
|
+
generateVariations(domain: CritiqueDomain, personas: CriticPersona[], argSpace: ArgumentSpace, strategies: ExecutionStrategy[]): ToolConfig[];
|
|
25
|
+
private buildSchemaExtensions;
|
|
26
|
+
private buildContextBuilder;
|
|
27
|
+
private renderDescription;
|
|
28
|
+
private describeTone;
|
|
29
|
+
private describeMode;
|
|
30
|
+
private describeCapabilities;
|
|
31
|
+
private mapDomainToAnalysisType;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=tool-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-generator.d.ts","sourceRoot":"","sources":["../../src/generators/tool-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAuB,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,aAAa,EAAmC,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,qBAAa,sBAAsB;IACjC;;OAEG;IACH,YAAY,CACV,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,iBAAiB,GAC1B,UAAU;IA8Bb;;OAEG;IACH,oBAAoB,CAClB,OAAO,EAAE,cAAc,EAAE,EACzB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,iBAAiB,GAC1B,UAAU;IAQb;;OAEG;IACH,kBAAkB,CAChB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,aAAa,EAAE,EACzB,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,iBAAiB,EAAE,GAC9B,UAAU,EAAE;IAcf,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,uBAAuB;CAkBhC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrutalistToolGenerator: The magic that transforms domains into tools
|
|
3
|
+
*
|
|
4
|
+
* This is the compositional algebra:
|
|
5
|
+
* CritiqueDomain × CriticPersona × ArgumentSpace × ExecutionStrategy = ToolConfig
|
|
6
|
+
*/
|
|
7
|
+
import { composeDomains } from '../domains/critique-domain.js';
|
|
8
|
+
import { bindPersonaToDomain } from '../domains/critic-persona.js';
|
|
9
|
+
import { inferCacheKeys, inferPrimaryArg } from '../domains/argument-space.js';
|
|
10
|
+
export class BrutalistToolGenerator {
|
|
11
|
+
/**
|
|
12
|
+
* Generate a single tool from domain + persona + argument space + strategy
|
|
13
|
+
*/
|
|
14
|
+
generateTool(domain, persona, argSpace, strategy) {
|
|
15
|
+
// Bind persona to domain (renders prompt template)
|
|
16
|
+
const boundPersona = bindPersonaToDomain(persona, domain);
|
|
17
|
+
const systemPrompt = boundPersona.promptTemplate.render(domain);
|
|
18
|
+
// Merge argument schemas
|
|
19
|
+
const schemaExtensions = this.buildSchemaExtensions(argSpace);
|
|
20
|
+
// Infer cache keys and primary arg
|
|
21
|
+
const cacheKeyFields = inferCacheKeys(argSpace);
|
|
22
|
+
const primaryArgField = inferPrimaryArg(argSpace);
|
|
23
|
+
// Build context function if needed
|
|
24
|
+
const contextBuilder = this.buildContextBuilder(argSpace, domain);
|
|
25
|
+
// Map domain ID to analysis type (for backwards compatibility)
|
|
26
|
+
const analysisType = this.mapDomainToAnalysisType(domain.id);
|
|
27
|
+
return {
|
|
28
|
+
name: `roast_${domain.id}`,
|
|
29
|
+
description: this.renderDescription(domain, persona, strategy),
|
|
30
|
+
analysisType,
|
|
31
|
+
systemPrompt,
|
|
32
|
+
schemaExtensions,
|
|
33
|
+
cacheKeyFields,
|
|
34
|
+
primaryArgField,
|
|
35
|
+
contextBuilder: contextBuilder || undefined
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Compose multiple domains into a single composite tool
|
|
40
|
+
*/
|
|
41
|
+
composeDomainsToTool(domains, persona, argSpace, strategy) {
|
|
42
|
+
const compositeId = domains.map(d => d.id).join('_and_');
|
|
43
|
+
const compositeName = domains.map(d => d.name).join(' and ');
|
|
44
|
+
const compositeDomain = composeDomains(domains, compositeId, compositeName);
|
|
45
|
+
return this.generateTool(compositeDomain, persona, argSpace, strategy);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Generate multiple tools from a domain across different personas/strategies
|
|
49
|
+
*/
|
|
50
|
+
generateVariations(domain, personas, argSpace, strategies) {
|
|
51
|
+
const tools = [];
|
|
52
|
+
for (const persona of personas) {
|
|
53
|
+
for (const strategy of strategies) {
|
|
54
|
+
tools.push(this.generateTool(domain, persona, argSpace, strategy));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return tools;
|
|
58
|
+
}
|
|
59
|
+
// Private helpers
|
|
60
|
+
buildSchemaExtensions(argSpace) {
|
|
61
|
+
// Combine base + domain arguments
|
|
62
|
+
const combined = argSpace.base.merge(argSpace.domain);
|
|
63
|
+
return combined.shape;
|
|
64
|
+
}
|
|
65
|
+
buildContextBuilder(argSpace, domain) {
|
|
66
|
+
// If argument space has a computed function, use it to build context
|
|
67
|
+
if (argSpace.computed) {
|
|
68
|
+
return (args) => {
|
|
69
|
+
const computed = argSpace.computed(args);
|
|
70
|
+
const parts = [];
|
|
71
|
+
// Add analysis type
|
|
72
|
+
parts.push(`${domain.name} analysis`);
|
|
73
|
+
// Add notable computed values
|
|
74
|
+
for (const [key, value] of Object.entries(computed)) {
|
|
75
|
+
if (value && key !== 'workingDirectory') {
|
|
76
|
+
parts.push(`${key}: ${value}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Add user context if provided
|
|
80
|
+
if (args.context) {
|
|
81
|
+
parts.push(args.context);
|
|
82
|
+
}
|
|
83
|
+
return parts.join('. ');
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
// Simple context builder for basic cases
|
|
87
|
+
return (args) => {
|
|
88
|
+
return args.context || '';
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
renderDescription(domain, persona, strategy) {
|
|
92
|
+
const toneDesc = this.describeTone(persona.tone);
|
|
93
|
+
const modeDesc = this.describeMode(strategy.mode);
|
|
94
|
+
return `Deploy ${toneDesc} AI critics to ${modeDesc} your ${domain.name.toLowerCase()}. These agents will ${this.describeCapabilities(domain.capabilities)} and expose every issue in your ${domain.artifactTypes[0]}.`;
|
|
95
|
+
}
|
|
96
|
+
describeTone(tone) {
|
|
97
|
+
switch (tone) {
|
|
98
|
+
case 'brutal': return 'brutal';
|
|
99
|
+
case 'constructive': return 'constructive';
|
|
100
|
+
case 'balanced': return 'balanced';
|
|
101
|
+
case 'pedagogical': return 'pedagogical';
|
|
102
|
+
default: return 'expert';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
describeMode(mode) {
|
|
106
|
+
switch (mode) {
|
|
107
|
+
case 'parallel': return 'systematically destroy';
|
|
108
|
+
case 'debate': return 'debate and challenge';
|
|
109
|
+
case 'sequential': return 'methodically analyze';
|
|
110
|
+
case 'tournament': return 'compete to find flaws in';
|
|
111
|
+
default: return 'analyze';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
describeCapabilities(capabilities) {
|
|
115
|
+
const first = capabilities[0] || 'analyze';
|
|
116
|
+
return first.replace(/_/g, ' ');
|
|
117
|
+
}
|
|
118
|
+
mapDomainToAnalysisType(domainId) {
|
|
119
|
+
// Map new domain IDs to old analysis types for backwards compatibility
|
|
120
|
+
const mapping = {
|
|
121
|
+
'codebase': 'codebase',
|
|
122
|
+
'file_structure': 'fileStructure',
|
|
123
|
+
'dependencies': 'dependencies',
|
|
124
|
+
'git_history': 'gitHistory',
|
|
125
|
+
'test_coverage': 'testCoverage',
|
|
126
|
+
'idea': 'idea',
|
|
127
|
+
'architecture': 'architecture',
|
|
128
|
+
'research': 'research',
|
|
129
|
+
'security': 'security',
|
|
130
|
+
'product': 'product',
|
|
131
|
+
'infrastructure': 'infrastructure'
|
|
132
|
+
};
|
|
133
|
+
return mapping[domainId] || domainId;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=tool-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-generator.js","sourceRoot":"","sources":["../../src/generators/tool-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAiB,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAiB,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;A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,CAAC;YACzC,OAAO,CAAC,CAAC,OAAO,QAAQ,CAAC;QAC3B,CAAC;IACH,CAAC;IAEO,YAAY,CAAC,IAAY;QAC/B,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,UAAU,CAAC,CAAC,OAAO,wBAAwB,CAAC;YACjD,KAAK,QAAQ,CAAC,CAAC,OAAO,sBAAsB,CAAC;YAC7C,KAAK,YAAY,CAAC,CAAC,OAAO,sBAAsB,CAAC;YACjD,KAAK,YAAY,CAAC,CAAC,OAAO,0BAA0B,CAAC;YACrD,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC;QAC5B,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,YAAsB;QACjD,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;QAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;IAEO,uBAAuB,CAAC,QAAgB;QAC9C,uEAAuE;QACvE,MAAM,OAAO,GAA2B;YACtC,UAAU,EAAE,UAAU;YACtB,gBAAgB,EAAE,eAAe;YACjC,cAAc,EAAE,cAAc;YAC9B,aAAa,EAAE,YAAY;YAC3B,eAAe,EAAE,cAAc;YAC/B,MAAM,EAAE,MAAM;YACd,cAAc,EAAE,cAAc;YAC9B,UAAU,EAAE,UAAU;YACtB,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,SAAS;YACpB,gBAAgB,EAAE,gBAAgB;SACnC,CAAC;QAEF,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument Space Registry: Pre-built reusable argument schemas
|
|
3
|
+
*
|
|
4
|
+
* Import these to avoid duplication across tool definitions.
|
|
5
|
+
*/
|
|
6
|
+
import { ArgumentSpace } from '../domains/argument-space.js';
|
|
7
|
+
/**
|
|
8
|
+
* All built-in argument spaces
|
|
9
|
+
*/
|
|
10
|
+
export declare const ARGUMENT_SPACES: Record<string, ArgumentSpace>;
|
|
11
|
+
/**
|
|
12
|
+
* Helper to get an argument space by ID
|
|
13
|
+
*/
|
|
14
|
+
export declare function getArgumentSpace(id: string): ArgumentSpace | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Helper to list all argument spaces
|
|
17
|
+
*/
|
|
18
|
+
export declare function listArgumentSpaces(): ArgumentSpace[];
|
|
19
|
+
//# sourceMappingURL=argument-spaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argument-spaces.d.ts","sourceRoot":"","sources":["../../src/registry/argument-spaces.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,aAAa,EAOd,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAuHzD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEtE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,aAAa,EAAE,CAEpD"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument Space Registry: Pre-built reusable argument schemas
|
|
3
|
+
*
|
|
4
|
+
* Import these to avoid duplication across tool definitions.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { FILESYSTEM_ARGUMENT_SPACE, TEXT_INPUT_ARGUMENT_SPACE, FILESYSTEM_WITH_DEPTH, PACKAGE_MANIFEST_SPACE, GIT_REPOSITORY_SPACE, TEST_SUITE_SPACE } from '../domains/argument-space.js';
|
|
8
|
+
/**
|
|
9
|
+
* All built-in argument spaces
|
|
10
|
+
*/
|
|
11
|
+
export const ARGUMENT_SPACES = {
|
|
12
|
+
// Standard filesystem analysis
|
|
13
|
+
FILESYSTEM: FILESYSTEM_ARGUMENT_SPACE,
|
|
14
|
+
// Text-based input (for ideas, architecture descriptions, etc.)
|
|
15
|
+
TEXT_INPUT: TEXT_INPUT_ARGUMENT_SPACE,
|
|
16
|
+
// Filesystem with depth control (for directory structure analysis)
|
|
17
|
+
FILESYSTEM_DEPTH: FILESYSTEM_WITH_DEPTH,
|
|
18
|
+
// Package manifest analysis
|
|
19
|
+
PACKAGE_MANIFEST: PACKAGE_MANIFEST_SPACE,
|
|
20
|
+
// Git repository analysis
|
|
21
|
+
GIT_REPOSITORY: GIT_REPOSITORY_SPACE,
|
|
22
|
+
// Test suite analysis
|
|
23
|
+
TEST_SUITE: TEST_SUITE_SPACE,
|
|
24
|
+
// Extended text input with additional context fields
|
|
25
|
+
EXTENDED_TEXT_INPUT: {
|
|
26
|
+
id: 'extended_text_input',
|
|
27
|
+
name: 'Extended Text Input',
|
|
28
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
29
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
30
|
+
resources: z.string().optional().describe("Available resources (budget, team, time, skills)"),
|
|
31
|
+
timeline: z.string().optional().describe("Expected timeline or deadline")
|
|
32
|
+
}),
|
|
33
|
+
computed: (args) => ({
|
|
34
|
+
workingDirectory: args.targetPath || '.',
|
|
35
|
+
contextExtensions: [args.resources, args.timeline].filter(Boolean).join('. ')
|
|
36
|
+
})
|
|
37
|
+
},
|
|
38
|
+
// Architecture-specific arguments
|
|
39
|
+
ARCHITECTURE_SPECIFIC: {
|
|
40
|
+
id: 'architecture_specific',
|
|
41
|
+
name: 'Architecture Specific',
|
|
42
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
43
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
44
|
+
scale: z.string().optional().describe("Expected scale/load (users, requests, data)"),
|
|
45
|
+
constraints: z.string().optional().describe("Budget, timeline, or technical constraints"),
|
|
46
|
+
deployment: z.string().optional().describe("Deployment environment and strategy")
|
|
47
|
+
}),
|
|
48
|
+
computed: (args) => ({
|
|
49
|
+
workingDirectory: args.targetPath || '.',
|
|
50
|
+
scalingContext: args.scale,
|
|
51
|
+
deploymentContext: args.deployment
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
// Research-specific arguments
|
|
55
|
+
RESEARCH_SPECIFIC: {
|
|
56
|
+
id: 'research_specific',
|
|
57
|
+
name: 'Research Specific',
|
|
58
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
59
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
60
|
+
field: z.string().optional().describe("Research field (ML, systems, theory, etc.)"),
|
|
61
|
+
claims: z.string().optional().describe("Main claims or contributions"),
|
|
62
|
+
data: z.string().optional().describe("Data sources, datasets, or experimental setup")
|
|
63
|
+
}),
|
|
64
|
+
computed: (args) => ({
|
|
65
|
+
workingDirectory: args.targetPath || '.',
|
|
66
|
+
researchField: args.field,
|
|
67
|
+
methodology: args.data
|
|
68
|
+
})
|
|
69
|
+
},
|
|
70
|
+
// Security-specific arguments
|
|
71
|
+
SECURITY_SPECIFIC: {
|
|
72
|
+
id: 'security_specific',
|
|
73
|
+
name: 'Security Specific',
|
|
74
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
75
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
76
|
+
assets: z.string().optional().describe("Critical assets or data to protect"),
|
|
77
|
+
threatModel: z.string().optional().describe("Known threats or attack vectors to consider"),
|
|
78
|
+
compliance: z.string().optional().describe("Compliance requirements (GDPR, HIPAA, etc.)")
|
|
79
|
+
}),
|
|
80
|
+
computed: (args) => ({
|
|
81
|
+
workingDirectory: args.targetPath || '.',
|
|
82
|
+
criticalAssets: args.assets,
|
|
83
|
+
complianceRequirements: args.compliance
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
// Product-specific arguments
|
|
87
|
+
PRODUCT_SPECIFIC: {
|
|
88
|
+
id: 'product_specific',
|
|
89
|
+
name: 'Product Specific',
|
|
90
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
91
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
92
|
+
users: z.string().optional().describe("Target users or user personas"),
|
|
93
|
+
competition: z.string().optional().describe("Competitive landscape or alternatives"),
|
|
94
|
+
metrics: z.string().optional().describe("Success metrics or KPIs")
|
|
95
|
+
}),
|
|
96
|
+
computed: (args) => ({
|
|
97
|
+
workingDirectory: args.targetPath || '.',
|
|
98
|
+
targetUsers: args.users,
|
|
99
|
+
competitiveContext: args.competition
|
|
100
|
+
})
|
|
101
|
+
},
|
|
102
|
+
// Infrastructure-specific arguments
|
|
103
|
+
INFRASTRUCTURE_SPECIFIC: {
|
|
104
|
+
id: 'infrastructure_specific',
|
|
105
|
+
name: 'Infrastructure Specific',
|
|
106
|
+
base: FILESYSTEM_ARGUMENT_SPACE.base,
|
|
107
|
+
domain: TEXT_INPUT_ARGUMENT_SPACE.domain.extend({
|
|
108
|
+
scale: z.string().optional().describe("Expected scale and load patterns"),
|
|
109
|
+
sla: z.string().optional().describe("SLA requirements or uptime targets"),
|
|
110
|
+
budget: z.string().optional().describe("Infrastructure budget or cost constraints")
|
|
111
|
+
}),
|
|
112
|
+
computed: (args) => ({
|
|
113
|
+
workingDirectory: args.targetPath || '.',
|
|
114
|
+
loadPatterns: args.scale,
|
|
115
|
+
slaRequirements: args.sla,
|
|
116
|
+
costConstraints: args.budget
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Helper to get an argument space by ID
|
|
122
|
+
*/
|
|
123
|
+
export function getArgumentSpace(id) {
|
|
124
|
+
return Object.values(ARGUMENT_SPACES).find(a => a.id === id);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Helper to list all argument spaces
|
|
128
|
+
*/
|
|
129
|
+
export function listArgumentSpaces() {
|
|
130
|
+
return Object.values(ARGUMENT_SPACES);
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=argument-spaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argument-spaces.js","sourceRoot":"","sources":["../../src/registry/argument-spaces.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkC;IAC5D,+BAA+B;IAC/B,UAAU,EAAE,yBAAyB;IAErC,gEAAgE;IAChE,UAAU,EAAE,yBAAyB;IAErC,mEAAmE;IACnE,gBAAgB,EAAE,qBAAqB;IAEvC,4BAA4B;IAC5B,gBAAgB,EAAE,sBAAsB;IAExC,0BAA0B;IAC1B,cAAc,EAAE,oBAAoB;IAEpC,sBAAsB;IACtB,UAAU,EAAE,gBAAgB;IAE5B,qDAAqD;IACrD,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,yBAAyB,CAAC,IAAI;QACpC,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,MAAM,CAAC;YAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;YAC7F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;SAC1E,CAAC;QACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,gBAAgB,EAAE,IAAI,CAAC,UAAU,IAAI,GAAG;YACxC,iBAAiB,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ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AAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Registry: All built-in critique domains
|
|
3
|
+
*
|
|
4
|
+
* These are extracted from the original TOOL_CONFIGS and elevated to first-class abstractions.
|
|
5
|
+
*/
|
|
6
|
+
import { CritiqueDomain } from '../domains/critique-domain.js';
|
|
7
|
+
export declare const DOMAINS: Record<string, CritiqueDomain>;
|
|
8
|
+
/**
|
|
9
|
+
* Helper to get a domain by ID
|
|
10
|
+
*/
|
|
11
|
+
export declare function getDomain(id: string): CritiqueDomain | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Helper to list all domains
|
|
14
|
+
*/
|
|
15
|
+
export declare function listDomains(): CritiqueDomain[];
|
|
16
|
+
/**
|
|
17
|
+
* Helper to find domains by capability
|
|
18
|
+
*/
|
|
19
|
+
export declare function findDomainsByCapability(capability: string): CritiqueDomain[];
|
|
20
|
+
/**
|
|
21
|
+
* Helper to find domains by artifact type
|
|
22
|
+
*/
|
|
23
|
+
export declare function findDomainsByArtifactType(artifactType: string): CritiqueDomain[];
|
|
24
|
+
//# sourceMappingURL=domains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../src/registry/domains.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA4GlD,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEhE;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,cAAc,EAAE,CAE9C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,CAI5E;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,EAAE,CAIhF"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Registry: All built-in critique domains
|
|
3
|
+
*
|
|
4
|
+
* These are extracted from the original TOOL_CONFIGS and elevated to first-class abstractions.
|
|
5
|
+
*/
|
|
6
|
+
export const DOMAINS = {
|
|
7
|
+
CODEBASE: {
|
|
8
|
+
id: 'codebase',
|
|
9
|
+
name: 'Codebase Analysis',
|
|
10
|
+
description: 'Comprehensive codebase review for architecture, security, and maintainability',
|
|
11
|
+
capabilities: [
|
|
12
|
+
'static_analysis',
|
|
13
|
+
'security_scanning',
|
|
14
|
+
'performance_profiling',
|
|
15
|
+
'scalability_analysis'
|
|
16
|
+
],
|
|
17
|
+
artifactTypes: ['code', 'directory_structure']
|
|
18
|
+
},
|
|
19
|
+
FILE_STRUCTURE: {
|
|
20
|
+
id: 'file_structure',
|
|
21
|
+
name: 'File Organization',
|
|
22
|
+
description: 'File and directory structure organization review',
|
|
23
|
+
capabilities: ['static_analysis'],
|
|
24
|
+
artifactTypes: ['directory_structure']
|
|
25
|
+
},
|
|
26
|
+
DEPENDENCIES: {
|
|
27
|
+
id: 'dependencies',
|
|
28
|
+
name: 'Dependency Management',
|
|
29
|
+
description: 'Package dependency analysis for security and version conflicts',
|
|
30
|
+
capabilities: ['security_scanning', 'compliance_audit'],
|
|
31
|
+
artifactTypes: ['package_manifest']
|
|
32
|
+
},
|
|
33
|
+
GIT_HISTORY: {
|
|
34
|
+
id: 'git_history',
|
|
35
|
+
name: 'Git History',
|
|
36
|
+
description: 'Version control history and workflow analysis',
|
|
37
|
+
capabilities: ['static_analysis'],
|
|
38
|
+
artifactTypes: ['git_history']
|
|
39
|
+
},
|
|
40
|
+
TEST_COVERAGE: {
|
|
41
|
+
id: 'test_coverage',
|
|
42
|
+
name: 'Test Coverage',
|
|
43
|
+
description: 'Testing strategy and coverage analysis',
|
|
44
|
+
capabilities: ['static_analysis'],
|
|
45
|
+
artifactTypes: ['test_suite', 'code']
|
|
46
|
+
},
|
|
47
|
+
IDEA: {
|
|
48
|
+
id: 'idea',
|
|
49
|
+
name: 'Idea Validation',
|
|
50
|
+
description: 'Business and technical idea feasibility analysis',
|
|
51
|
+
capabilities: ['threat_modeling', 'scalability_analysis', 'cost_estimation'],
|
|
52
|
+
artifactTypes: ['text_description']
|
|
53
|
+
},
|
|
54
|
+
ARCHITECTURE: {
|
|
55
|
+
id: 'architecture',
|
|
56
|
+
name: 'Architecture Review',
|
|
57
|
+
description: 'System architecture design and scalability review',
|
|
58
|
+
capabilities: [
|
|
59
|
+
'scalability_analysis',
|
|
60
|
+
'cost_estimation',
|
|
61
|
+
'performance_profiling',
|
|
62
|
+
'threat_modeling'
|
|
63
|
+
],
|
|
64
|
+
artifactTypes: ['architecture_diagram', 'text_description', 'code']
|
|
65
|
+
},
|
|
66
|
+
RESEARCH: {
|
|
67
|
+
id: 'research',
|
|
68
|
+
name: 'Research Methodology',
|
|
69
|
+
description: 'Academic research methodology and statistical validity review',
|
|
70
|
+
capabilities: ['static_analysis'],
|
|
71
|
+
artifactTypes: ['text_description', 'documentation']
|
|
72
|
+
},
|
|
73
|
+
SECURITY: {
|
|
74
|
+
id: 'security',
|
|
75
|
+
name: 'Security Analysis',
|
|
76
|
+
description: 'Security vulnerability and threat analysis',
|
|
77
|
+
capabilities: [
|
|
78
|
+
'penetration_testing',
|
|
79
|
+
'threat_modeling',
|
|
80
|
+
'security_scanning',
|
|
81
|
+
'compliance_audit'
|
|
82
|
+
],
|
|
83
|
+
artifactTypes: ['code', 'architecture_diagram', 'api_spec', 'deployment_config']
|
|
84
|
+
},
|
|
85
|
+
PRODUCT: {
|
|
86
|
+
id: 'product',
|
|
87
|
+
name: 'Product Review',
|
|
88
|
+
description: 'Product design and user experience analysis',
|
|
89
|
+
capabilities: ['usability_review', 'threat_modeling'],
|
|
90
|
+
artifactTypes: ['text_description', 'documentation', 'code']
|
|
91
|
+
},
|
|
92
|
+
INFRASTRUCTURE: {
|
|
93
|
+
id: 'infrastructure',
|
|
94
|
+
name: 'Infrastructure Review',
|
|
95
|
+
description: 'Infrastructure design and operations review',
|
|
96
|
+
capabilities: [
|
|
97
|
+
'scalability_analysis',
|
|
98
|
+
'cost_estimation',
|
|
99
|
+
'threat_modeling',
|
|
100
|
+
'performance_profiling'
|
|
101
|
+
],
|
|
102
|
+
artifactTypes: ['deployment_config', 'text_description', 'architecture_diagram']
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Helper to get a domain by ID
|
|
107
|
+
*/
|
|
108
|
+
export function getDomain(id) {
|
|
109
|
+
return Object.values(DOMAINS).find(d => d.id === id);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Helper to list all domains
|
|
113
|
+
*/
|
|
114
|
+
export function listDomains() {
|
|
115
|
+
return Object.values(DOMAINS);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Helper to find domains by capability
|
|
119
|
+
*/
|
|
120
|
+
export function findDomainsByCapability(capability) {
|
|
121
|
+
return Object.values(DOMAINS).filter(d => d.capabilities.includes(capability));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Helper to find domains by artifact type
|
|
125
|
+
*/
|
|
126
|
+
export function findDomainsByArtifactType(artifactType) {
|
|
127
|
+
return Object.values(DOMAINS).filter(d => d.artifactTypes.includes(artifactType));
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=domains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../../src/registry/domains.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,OAAO,GAAmC;IACrD,QAAQ,EAAE;QACR,EAAE,EAAE,U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,EAAE,CAAC,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CACvC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAiB,CAAC,CAC3C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAoB;IAC5D,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CACvC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAmB,CAAC,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persona Registry: All built-in critic personas
|
|
3
|
+
*
|
|
4
|
+
* Personas are reusable across domains - same brutal critic can review security or architecture.
|
|
5
|
+
*/
|
|
6
|
+
import { CriticPersona } from '../domains/critic-persona.js';
|
|
7
|
+
export declare const PERSONAS: Record<string, CriticPersona>;
|
|
8
|
+
/**
|
|
9
|
+
* Helper to get a persona by ID
|
|
10
|
+
*/
|
|
11
|
+
export declare function getPersona(id: string): CriticPersona | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Helper to list all personas
|
|
14
|
+
*/
|
|
15
|
+
export declare function listPersonas(): CriticPersona[];
|
|
16
|
+
/**
|
|
17
|
+
* Helper to find personas by tone
|
|
18
|
+
*/
|
|
19
|
+
export declare function findPersonasByTone(tone: string): CriticPersona[];
|
|
20
|
+
//# sourceMappingURL=personas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personas.d.ts","sourceRoot":"","sources":["../../src/registry/personas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAmB,MAAM,8BAA8B,CAAC;AAE9E,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAoDlD,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEhE;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,aAAa,EAAE,CAE9C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAEhE"}
|