codingbuddy 5.3.0 → 5.4.1

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 (47) hide show
  1. package/dist/src/agent/index.d.ts +1 -0
  2. package/dist/src/agent/index.js +1 -0
  3. package/dist/src/agent/stack-matcher.d.ts +13 -0
  4. package/dist/src/agent/stack-matcher.js +81 -0
  5. package/dist/src/collaboration/index.d.ts +0 -2
  6. package/dist/src/collaboration/index.js +1 -3
  7. package/dist/src/keyword/keyword.module.js +39 -2
  8. package/dist/src/keyword/keyword.service.d.ts +5 -0
  9. package/dist/src/keyword/keyword.service.js +90 -6
  10. package/dist/src/keyword/keyword.types.d.ts +24 -2
  11. package/dist/src/keyword/permission-forecast.d.ts +2 -0
  12. package/dist/src/keyword/permission-forecast.js +94 -0
  13. package/dist/src/mcp/handlers/agent.handler.js +1 -1
  14. package/dist/src/mcp/handlers/clarification-gate.d.ts +22 -0
  15. package/dist/src/mcp/handlers/clarification-gate.js +129 -0
  16. package/dist/src/mcp/handlers/council-scene.builder.d.ts +9 -0
  17. package/dist/src/mcp/handlers/council-scene.builder.js +115 -0
  18. package/dist/src/mcp/handlers/council-scene.types.d.ts +11 -0
  19. package/dist/src/{collaboration/council-summary.types.js → mcp/handlers/council-scene.types.js} +1 -1
  20. package/dist/src/mcp/handlers/discussion.handler.d.ts +1 -0
  21. package/dist/src/mcp/handlers/discussion.handler.js +23 -4
  22. package/dist/src/mcp/handlers/discussion.types.d.ts +12 -0
  23. package/dist/src/mcp/handlers/discussion.types.js +4 -1
  24. package/dist/src/mcp/handlers/execution-gate.d.ts +29 -0
  25. package/dist/src/mcp/handlers/execution-gate.js +49 -0
  26. package/dist/src/mcp/handlers/index.d.ts +1 -0
  27. package/dist/src/mcp/handlers/index.js +3 -1
  28. package/dist/src/mcp/handlers/mode.handler.d.ts +5 -0
  29. package/dist/src/mcp/handlers/mode.handler.js +127 -2
  30. package/dist/src/mcp/handlers/planning-contract.d.ts +2 -0
  31. package/dist/src/mcp/handlers/planning-contract.js +28 -0
  32. package/dist/src/mcp/handlers/planning-stage.d.ts +20 -0
  33. package/dist/src/mcp/handlers/planning-stage.js +58 -0
  34. package/dist/src/mcp/handlers/review-pr.handler.d.ts +12 -0
  35. package/dist/src/mcp/handlers/review-pr.handler.js +81 -0
  36. package/dist/src/mcp/mcp.module.js +1 -0
  37. package/dist/src/shared/version.d.ts +1 -1
  38. package/dist/src/shared/version.js +1 -1
  39. package/dist/src/ship/review-pr.service.d.ts +15 -0
  40. package/dist/src/ship/review-pr.service.js +136 -0
  41. package/dist/src/ship/review-pr.types.d.ts +21 -0
  42. package/dist/src/ship/review-pr.types.js +3 -0
  43. package/dist/src/ship/ship.module.js +5 -2
  44. package/package.json +2 -2
  45. package/dist/src/collaboration/council-summary.service.d.ts +0 -2
  46. package/dist/src/collaboration/council-summary.service.js +0 -114
  47. package/dist/src/collaboration/council-summary.types.d.ts +0 -24
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLARIFICATION_TOPICS = exports.MIN_PROMPT_LENGTH = exports.DEFAULT_QUESTION_BUDGET = void 0;
4
+ exports.hasOverridePhrase = hasOverridePhrase;
5
+ exports.hasVagueIntent = hasVagueIntent;
6
+ exports.hasTechnicalReference = hasTechnicalReference;
7
+ exports.evaluateClarification = evaluateClarification;
8
+ exports.DEFAULT_QUESTION_BUDGET = 3;
9
+ exports.MIN_PROMPT_LENGTH = 20;
10
+ const OVERRIDE_PHRASE_PATTERNS = [
11
+ /\bjust\s+do\s+it\b/i,
12
+ /\buse\s+your\s+(?:judg(?:e)?ment|best\s+guess|discretion)\b/i,
13
+ /\bgo\s+ahead\b/i,
14
+ /\bmake\s+assumptions?\b/i,
15
+ /\bassume\s+(?:whatever|defaults?|reasonable)\b/i,
16
+ /알아서\s*(?:해|진행|처리)/,
17
+ /그냥\s*(?:해|진행)/,
18
+ /임의로\s*(?:해|진행)/,
19
+ ];
20
+ const VAGUE_INTENT_PATTERNS = [
21
+ /\bimprove\b/i,
22
+ /\b(?:make\s+it\s+)?better\b/i,
23
+ /\benhance\b/i,
24
+ /\boptimi[sz]e\b/i,
25
+ /\brefactor\b/i,
26
+ /\bclean\s*up\b/i,
27
+ /\btweak\b/i,
28
+ /\bfix\s+(?:stuff|things|issues?)\b/i,
29
+ /개선/,
30
+ /향상/,
31
+ /최적화/,
32
+ /정리/,
33
+ /개량/,
34
+ ];
35
+ const TECHNICAL_REFERENCE_PATTERNS = [
36
+ /\.(?:ts|tsx|js|jsx|mjs|cjs|py|go|rs|java|kt|swift|rb|php|c|cpp|h|hpp|cs|md|mdx|json|ya?ml|toml|sql|sh|bash|zsh|vue|svelte|html|css|scss|sass|less)\b/i,
37
+ /(?:^|[\s([`"'])[\w.-]+\/[\w.\-/]+/,
38
+ /\b[a-zA-Z_][\w]*\(/,
39
+ /\b[A-Z][a-zA-Z0-9]*[A-Z][a-zA-Z0-9]+\b/,
40
+ /\b[a-z][a-z0-9]+[A-Z][a-zA-Z0-9]+\b/,
41
+ /\b[a-z]+_[a-z][a-z0-9_]*\b/,
42
+ /`[^`]+`/,
43
+ ];
44
+ function hasOverridePhrase(prompt) {
45
+ return OVERRIDE_PHRASE_PATTERNS.some(pattern => pattern.test(prompt));
46
+ }
47
+ function hasVagueIntent(prompt) {
48
+ return VAGUE_INTENT_PATTERNS.some(pattern => pattern.test(prompt));
49
+ }
50
+ function hasTechnicalReference(prompt) {
51
+ return TECHNICAL_REFERENCE_PATTERNS.some(pattern => pattern.test(prompt));
52
+ }
53
+ exports.CLARIFICATION_TOPICS = {
54
+ VAGUE_INTENT: 'vague-intent',
55
+ TARGET_ARTIFACT: 'target-artifact',
56
+ REQUEST_SCOPE: 'request-scope',
57
+ };
58
+ const TOPIC_PRIORITY = [
59
+ exports.CLARIFICATION_TOPICS.VAGUE_INTENT,
60
+ exports.CLARIFICATION_TOPICS.TARGET_ARTIFACT,
61
+ exports.CLARIFICATION_TOPICS.REQUEST_SCOPE,
62
+ ];
63
+ function buildNextQuestion(topics) {
64
+ if (topics.includes(exports.CLARIFICATION_TOPICS.VAGUE_INTENT)) {
65
+ return 'What concrete change are you targeting — which behavior, file, or metric should differ after this task?';
66
+ }
67
+ if (topics.includes(exports.CLARIFICATION_TOPICS.TARGET_ARTIFACT)) {
68
+ return 'Which file, function, module, or component should this change apply to?';
69
+ }
70
+ if (topics.includes(exports.CLARIFICATION_TOPICS.REQUEST_SCOPE)) {
71
+ return 'Can you describe the goal, inputs, and expected outcome in a bit more detail?';
72
+ }
73
+ return 'Can you clarify the scope and success criteria of this request?';
74
+ }
75
+ function sortTopicsByPriority(topics) {
76
+ return TOPIC_PRIORITY.filter(topic => topics.has(topic));
77
+ }
78
+ function evaluateClarification(prompt, options = {}) {
79
+ const budget = options.questionBudget ?? exports.DEFAULT_QUESTION_BUDGET;
80
+ const trimmed = (prompt ?? '').trim();
81
+ if (budget <= 0) {
82
+ return {
83
+ clarificationNeeded: false,
84
+ planReady: true,
85
+ questionBudget: 0,
86
+ assumptionNote: 'Clarification budget exhausted. Proceeding with explicit assumptions — state each assumption clearly in the plan using "assuming …" language so the user can correct course.',
87
+ };
88
+ }
89
+ if (hasOverridePhrase(trimmed)) {
90
+ return {
91
+ clarificationNeeded: false,
92
+ planReady: true,
93
+ questionBudget: budget,
94
+ };
95
+ }
96
+ const hasTech = hasTechnicalReference(trimmed);
97
+ if (hasTech) {
98
+ return {
99
+ clarificationNeeded: false,
100
+ planReady: true,
101
+ questionBudget: budget,
102
+ };
103
+ }
104
+ const topics = new Set();
105
+ if (hasVagueIntent(trimmed)) {
106
+ topics.add(exports.CLARIFICATION_TOPICS.VAGUE_INTENT);
107
+ topics.add(exports.CLARIFICATION_TOPICS.TARGET_ARTIFACT);
108
+ }
109
+ if (trimmed.length > 0 && trimmed.length < exports.MIN_PROMPT_LENGTH) {
110
+ topics.add(exports.CLARIFICATION_TOPICS.REQUEST_SCOPE);
111
+ topics.add(exports.CLARIFICATION_TOPICS.TARGET_ARTIFACT);
112
+ }
113
+ if (topics.size === 0) {
114
+ return {
115
+ clarificationNeeded: false,
116
+ planReady: true,
117
+ questionBudget: budget,
118
+ };
119
+ }
120
+ const orderedTopics = sortTopicsByPriority(topics);
121
+ return {
122
+ clarificationNeeded: true,
123
+ planReady: false,
124
+ questionBudget: budget - 1,
125
+ nextQuestion: buildNextQuestion(orderedTopics),
126
+ clarificationTopics: orderedTopics,
127
+ };
128
+ }
129
+ //# sourceMappingURL=clarification-gate.js.map
@@ -0,0 +1,9 @@
1
+ import type { CouncilScene } from './council-scene.types';
2
+ import type { CouncilPreset } from '../../agent/council-preset.types';
3
+ import type { Mode, VisualData } from '../../keyword/keyword.types';
4
+ export interface CouncilSceneFallback {
5
+ delegatesTo?: string;
6
+ specialists?: string[];
7
+ }
8
+ export declare function buildCouncilSceneInstructions(councilScene?: CouncilScene): string | undefined;
9
+ export declare function buildCouncilScene(mode: Mode, councilPreset: CouncilPreset | undefined, visual: VisualData | undefined, fallback?: CouncilSceneFallback): CouncilScene | undefined;
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildCouncilSceneInstructions = buildCouncilSceneInstructions;
4
+ exports.buildCouncilScene = buildCouncilScene;
5
+ const DEFAULT_FACE = '●‿●';
6
+ const MODERATOR_COPY = {
7
+ PLAN: 'Council assembled — let us design this together.',
8
+ EVAL: 'Review council convened — specialists are ready.',
9
+ AUTO: 'Autonomous council activated — full cycle begins.',
10
+ };
11
+ function buildCouncilSceneInstructions(councilScene) {
12
+ if (!councilScene?.enabled || !councilScene.cast?.length) {
13
+ return undefined;
14
+ }
15
+ const castLines = councilScene.cast.map(m => `${m.face} ${m.name} [${m.role}]`).join('\n');
16
+ return (`\n\n📋 COUNCIL SCENE — Render this at the start of your first response, ` +
17
+ `right after the mode header:\n\n` +
18
+ `${councilScene.moderatorCopy}\n${castLines}\n\n` +
19
+ `Then proceed with your normal ${councilScene.format || 'standard'} mode response.`);
20
+ }
21
+ function buildCouncilScene(mode, councilPreset, visual, fallback) {
22
+ if (mode === 'ACT') {
23
+ return undefined;
24
+ }
25
+ const moderatorCopy = MODERATOR_COPY[mode];
26
+ if (!moderatorCopy) {
27
+ return undefined;
28
+ }
29
+ const cast = buildCast(councilPreset, visual, fallback);
30
+ if (cast.length === 0) {
31
+ return undefined;
32
+ }
33
+ return {
34
+ enabled: true,
35
+ cast,
36
+ moderatorCopy,
37
+ format: 'tiny-actor-grid',
38
+ };
39
+ }
40
+ function buildCast(councilPreset, visual, fallback) {
41
+ const faceLookup = new Map();
42
+ if (visual?.agents) {
43
+ for (const agent of visual.agents) {
44
+ faceLookup.set(agent.name, agent.face);
45
+ const slug = agent.name.toLowerCase().replace(/\s+/g, '-');
46
+ faceLookup.set(slug, agent.face);
47
+ }
48
+ }
49
+ if (councilPreset) {
50
+ return buildCastFromPreset(councilPreset, faceLookup);
51
+ }
52
+ if (visual?.agents?.length) {
53
+ return buildCastFromVisual(visual.agents);
54
+ }
55
+ if (fallback?.delegatesTo) {
56
+ return buildCastFromFallback(fallback, faceLookup);
57
+ }
58
+ return [];
59
+ }
60
+ function buildCastFromPreset(preset, faceLookup) {
61
+ const cast = [];
62
+ cast.push({
63
+ name: preset.primary,
64
+ role: 'primary',
65
+ face: faceLookup.get(preset.primary) ?? DEFAULT_FACE,
66
+ });
67
+ for (const specialist of preset.specialists) {
68
+ cast.push({
69
+ name: specialist,
70
+ role: 'specialist',
71
+ face: faceLookup.get(specialist) ?? DEFAULT_FACE,
72
+ });
73
+ }
74
+ return cast;
75
+ }
76
+ function buildCastFromVisual(agents) {
77
+ const [first, ...rest] = agents;
78
+ const cast = [];
79
+ if (first) {
80
+ cast.push({
81
+ name: first.name,
82
+ role: 'primary',
83
+ face: first.face || DEFAULT_FACE,
84
+ });
85
+ }
86
+ for (const agent of rest) {
87
+ cast.push({
88
+ name: agent.name,
89
+ role: 'specialist',
90
+ face: agent.face || DEFAULT_FACE,
91
+ });
92
+ }
93
+ return cast;
94
+ }
95
+ function buildCastFromFallback(fallback, faceLookup) {
96
+ const cast = [];
97
+ if (fallback.delegatesTo) {
98
+ cast.push({
99
+ name: fallback.delegatesTo,
100
+ role: 'primary',
101
+ face: faceLookup.get(fallback.delegatesTo) ?? DEFAULT_FACE,
102
+ });
103
+ }
104
+ if (fallback.specialists) {
105
+ for (const specialist of fallback.specialists) {
106
+ cast.push({
107
+ name: specialist,
108
+ role: 'specialist',
109
+ face: faceLookup.get(specialist) ?? DEFAULT_FACE,
110
+ });
111
+ }
112
+ }
113
+ return cast;
114
+ }
115
+ //# sourceMappingURL=council-scene.builder.js.map
@@ -0,0 +1,11 @@
1
+ export interface CouncilSceneCastMember {
2
+ name: string;
3
+ role: 'primary' | 'specialist';
4
+ face: string;
5
+ }
6
+ export interface CouncilScene {
7
+ enabled: boolean;
8
+ cast: CouncilSceneCastMember[];
9
+ moderatorCopy: string;
10
+ format: 'tiny-actor-grid';
11
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=council-summary.types.js.map
3
+ //# sourceMappingURL=council-scene.types.js.map
@@ -9,6 +9,7 @@ export declare class DiscussionHandler extends AbstractHandler {
9
9
  protected handleTool(toolName: string, args: Record<string, unknown> | undefined): Promise<ToolResponse>;
10
10
  getToolDefinitions(): ToolDefinition[];
11
11
  private handleAgentDiscussion;
12
+ private isExperimentalEnabled;
12
13
  private collectOpinions;
13
14
  private generateOpinion;
14
15
  private detectConsensus;
@@ -47,9 +47,12 @@ let DiscussionHandler = class DiscussionHandler extends abstract_handler_1.Abstr
47
47
  return [
48
48
  {
49
49
  name: 'agent_discussion',
50
- description: 'Conduct a structured discussion among specialist agents on a given topic. ' +
51
- 'Collects opinions from each specialist, detects consensus or disagreement, ' +
52
- 'and returns a structured summary with severity assessments.',
50
+ description: '[EXPERIMENTAL disabled by default] Produces templated synthesis of ' +
51
+ 'specialist opinions, not real specialist execution. The output does ' +
52
+ 'not reflect collective intelligence from live agents; treat it as a ' +
53
+ 'placeholder until the rebuild lands. Enable by setting ' +
54
+ `${discussion_types_1.EXPERIMENTAL_DISCUSSION_ENV}=1. When disabled, the tool returns ` +
55
+ '{disabled: true} without invoking synthesis.',
53
56
  inputSchema: {
54
57
  type: 'object',
55
58
  properties: {
@@ -74,6 +77,14 @@ let DiscussionHandler = class DiscussionHandler extends abstract_handler_1.Abstr
74
77
  ];
75
78
  }
76
79
  async handleAgentDiscussion(args) {
80
+ if (!this.isExperimentalEnabled()) {
81
+ const disabled = {
82
+ disabled: true,
83
+ reason: discussion_types_1.DISABLED_DISCUSSION_REASON,
84
+ experimentalFlag: discussion_types_1.EXPERIMENTAL_DISCUSSION_ENV,
85
+ };
86
+ return (0, response_utils_1.createJsonResponse)(disabled);
87
+ }
77
88
  const topic = (0, validation_constants_1.extractRequiredString)(args, 'topic');
78
89
  if (topic === null) {
79
90
  return (0, response_utils_1.createErrorResponse)('Missing required parameter: topic');
@@ -87,7 +98,7 @@ let DiscussionHandler = class DiscussionHandler extends abstract_handler_1.Abstr
87
98
  const consensus = this.detectConsensus(opinions);
88
99
  const maxSeverity = this.computeMaxSeverity(opinions);
89
100
  const summary = this.generateSummary(topic, opinions, consensus);
90
- const result = {
101
+ const base = {
91
102
  topic,
92
103
  specialists,
93
104
  opinions,
@@ -95,6 +106,11 @@ let DiscussionHandler = class DiscussionHandler extends abstract_handler_1.Abstr
95
106
  summary,
96
107
  maxSeverity,
97
108
  };
109
+ const result = {
110
+ ...base,
111
+ experimental: true,
112
+ warning: discussion_types_1.EXPERIMENTAL_DISCUSSION_WARNING,
113
+ };
98
114
  try {
99
115
  const timestamp = new Date().toISOString();
100
116
  for (const specialist of specialists) {
@@ -109,6 +125,9 @@ let DiscussionHandler = class DiscussionHandler extends abstract_handler_1.Abstr
109
125
  }
110
126
  return (0, response_utils_1.createJsonResponse)(result);
111
127
  }
128
+ isExperimentalEnabled() {
129
+ return process.env[discussion_types_1.EXPERIMENTAL_DISCUSSION_ENV] === '1';
130
+ }
112
131
  collectOpinions(topic, specialists, context) {
113
132
  return specialists.map(agent => this.generateOpinion(agent, topic, context));
114
133
  }
@@ -16,3 +16,15 @@ export interface DiscussionResult {
16
16
  maxSeverity: OpinionSeverity;
17
17
  }
18
18
  export declare const VALID_SEVERITIES: readonly OpinionSeverity[];
19
+ export declare const EXPERIMENTAL_DISCUSSION_ENV = "CODINGBUDDY_EXPERIMENTAL_DISCUSSION";
20
+ export declare const EXPERIMENTAL_DISCUSSION_WARNING = "\u26A0\uFE0F experimental \u2014 templated synthesis, not real specialist execution";
21
+ export declare const DISABLED_DISCUSSION_REASON = "templated synthesis not aligned with collective intelligence promise";
22
+ export interface DisabledDiscussionResult {
23
+ disabled: true;
24
+ reason: string;
25
+ experimentalFlag: string;
26
+ }
27
+ export interface ExperimentalDiscussionResult extends DiscussionResult {
28
+ experimental: true;
29
+ warning: string;
30
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VALID_SEVERITIES = void 0;
3
+ exports.DISABLED_DISCUSSION_REASON = exports.EXPERIMENTAL_DISCUSSION_WARNING = exports.EXPERIMENTAL_DISCUSSION_ENV = exports.VALID_SEVERITIES = void 0;
4
4
  exports.VALID_SEVERITIES = [
5
5
  'info',
6
6
  'low',
@@ -8,4 +8,7 @@ exports.VALID_SEVERITIES = [
8
8
  'high',
9
9
  'critical',
10
10
  ];
11
+ exports.EXPERIMENTAL_DISCUSSION_ENV = 'CODINGBUDDY_EXPERIMENTAL_DISCUSSION';
12
+ exports.EXPERIMENTAL_DISCUSSION_WARNING = '\u26a0\ufe0f experimental — templated synthesis, not real specialist execution';
13
+ exports.DISABLED_DISCUSSION_REASON = 'templated synthesis not aligned with collective intelligence promise';
11
14
  //# sourceMappingURL=discussion.types.js.map
@@ -0,0 +1,29 @@
1
+ import type { ClarificationMetadata } from './clarification-gate';
2
+ import type { PlanningStageMetadata } from './planning-stage';
3
+ export interface ExecutionGate {
4
+ gated: boolean;
5
+ reason: string;
6
+ unblockCondition?: string;
7
+ deferredSpecialists?: string[];
8
+ }
9
+ export interface ExecutionGateInput {
10
+ clarification: ClarificationMetadata;
11
+ planningStage?: PlanningStageMetadata;
12
+ specialists?: string[];
13
+ }
14
+ export declare function evaluateExecutionGate(input: ExecutionGateInput): ExecutionGate;
15
+ interface GatedParallelRecommendation {
16
+ specialists: string[];
17
+ hint: string;
18
+ dispatch?: string;
19
+ suggestedStack?: string;
20
+ stackBased?: boolean;
21
+ }
22
+ export interface GatedResponseFields<D = unknown, E = unknown> {
23
+ dispatchReady?: D;
24
+ parallelAgentsRecommendation?: GatedParallelRecommendation;
25
+ executionPlan?: E;
26
+ }
27
+ export type SuppressedResponseFields<D = unknown, E = unknown> = GatedResponseFields<D, E>;
28
+ export declare function suppressDispatchWhileGated<D, E>(gate: ExecutionGate | undefined, fields: GatedResponseFields<D, E>): SuppressedResponseFields<D, E>;
29
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.evaluateExecutionGate = evaluateExecutionGate;
4
+ exports.suppressDispatchWhileGated = suppressDispatchWhileGated;
5
+ const GATED_STAGES = new Set(['discover', 'design']);
6
+ function evaluateExecutionGate(input) {
7
+ const { clarification, planningStage, specialists } = input;
8
+ if (clarification.planReady) {
9
+ return {
10
+ gated: false,
11
+ reason: 'Request is clear — full specialist dispatch permitted.',
12
+ };
13
+ }
14
+ if (clarification.clarificationNeeded) {
15
+ return buildGatedResult('Request is ambiguous — specialist dispatch deferred until clarification is resolved.', 'Resolve clarification questions or provide an explicit override (e.g., "just do it").', specialists);
16
+ }
17
+ if (planningStage && GATED_STAGES.has(planningStage.currentStage)) {
18
+ const stageName = planningStage.currentStage;
19
+ return buildGatedResult(`Currently in ${stageName} stage — specialist dispatch deferred until plan stage.`, stageName === 'discover'
20
+ ? 'Confirm direction to proceed through Design to Plan.'
21
+ : 'Confirm approach to proceed to Plan.', specialists);
22
+ }
23
+ return {
24
+ gated: false,
25
+ reason: 'Execution permitted — no gating conditions active.',
26
+ };
27
+ }
28
+ function suppressDispatchWhileGated(gate, fields) {
29
+ if (!gate || !gate.gated) {
30
+ return fields;
31
+ }
32
+ const result = {};
33
+ if (fields.parallelAgentsRecommendation) {
34
+ result.parallelAgentsRecommendation = {
35
+ ...fields.parallelAgentsRecommendation,
36
+ dispatch: 'deferred',
37
+ };
38
+ }
39
+ return result;
40
+ }
41
+ function buildGatedResult(reason, unblockCondition, specialists) {
42
+ return {
43
+ gated: true,
44
+ reason,
45
+ unblockCondition,
46
+ ...(specialists?.length && { deferredSpecialists: [...specialists] }),
47
+ };
48
+ }
49
+ //# sourceMappingURL=execution-gate.js.map
@@ -20,4 +20,5 @@ export { QualityReportHandler } from './quality-report.handler';
20
20
  export { BriefingHandler } from './briefing.handler';
21
21
  export { ResumeHandler } from './resume.handler';
22
22
  export { RuleImpactHandler } from './rule-impact.handler';
23
+ export { ReviewPrHandler } from './review-pr.handler';
23
24
  export declare const TOOL_HANDLERS = "TOOL_HANDLERS";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOOL_HANDLERS = exports.RuleImpactHandler = exports.ResumeHandler = exports.BriefingHandler = exports.QualityReportHandler = exports.ReleaseCheckHandler = exports.PluginValidationHandler = exports.ImpactHandler = exports.RuleInsightsHandler = exports.ContextArchiveHandler = exports.PipelineHandler = exports.ParallelValidationHandler = exports.DiscussionHandler = exports.TuiHandler = exports.ContextDocumentHandler = exports.ConventionsHandler = exports.ChecklistContextHandler = exports.ModeHandler = exports.AgentHandler = exports.SkillHandler = exports.ConfigHandler = exports.RulesHandler = void 0;
3
+ exports.TOOL_HANDLERS = exports.ReviewPrHandler = exports.RuleImpactHandler = exports.ResumeHandler = exports.BriefingHandler = exports.QualityReportHandler = exports.ReleaseCheckHandler = exports.PluginValidationHandler = exports.ImpactHandler = exports.RuleInsightsHandler = exports.ContextArchiveHandler = exports.PipelineHandler = exports.ParallelValidationHandler = exports.DiscussionHandler = exports.TuiHandler = exports.ContextDocumentHandler = exports.ConventionsHandler = exports.ChecklistContextHandler = exports.ModeHandler = exports.AgentHandler = exports.SkillHandler = exports.ConfigHandler = exports.RulesHandler = void 0;
4
4
  var rules_handler_1 = require("./rules.handler");
5
5
  Object.defineProperty(exports, "RulesHandler", { enumerable: true, get: function () { return rules_handler_1.RulesHandler; } });
6
6
  var config_handler_1 = require("./config.handler");
@@ -43,5 +43,7 @@ var resume_handler_1 = require("./resume.handler");
43
43
  Object.defineProperty(exports, "ResumeHandler", { enumerable: true, get: function () { return resume_handler_1.ResumeHandler; } });
44
44
  var rule_impact_handler_1 = require("./rule-impact.handler");
45
45
  Object.defineProperty(exports, "RuleImpactHandler", { enumerable: true, get: function () { return rule_impact_handler_1.RuleImpactHandler; } });
46
+ var review_pr_handler_1 = require("./review-pr.handler");
47
+ Object.defineProperty(exports, "ReviewPrHandler", { enumerable: true, get: function () { return review_pr_handler_1.ReviewPrHandler; } });
46
48
  exports.TOOL_HANDLERS = 'TOOL_HANDLERS';
47
49
  //# sourceMappingURL=index.js.map
@@ -36,7 +36,12 @@ export declare class ModeHandler extends AbstractHandler {
36
36
  private buildDispatchReady;
37
37
  private buildDeepThinkingInstructions;
38
38
  private buildPlanReviewGate;
39
+ private buildClarificationMetadata;
40
+ private buildExecutionGate;
41
+ private buildClarificationFirstInstructions;
42
+ private buildPlanningStageMetadata;
39
43
  private buildAgentDiscussion;
44
+ private buildReviewContext;
40
45
  private buildVisual;
41
46
  private resolveTeamsCapability;
42
47
  private buildExecutionPlan;