@brutalist/mcp 0.6.15 → 0.7.0

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.
Files changed (61) hide show
  1. package/README.md +10 -6
  2. package/dist/brutalist-server.d.ts +2 -0
  3. package/dist/brutalist-server.d.ts.map +1 -1
  4. package/dist/brutalist-server.js +90 -42
  5. package/dist/brutalist-server.js.map +1 -1
  6. package/dist/cli-agents.d.ts.map +1 -1
  7. package/dist/cli-agents.js +4 -24
  8. package/dist/cli-agents.js.map +1 -1
  9. package/dist/domains/argument-space.d.ts +112 -0
  10. package/dist/domains/argument-space.d.ts.map +1 -0
  11. package/dist/domains/argument-space.js +178 -0
  12. package/dist/domains/argument-space.js.map +1 -0
  13. package/dist/domains/critic-persona.d.ts +77 -0
  14. package/dist/domains/critic-persona.d.ts.map +1 -0
  15. package/dist/domains/critic-persona.js +73 -0
  16. package/dist/domains/critic-persona.js.map +1 -0
  17. package/dist/domains/critique-domain.d.ts +33 -0
  18. package/dist/domains/critique-domain.d.ts.map +1 -0
  19. package/dist/domains/critique-domain.js +36 -0
  20. package/dist/domains/critique-domain.js.map +1 -0
  21. package/dist/domains/execution-strategy.d.ts +119 -0
  22. package/dist/domains/execution-strategy.d.ts.map +1 -0
  23. package/dist/domains/execution-strategy.js +95 -0
  24. package/dist/domains/execution-strategy.js.map +1 -0
  25. package/dist/generators/tool-generator.d.ts +33 -0
  26. package/dist/generators/tool-generator.d.ts.map +1 -0
  27. package/dist/generators/tool-generator.js +136 -0
  28. package/dist/generators/tool-generator.js.map +1 -0
  29. package/dist/registry/argument-spaces.d.ts +19 -0
  30. package/dist/registry/argument-spaces.d.ts.map +1 -0
  31. package/dist/registry/argument-spaces.js +132 -0
  32. package/dist/registry/argument-spaces.js.map +1 -0
  33. package/dist/registry/domains.d.ts +24 -0
  34. package/dist/registry/domains.d.ts.map +1 -0
  35. package/dist/registry/domains.js +129 -0
  36. package/dist/registry/domains.js.map +1 -0
  37. package/dist/registry/personas.d.ts +20 -0
  38. package/dist/registry/personas.d.ts.map +1 -0
  39. package/dist/registry/personas.js +75 -0
  40. package/dist/registry/personas.js.map +1 -0
  41. package/dist/streaming/intelligent-buffer.d.ts.map +1 -1
  42. package/dist/streaming/intelligent-buffer.js +3 -1
  43. package/dist/streaming/intelligent-buffer.js.map +1 -1
  44. package/dist/streaming/session-manager.d.ts.map +1 -1
  45. package/dist/streaming/session-manager.js +4 -2
  46. package/dist/streaming/session-manager.js.map +1 -1
  47. package/dist/streaming/sse-transport.d.ts.map +1 -1
  48. package/dist/streaming/sse-transport.js +2 -0
  49. package/dist/streaming/sse-transport.js.map +1 -1
  50. package/dist/streaming/streaming-orchestrator.d.ts.map +1 -1
  51. package/dist/streaming/streaming-orchestrator.js +3 -1
  52. package/dist/streaming/streaming-orchestrator.js.map +1 -1
  53. package/dist/tool-definitions-generated.d.ts +39 -0
  54. package/dist/tool-definitions-generated.d.ts.map +1 -0
  55. package/dist/tool-definitions-generated.js +107 -0
  56. package/dist/tool-definitions-generated.js.map +1 -0
  57. package/dist/utils/response-cache.d.ts +12 -2
  58. package/dist/utils/response-cache.d.ts.map +1 -1
  59. package/dist/utils/response-cache.js +50 -4
  60. package/dist/utils/response-cache.js.map +1 -1
  61. package/package.json +2 -2
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Core abstraction: CritiqueDomain
3
+ *
4
+ * Defines a conceptual space where expert critics operate.
5
+ * Domains are composable - security + architecture = holistic review.
6
+ */
7
+ export type ArtifactType = 'code' | 'architecture_diagram' | 'api_spec' | 'deployment_config' | 'test_suite' | 'documentation' | 'git_history' | 'package_manifest' | 'directory_structure' | 'text_description';
8
+ export type DomainCapability = 'static_analysis' | 'dynamic_analysis' | 'penetration_testing' | 'threat_modeling' | 'compliance_audit' | 'scalability_analysis' | 'cost_estimation' | 'usability_review' | 'performance_profiling' | 'security_scanning';
9
+ export interface CritiqueDomain {
10
+ /** Unique identifier for this domain */
11
+ id: string;
12
+ /** Human-readable name */
13
+ name: string;
14
+ /** What this domain critiques */
15
+ description: string;
16
+ /** Domain-specific analysis capabilities */
17
+ capabilities: DomainCapability[];
18
+ /** What types of artifacts this domain can analyze */
19
+ artifactTypes: ArtifactType[];
20
+ /** Optional: This domain composes other domains */
21
+ subdomains?: CritiqueDomain[];
22
+ /** Optional: Domain-specific configuration */
23
+ config?: Record<string, any>;
24
+ }
25
+ /**
26
+ * Helper to check if a domain can analyze a given artifact type
27
+ */
28
+ export declare function canAnalyzeArtifact(domain: CritiqueDomain, artifactType: ArtifactType): boolean;
29
+ /**
30
+ * Helper to compose multiple domains into a composite domain
31
+ */
32
+ export declare function composeDomains(domains: CritiqueDomain[], compositeId: string, compositeName: string): CritiqueDomain;
33
+ //# sourceMappingURL=critique-domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"critique-domain.d.ts","sourceRoot":"","sources":["../../src/domains/critique-domain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,sBAAsB,GACtB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,kBAAkB,GAClB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,sBAAsB,GACtB,iBAAiB,GACjB,kBAAkB,GAClB,uBAAuB,GACvB,mBAAmB,CAAC;AAExB,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IAEX,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IAEpB,4CAA4C;IAC5C,YAAY,EAAE,gBAAgB,EAAE,CAAC;IAEjC,sDAAsD;IACtD,aAAa,EAAE,YAAY,EAAE,CAAC;IAE9B,mDAAmD;IACnD,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAE9B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,YAAY,GACzB,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,cAAc,EAAE,EACzB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,cAAc,CAqBhB"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Core abstraction: CritiqueDomain
3
+ *
4
+ * Defines a conceptual space where expert critics operate.
5
+ * Domains are composable - security + architecture = holistic review.
6
+ */
7
+ /**
8
+ * Helper to check if a domain can analyze a given artifact type
9
+ */
10
+ export function canAnalyzeArtifact(domain, artifactType) {
11
+ return domain.artifactTypes.includes(artifactType);
12
+ }
13
+ /**
14
+ * Helper to compose multiple domains into a composite domain
15
+ */
16
+ export function composeDomains(domains, compositeId, compositeName) {
17
+ const allCapabilities = new Set();
18
+ const allArtifactTypes = new Set();
19
+ for (const domain of domains) {
20
+ domain.capabilities.forEach(cap => allCapabilities.add(cap));
21
+ domain.artifactTypes.forEach(type => allArtifactTypes.add(type));
22
+ }
23
+ return {
24
+ id: compositeId,
25
+ name: compositeName,
26
+ description: `Composite critique combining: ${domains.map(d => d.name).join(', ')}`,
27
+ capabilities: Array.from(allCapabilities),
28
+ artifactTypes: Array.from(allArtifactTypes),
29
+ subdomains: domains,
30
+ config: {
31
+ composite: true,
32
+ componentDomains: domains.map(d => d.id)
33
+ }
34
+ };
35
+ }
36
+ //# sourceMappingURL=critique-domain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"critique-domain.js","sourceRoot":"","sources":["../../src/domains/critique-domain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiDH;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAsB,EACtB,YAA0B;IAE1B,OAAO,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAyB,EACzB,WAAmB,EACnB,aAAqB;IAErB,MAAM,eAAe,GAAG,IAAI,GAAG,EAAoB,CAAC;IACpD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAgB,CAAC;IAEjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7D,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,OAAO;QACL,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,iCAAiC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACnF,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;QACzC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;QAC3C,UAAU,EAAE,OAAO;QACnB,MAAM,EAAE;YACN,SAAS,EAAE,IAAI;YACf,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Core abstraction: ExecutionStrategy
3
+ *
4
+ * Defines how critique agents are orchestrated and how their results are synthesized.
5
+ */
6
+ export type AgentCount = 1 | 3 | 'all';
7
+ export type ExecutionMode = 'parallel' | 'debate' | 'sequential' | 'tournament' | 'consensus';
8
+ export type SynthesisEngine = 'multi_perspective' | 'consensus_extraction' | 'best_of_breed' | 'voting' | 'concatenate';
9
+ export interface ExecutionLimits {
10
+ /** Maximum execution time per agent (ms) */
11
+ timeoutPerAgent: number;
12
+ /** Maximum total execution time (ms) */
13
+ maxTotalTime: number;
14
+ /** Maximum memory per agent (MB) */
15
+ maxMemoryMB?: number;
16
+ /** Maximum output size (characters) */
17
+ maxOutputSize?: number;
18
+ }
19
+ export interface ExecutionStrategy {
20
+ /** Unique identifier */
21
+ id: string;
22
+ /** Human-readable name */
23
+ name: string;
24
+ /** How many agents to run */
25
+ agentCount: AgentCount;
26
+ /** How agents interact */
27
+ mode: ExecutionMode;
28
+ /** How to synthesize results */
29
+ synthesis: SynthesisEngine;
30
+ /** Resource limits */
31
+ limits: ExecutionLimits;
32
+ /** Optional: custom synthesis function */
33
+ customSynthesis?: (results: any[]) => string;
34
+ }
35
+ /**
36
+ * Default execution limits
37
+ */
38
+ export declare const DEFAULT_LIMITS: ExecutionLimits;
39
+ /**
40
+ * Pre-built execution strategies
41
+ */
42
+ export declare const ExecutionStrategies: {
43
+ /**
44
+ * Standard: Run all available agents in parallel, show all perspectives
45
+ */
46
+ PARALLEL_CRITIQUE: {
47
+ id: string;
48
+ name: string;
49
+ agentCount: AgentCount;
50
+ mode: ExecutionMode;
51
+ synthesis: SynthesisEngine;
52
+ limits: ExecutionLimits;
53
+ };
54
+ /**
55
+ * Single agent: Fast, focused analysis from one perspective
56
+ */
57
+ SINGLE_AGENT: {
58
+ id: string;
59
+ name: string;
60
+ agentCount: AgentCount;
61
+ mode: ExecutionMode;
62
+ synthesis: SynthesisEngine;
63
+ limits: {
64
+ maxTotalTime: number;
65
+ /** Maximum execution time per agent (ms) */
66
+ timeoutPerAgent: number;
67
+ /** Maximum memory per agent (MB) */
68
+ maxMemoryMB?: number;
69
+ /** Maximum output size (characters) */
70
+ maxOutputSize?: number;
71
+ };
72
+ };
73
+ /**
74
+ * Adversarial debate: Agents challenge each other
75
+ */
76
+ ADVERSARIAL_DEBATE: {
77
+ id: string;
78
+ name: string;
79
+ agentCount: AgentCount;
80
+ mode: ExecutionMode;
81
+ synthesis: SynthesisEngine;
82
+ limits: {
83
+ maxTotalTime: number;
84
+ /** Maximum execution time per agent (ms) */
85
+ timeoutPerAgent: number;
86
+ /** Maximum memory per agent (MB) */
87
+ maxMemoryMB?: number;
88
+ /** Maximum output size (characters) */
89
+ maxOutputSize?: number;
90
+ };
91
+ };
92
+ /**
93
+ * Tournament: Agents compete, best wins
94
+ */
95
+ TOURNAMENT: {
96
+ id: string;
97
+ name: string;
98
+ agentCount: AgentCount;
99
+ mode: ExecutionMode;
100
+ synthesis: SynthesisEngine;
101
+ limits: ExecutionLimits;
102
+ };
103
+ /**
104
+ * Sequential: One agent at a time, each builds on previous
105
+ */
106
+ SEQUENTIAL_BUILD: {
107
+ id: string;
108
+ name: string;
109
+ agentCount: AgentCount;
110
+ mode: ExecutionMode;
111
+ synthesis: SynthesisEngine;
112
+ limits: ExecutionLimits;
113
+ };
114
+ };
115
+ /**
116
+ * Helper to create a custom execution strategy
117
+ */
118
+ export declare function createExecutionStrategy(id: string, name: string, config: Partial<ExecutionStrategy>): ExecutionStrategy;
119
+ //# sourceMappingURL=execution-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-strategy.d.ts","sourceRoot":"","sources":["../../src/domains/execution-strategy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,MAAM,eAAe,GACvB,mBAAmB,GACnB,sBAAsB,GACtB,eAAe,GACf,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,eAAe,EAAE,MAAM,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AO,CAAC,iBAAiB,CAAC,GACjC,iBAAiB,CAUnB"}
@@ -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,eAA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,aAAa,CAAC,CAAC,OAAO,aAAa,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;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