@dv.nghiem/flowdeck 0.4.8 → 0.4.10
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/agents/default-executor.d.ts +3 -0
- package/dist/agents/default-executor.d.ts.map +1 -0
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/researcher.d.ts.map +1 -1
- package/dist/config/schema.d.ts +10 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/hooks/event-log-hook.d.ts +4 -3
- package/dist/hooks/event-log-hook.d.ts.map +1 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts +12 -6
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1299 -198
- package/dist/lib/confirmation.d.ts +9 -1
- package/dist/lib/confirmation.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +9 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/services/event-logger.d.ts +4 -1
- package/dist/services/event-logger.d.ts.map +1 -1
- package/dist/services/loop-detector.d.ts +47 -0
- package/dist/services/loop-detector.d.ts.map +1 -0
- package/dist/tools/merge-assist.d.ts +54 -0
- package/dist/tools/merge-assist.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/commands/fd-execute.md +6 -0
- package/src/commands/fd-fix-bug.md +7 -1
- package/src/commands/fd-merge-assist.md +180 -0
- package/src/commands/fd-plan.md +7 -1
- package/src/rules/common/agent-orchestration.md +88 -30
- package/src/skills/merge-assist/SKILL.md +232 -0
|
@@ -2,8 +2,9 @@ export interface ConfirmationResponse {
|
|
|
2
2
|
success: boolean;
|
|
3
3
|
message: string;
|
|
4
4
|
status: "AWAITING_CONFIRM";
|
|
5
|
-
confirm_mode: "y/n";
|
|
5
|
+
confirm_mode: "y/n" | "multi-choice";
|
|
6
6
|
operation: string;
|
|
7
|
+
choices?: string[];
|
|
7
8
|
[key: string]: unknown;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
@@ -12,6 +13,13 @@ export interface ConfirmationResponse {
|
|
|
12
13
|
* @param message - User-facing prompt message
|
|
13
14
|
*/
|
|
14
15
|
export declare function confirmPrompt(operation: string, message: string): ConfirmationResponse;
|
|
16
|
+
/**
|
|
17
|
+
* Generate AWAITING_CONFIRM response for multi-choice prompt.
|
|
18
|
+
* @param operation - Short identifier for the operation
|
|
19
|
+
* @param message - User-facing prompt message
|
|
20
|
+
* @param choices - Array of choice strings (e.g., ["show conflict", "attempt resolution", "abort"])
|
|
21
|
+
*/
|
|
22
|
+
export declare function multiChoiceConfirm(operation: string, message: string, choices: string[]): ConfirmationResponse;
|
|
15
23
|
/**
|
|
16
24
|
* Generate skip response when user says "no".
|
|
17
25
|
* @param operation - Short identifier for the operation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../src/lib/confirmation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,kBAAkB,CAAA;IAC1B,YAAY,EAAE,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../src/lib/confirmation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,kBAAkB,CAAA;IAC1B,YAAY,EAAE,KAAK,GAAG,cAAc,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAQtF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAS9G;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOvE"}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
* Local stdio MCPs (when installed):
|
|
11
11
|
* - codegraph codegraph serve --mcp (code knowledge graph — symbol search, call graphs, impact analysis)
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Additional local stdio MCPs (enabled by default):
|
|
14
|
+
* - memory npx -y @modelcontextprotocol/server-memory
|
|
15
|
+
* - omega-memory uvx omega-memory serve
|
|
16
|
+
* - sequential-thinking npx -y @modelcontextprotocol/server-sequential-thinking
|
|
17
|
+
* - magic npx -y @magicuidesign/mcp@latest
|
|
18
|
+
* - playwright npx -y @playwright/mcp --browser chrome
|
|
19
|
+
* - token-optimizer npx -y token-optimizer-mcp
|
|
20
|
+
*
|
|
21
|
+
* Disable individual MCPs with: FLOWDECK_DISABLE_MCP=context7,websearch,grep_app,github,codegraph,memory,omega-memory,sequential-thinking,magic,playwright,token-optimizer
|
|
14
22
|
*/
|
|
15
23
|
type RemoteMcp = {
|
|
16
24
|
type: "remote";
|
package/dist/mcp/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAoBD,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC,CA+GzE"}
|
|
@@ -12,7 +12,10 @@ export interface ToolEvent {
|
|
|
12
12
|
}
|
|
13
13
|
export declare function getCurrentAgent(): string | null;
|
|
14
14
|
export declare function setCurrentAgent(agent: string | null): void;
|
|
15
|
+
export declare function isEventLogHealthy(): boolean;
|
|
16
|
+
export declare function getLastPersistenceError(): string | null;
|
|
17
|
+
export declare function resetEventLogHealth(): void;
|
|
15
18
|
export declare function sanitizeArgs(args: unknown): Record<string, unknown>;
|
|
16
|
-
export declare function logEvent(directory: string, event: ToolEvent, log?: (msg: string) => void):
|
|
19
|
+
export declare function logEvent(directory: string, event: ToolEvent, log?: (msg: string) => void): boolean;
|
|
17
20
|
export declare function formatEventForStderr(event: ToolEvent): string;
|
|
18
21
|
//# sourceMappingURL=event-logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-logger.d.ts","sourceRoot":"","sources":["../../src/services/event-logger.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,aAAa,GAAG,YAAY,GAAG,iBAAiB,GAAG,cAAc,GAAG,eAAe,CAAA;IACzF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;
|
|
1
|
+
{"version":3,"file":"event-logger.d.ts","sourceRoot":"","sources":["../../src/services/event-logger.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,aAAa,GAAG,YAAY,GAAG,iBAAiB,GAAG,cAAc,GAAG,eAAe,CAAA;IACzF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAYD,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE1D;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAEvD;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBnE;AAkBD,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CA+BlG;AAwBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAqD7D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type LoopResult = {
|
|
2
|
+
action: "allow";
|
|
3
|
+
} | {
|
|
4
|
+
action: "block";
|
|
5
|
+
reason: string;
|
|
6
|
+
escalationMessage: string;
|
|
7
|
+
} | {
|
|
8
|
+
action: "warn";
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export interface LoopDetectorConfig {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
maxRepeats: number;
|
|
14
|
+
similarityThreshold: number;
|
|
15
|
+
historySize: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ActionRecord {
|
|
18
|
+
toolName: string;
|
|
19
|
+
normalizedKey: string;
|
|
20
|
+
args: Record<string, unknown>;
|
|
21
|
+
outputHash: string;
|
|
22
|
+
outputPreview: string;
|
|
23
|
+
status: "success" | "error" | "blocked";
|
|
24
|
+
timestamp: number;
|
|
25
|
+
callCount: number;
|
|
26
|
+
consecutiveSameResultCount: number;
|
|
27
|
+
}
|
|
28
|
+
export declare function normalizeAction(toolName: string, args: Record<string, unknown>): string;
|
|
29
|
+
export declare class LoopDetector {
|
|
30
|
+
private config;
|
|
31
|
+
private appLog?;
|
|
32
|
+
private history;
|
|
33
|
+
private persistenceHealthy;
|
|
34
|
+
private persistenceWarningLogged;
|
|
35
|
+
constructor(config?: Partial<LoopDetectorConfig>, appLog?: (msg: string) => void);
|
|
36
|
+
setPersistenceHealthy(healthy: boolean): void;
|
|
37
|
+
getHistory(sessionId: string): ActionRecord[];
|
|
38
|
+
clearSession(sessionId: string): void;
|
|
39
|
+
checkBefore(toolName: string, args: Record<string, unknown>, sessionId: string): LoopResult;
|
|
40
|
+
recordAfter(toolName: string, args: Record<string, unknown>, output: unknown, sessionId: string, status?: "success" | "error" | "blocked"): void;
|
|
41
|
+
private getSessionRecord;
|
|
42
|
+
private setSessionRecord;
|
|
43
|
+
private evictOldest;
|
|
44
|
+
private isNoProgressMarker;
|
|
45
|
+
private buildEscalationMessage;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=loop-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-detector.d.ts","sourceRoot":"","sources":["../../src/services/loop-detector.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAClB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,0BAA0B,EAAE,MAAM,CAAA;CACnC;AA4FD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmCvF;AA2FD,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,MAAM,CAAC,CAAuB;IACtC,OAAO,CAAC,OAAO,CAAoD;IACnE,OAAO,CAAC,kBAAkB,CAAO;IACjC,OAAO,CAAC,wBAAwB,CAAoB;gBAExC,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI;IAKhF,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAU7C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE;IAM7C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;IAiE3F,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,SAAS,GAAG,OAAO,GAAG,SAAqB,GAClD,IAAI;IAiEP,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,sBAAsB;CAU/B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
export interface MergeAssistSession {
|
|
3
|
+
id: string;
|
|
4
|
+
targetBranch: string;
|
|
5
|
+
sourceBranch: string;
|
|
6
|
+
featureDescription: string;
|
|
7
|
+
integrationBranch?: string;
|
|
8
|
+
status: "clarifying" | "inspecting" | "planning" | "awaiting_confirmation" | "executing" | "conflict" | "completed" | "aborted";
|
|
9
|
+
candidateCommits: CandidateCommit[];
|
|
10
|
+
selectedCommits: string[];
|
|
11
|
+
dependentCommits: string[];
|
|
12
|
+
mergePlan?: MergePlan;
|
|
13
|
+
confirmations: ConfirmationRecord[];
|
|
14
|
+
conflicts?: ConflictInfo[];
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CandidateCommit {
|
|
19
|
+
sha: string;
|
|
20
|
+
subject: string;
|
|
21
|
+
author: string;
|
|
22
|
+
date: string;
|
|
23
|
+
files: string[];
|
|
24
|
+
isLikelyFeature: boolean;
|
|
25
|
+
confidence: "high" | "medium" | "low";
|
|
26
|
+
}
|
|
27
|
+
export interface MergePlan {
|
|
28
|
+
targetBranch: string;
|
|
29
|
+
sourceBranch: string;
|
|
30
|
+
integrationBranch: string;
|
|
31
|
+
selectedCommits: string[];
|
|
32
|
+
method: "cherry-pick" | "cherry-pick-range" | "manual-port" | "abort";
|
|
33
|
+
risks: string[];
|
|
34
|
+
recommendedCommands: string[];
|
|
35
|
+
dryRun: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ConfirmationRecord {
|
|
38
|
+
step: string;
|
|
39
|
+
prompt: string;
|
|
40
|
+
status: "pending" | "approved" | "rejected";
|
|
41
|
+
requestedAt: string;
|
|
42
|
+
resolvedAt?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ConflictInfo {
|
|
45
|
+
file: string;
|
|
46
|
+
commitSha: string;
|
|
47
|
+
description: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function findCandidateCommits(cwd: string, sourceBranch: string, targetBranch: string): CandidateCommit[];
|
|
50
|
+
export declare function detectDependencies(candidateCommits: CandidateCommit[]): string[];
|
|
51
|
+
export declare function recommendMethod(candidateCommits: CandidateCommit[], selectedCommits: string[]): MergePlan["method"];
|
|
52
|
+
export declare function generateRecommendedCommands(plan: MergePlan): string[];
|
|
53
|
+
export declare const mergeAssistTool: ToolDefinition;
|
|
54
|
+
//# sourceMappingURL=merge-assist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-assist.d.ts","sourceRoot":"","sources":["../../src/tools/merge-assist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAW/D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,UAAU,GAAG,uBAAuB,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAA;IAC/H,gBAAgB,EAAE,eAAe,EAAE,CAAA;IACnC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,aAAa,EAAE,kBAAkB,EAAE,CAAA;IACnC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,eAAe,EAAE,OAAO,CAAA;IACxB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;CACtC;AAED,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,MAAM,EAAE,aAAa,GAAG,mBAAmB,GAAG,aAAa,GAAG,OAAO,CAAA;IACrE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,mBAAmB,EAAE,MAAM,EAAE,CAAA;IAC7B,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC3C,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB;AAsHD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,eAAe,EAAE,CAwB/G;AAED,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CA4BhF;AAED,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,eAAe,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,CAmBnH;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,CAqCrE;AA8CD,eAAO,MAAM,eAAe,EAAE,cA2N5B,CAAA"}
|
package/package.json
CHANGED
|
@@ -44,6 +44,12 @@ If research is stale or missing:
|
|
|
44
44
|
- Log which sources were consulted and what evidence was gathered
|
|
45
45
|
|
|
46
46
|
> **MCP integration:** When implementation requires external library knowledge, invoke configured MCP tools as part of the research pass.
|
|
47
|
+
> - **context7** — library docs lookup (first choice for API/docs questions)
|
|
48
|
+
> - **sequential-thinking** — break down complex implementation steps
|
|
49
|
+
> - **memory / omega-memory** — retrieve prior context from planning or earlier phases
|
|
50
|
+
> - **magic** — UI/design system reference for frontend tasks
|
|
51
|
+
> - **playwright** — verify browser behavior for frontend implementations
|
|
52
|
+
> - **token-optimizer** — compress large context when passing research to implementation agents
|
|
47
53
|
|
|
48
54
|
### Step 1: Guard Check
|
|
49
55
|
|
|
@@ -60,7 +60,13 @@ If research is stale or missing:
|
|
|
60
60
|
- Persist results to STATE.md for future reuse
|
|
61
61
|
- Log which sources were consulted and what evidence was gathered
|
|
62
62
|
|
|
63
|
-
> **MCP integration:** When the bug involves external APIs or libraries, invoke configured MCP tools
|
|
63
|
+
> **MCP integration:** When the bug involves external APIs or libraries, invoke configured MCP tools to research known failure modes.
|
|
64
|
+
> - **context7** — library docs lookup (first choice for API/docs questions)
|
|
65
|
+
> - **sequential-thinking** — stepwise root cause analysis for complex bugs
|
|
66
|
+
> - **memory / omega-memory** — retrieve prior bug fixes or related context
|
|
67
|
+
> - **magic** — design system issues for UI bugs
|
|
68
|
+
> - **playwright** — reproduce and verify browser-specific bugs
|
|
69
|
+
> - **token-optimizer** — compress large stack traces or logs before analysis
|
|
64
70
|
|
|
65
71
|
### Steps 1-2: Explore & Research
|
|
66
72
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start a human-in-the-loop selective merge workflow to bring a specific feature from one branch to another
|
|
3
|
+
argument-hint: [feature description or source branch]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Merge Assist
|
|
7
|
+
|
|
8
|
+
Bring a specific feature from one branch to another using selective cherry-pick or manual port, with mandatory human confirmation at every gate.
|
|
9
|
+
|
|
10
|
+
**Input:** $ARGUMENTS — feature description, source branch name, or both (e.g., "OAuth login from feature/oauth")
|
|
11
|
+
|
|
12
|
+
## Pre-flight
|
|
13
|
+
|
|
14
|
+
1. Verify this is a git repository. If not, error:
|
|
15
|
+
> "This command requires a git repository."
|
|
16
|
+
|
|
17
|
+
2. Parse $ARGUMENTS to identify:
|
|
18
|
+
- **Feature description** — what is being moved
|
|
19
|
+
- **Source branch** — where it currently lives
|
|
20
|
+
- **Target branch** — where it should land (default: current branch or `main`)
|
|
21
|
+
|
|
22
|
+
If $ARGUMENTS is ambiguous, ask:
|
|
23
|
+
> "Which branch contains the feature you want to bring?"
|
|
24
|
+
> "Which branch should it land on?"
|
|
25
|
+
|
|
26
|
+
## Credential Safety
|
|
27
|
+
|
|
28
|
+
The agent MUST NOT ask for GitHub tokens, passwords, SSH keys, or any authentication secrets.
|
|
29
|
+
|
|
30
|
+
If a step requires remote authentication (e.g., `git push`, `gh pr create`):
|
|
31
|
+
1. Explain that the step requires authentication
|
|
32
|
+
2. Offer three options:
|
|
33
|
+
- **Stop** — end the workflow here; the human can finish manually
|
|
34
|
+
- **Defer** — complete local steps only; skip remote steps
|
|
35
|
+
- **Manual** — the human runs the remote step themselves
|
|
36
|
+
3. Do NOT ask for credentials, tokens, or passwords
|
|
37
|
+
|
|
38
|
+
## Process
|
|
39
|
+
|
|
40
|
+
### Step 1: Start Session
|
|
41
|
+
|
|
42
|
+
Use the `merge-assist` tool with action `start`:
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"action": "start",
|
|
46
|
+
"targetBranch": "<target>",
|
|
47
|
+
"sourceBranch": "<source>",
|
|
48
|
+
"featureDescription": "<description>"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If branches do not exist, report the error and stop.
|
|
53
|
+
|
|
54
|
+
### Step 2: Branch Selection Gate
|
|
55
|
+
|
|
56
|
+
Present the session details and ask for confirmation:
|
|
57
|
+
> "Merge Assist: bring '<description>' from `<source>` → `<target>`.
|
|
58
|
+
> Confirm these branches? (y/n)"
|
|
59
|
+
|
|
60
|
+
Use `merge-assist` action `confirm` with `step: "branch_selection"` and `approved: true/false`.
|
|
61
|
+
|
|
62
|
+
If rejected, offer to abort or correct branch names.
|
|
63
|
+
|
|
64
|
+
### Step 3: Inspect Commits
|
|
65
|
+
|
|
66
|
+
Use `merge-assist` action `inspect` with the session ID.
|
|
67
|
+
|
|
68
|
+
Present candidate commits:
|
|
69
|
+
```
|
|
70
|
+
Found <N> candidate commit(s) on <source> not in <target>:
|
|
71
|
+
|
|
72
|
+
SHA | Subject | Author | Files | Confidence
|
|
73
|
+
----------|-------------------------|--------|-------|------------
|
|
74
|
+
<sha-1> | feat: add OAuth | alice | 3 | high
|
|
75
|
+
<sha-2> | refactor: extract auth | alice | 2 | medium
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Highlight dependent commits if detected.
|
|
79
|
+
|
|
80
|
+
### Step 4: Commit Selection Gate
|
|
81
|
+
|
|
82
|
+
Ask the user to select commits:
|
|
83
|
+
> "Which commits represent the feature? Provide SHAs (space-separated) or say 'all'.
|
|
84
|
+
> Include dependent commits? (y/n)"
|
|
85
|
+
|
|
86
|
+
Record the selection. Use `merge-assist` action `confirm` with `step: "commit_selection"`.
|
|
87
|
+
|
|
88
|
+
### Step 5: Build Plan
|
|
89
|
+
|
|
90
|
+
Use `merge-assist` action `plan` with `selectedCommits`.
|
|
91
|
+
|
|
92
|
+
Present the plan:
|
|
93
|
+
```
|
|
94
|
+
Merge Plan
|
|
95
|
+
----------
|
|
96
|
+
Integration branch: <branch-name>
|
|
97
|
+
Method: <cherry-pick | cherry-pick-range | manual-port>
|
|
98
|
+
Commits: <sha-1> <sha-2> ...
|
|
99
|
+
Risks:
|
|
100
|
+
- <risk-1>
|
|
101
|
+
- <risk-2>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 6: Planning Gates
|
|
105
|
+
|
|
106
|
+
Confirm each planning detail:
|
|
107
|
+
|
|
108
|
+
1. Integration branch name:
|
|
109
|
+
> "Use integration branch `<branch>`? (y/n)"
|
|
110
|
+
→ `confirm` with `step: "integration_branch"`
|
|
111
|
+
|
|
112
|
+
2. Merge method:
|
|
113
|
+
> "Use method `<method>`? (y/n)"
|
|
114
|
+
→ `confirm` with `step: "method_selection"`
|
|
115
|
+
|
|
116
|
+
3. Dependencies:
|
|
117
|
+
> "Include dependent commits? (y/n)"
|
|
118
|
+
→ `confirm` with `step: "dependency_inclusion"`
|
|
119
|
+
|
|
120
|
+
If any gate is rejected, offer to revise or abort.
|
|
121
|
+
|
|
122
|
+
### Step 7: Execute Gate
|
|
123
|
+
|
|
124
|
+
Present the recommended commands:
|
|
125
|
+
```bash
|
|
126
|
+
Recommended commands:
|
|
127
|
+
git fetch origin
|
|
128
|
+
git checkout -b <branch> <target>
|
|
129
|
+
git cherry-pick <sha-1> <sha-2>
|
|
130
|
+
git push -u origin <branch>
|
|
131
|
+
gh pr create --base <target> --head <branch> ...
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Ask:
|
|
135
|
+
> "Execute these commands? (y/n)"
|
|
136
|
+
→ `confirm` with `step: "execute_plan"`
|
|
137
|
+
|
|
138
|
+
**Important:** The agent MUST NOT execute these commands. Only the human should run them.
|
|
139
|
+
|
|
140
|
+
### Step 8: Handle Conflicts (if any)
|
|
141
|
+
|
|
142
|
+
If the human reports a conflict:
|
|
143
|
+
|
|
144
|
+
1. Stop the workflow.
|
|
145
|
+
2. Explain which file/commit caused the conflict.
|
|
146
|
+
3. Use `multiChoiceConfirm` to offer options:
|
|
147
|
+
- "Show conflict details"
|
|
148
|
+
- "Attempt resolution"
|
|
149
|
+
- "Switch to manual port"
|
|
150
|
+
- "Abort session"
|
|
151
|
+
4. Wait for human decision.
|
|
152
|
+
|
|
153
|
+
### Step 9: Push / PR Gate
|
|
154
|
+
|
|
155
|
+
After successful execution:
|
|
156
|
+
> "Push the branch and open a PR? This step requires GitHub authentication. (y/n)"
|
|
157
|
+
|
|
158
|
+
If the user is unsure about authentication or says no:
|
|
159
|
+
> "Remote push/PR requires authentication. Options:
|
|
160
|
+
> 1. Stop here — the integration branch is ready locally
|
|
161
|
+
> 2. Defer — skip push/PR for now
|
|
162
|
+
> 3. Manual — run `git push` and `gh pr create` yourself when ready"
|
|
163
|
+
|
|
164
|
+
→ `confirm` with `step: "push_pr"`
|
|
165
|
+
|
|
166
|
+
### Step 10: Complete
|
|
167
|
+
|
|
168
|
+
If `push_pr` is approved, mark the session complete:
|
|
169
|
+
> "Merge Assist complete. Branch `<branch>` pushed. PR created."
|
|
170
|
+
|
|
171
|
+
## Aborting
|
|
172
|
+
|
|
173
|
+
At any point, the user can abort. Use `merge-assist` action `abort` with the session ID.
|
|
174
|
+
|
|
175
|
+
## Error Handling
|
|
176
|
+
|
|
177
|
+
- Branch not found: report which branch is missing, offer to list branches
|
|
178
|
+
- No candidate commits: report that the source branch has no unique commits vs target
|
|
179
|
+
- No commits selected: error "At least one commit must be selected"
|
|
180
|
+
- Session not found: error "Session <id> not found. Start a new session with `start`"
|
package/src/commands/fd-plan.md
CHANGED
|
@@ -46,7 +46,13 @@ If research is stale or missing:
|
|
|
46
46
|
- Persist results to STATE.md for future reuse
|
|
47
47
|
- Log which sources were consulted and what evidence was gathered
|
|
48
48
|
|
|
49
|
-
> **MCP integration:** When library, API, or external knowledge is needed, invoke configured MCP tools
|
|
49
|
+
> **MCP integration:** When library, API, or external knowledge is needed, invoke configured MCP tools as part of the research pass.
|
|
50
|
+
> - **context7** — library docs lookup (first choice for API/docs questions)
|
|
51
|
+
> - **sequential-thinking** — stepwise planning for complex or ambiguous tasks
|
|
52
|
+
> - **memory / omega-memory** — retrieve prior context when available
|
|
53
|
+
> - **magic** — UI/design system research
|
|
54
|
+
> - **playwright** — verify browser behavior for frontend tasks
|
|
55
|
+
> - **token-optimizer** — compress large research context before planning
|
|
50
56
|
|
|
51
57
|
### Step 1: Guard Check
|
|
52
58
|
|
|
@@ -7,23 +7,40 @@ languages: []
|
|
|
7
7
|
|
|
8
8
|
# Agent Orchestration
|
|
9
9
|
|
|
10
|
-
FlowDeck provides
|
|
10
|
+
FlowDeck provides specialist agents. The orchestrator routes work to them. The orchestrator does NOT execute work itself.
|
|
11
|
+
|
|
12
|
+
## Core Principle: Orchestrator = Router, Not Worker
|
|
13
|
+
|
|
14
|
+
The orchestrator's ONLY responsibilities:
|
|
15
|
+
1. **Analyze** the request
|
|
16
|
+
2. **Classify** the task type
|
|
17
|
+
3. **Choose** the appropriate workflow
|
|
18
|
+
4. **Route** work to the correct agent
|
|
19
|
+
5. **Supervise** progress
|
|
20
|
+
6. **Collect** results
|
|
21
|
+
7. **Return** the final coordinated outcome
|
|
22
|
+
|
|
23
|
+
The orchestrator NEVER:
|
|
24
|
+
- Writes or edits files directly
|
|
25
|
+
- Runs shell commands or builds
|
|
26
|
+
- Implements code itself
|
|
27
|
+
- Runs the full coding workflow itself
|
|
11
28
|
|
|
12
29
|
## Available FlowDeck Agents
|
|
13
30
|
|
|
14
31
|
| Agent | Purpose | When to Use |
|
|
15
32
|
|-------|---------|------------|
|
|
33
|
+
| `@orchestrator` | **Coordinate multi-agent execution** | Managing a full feature delivery — analyzes, classifies, routes, supervises |
|
|
34
|
+
| `@default-executor` | **Execute simple direct tasks** | Quick answers, simple edits, inspect-only analysis, direct stock-tool usage |
|
|
16
35
|
| `@architect` | System design, ADRs, API contracts | Planning new modules, API changes, schema changes |
|
|
17
36
|
| `@build-error-resolver` | Fix build failures and type errors | Immediately when build fails |
|
|
18
|
-
| `@build-resolver` | Diagnose and fix build/compile failures | When build breaks and cause is unclear |
|
|
19
37
|
| `@code-explorer` | Map unfamiliar codebase structure | Before modifying unfamiliar code |
|
|
20
|
-
| `@backend-coder` | Implement features and fixes | All code implementation |
|
|
38
|
+
| `@backend-coder` | Implement features and fixes | All backend code implementation |
|
|
21
39
|
| `@debug-specialist` | Root cause analysis for bugs | When a bug needs deep investigation |
|
|
22
40
|
| `@discusser` | Extract requirements via Q&A | Starting a new feature or phase |
|
|
23
41
|
| `@doc-updater` | Update docs after code changes | After implementation completes |
|
|
24
42
|
| `@plan-checker` | Review PLAN.md before execution | Before executing any plan |
|
|
25
43
|
| `@mapper` | Map codebase to .codebase/ docs | Running /fd-map-codebase |
|
|
26
|
-
| `@orchestrator` | Coordinate multi-agent execution | Managing a full feature delivery |
|
|
27
44
|
| `@task-splitter` | Decompose parallel workstreams | When tasks can run simultaneously |
|
|
28
45
|
| `@performance-optimizer` | Profile and fix performance issues | When app is slow or before release |
|
|
29
46
|
| `@planner` | Create detailed implementation plans | Any multi-file feature |
|
|
@@ -31,16 +48,52 @@ FlowDeck provides 23 specialist agents. Each has a specific role. Using the righ
|
|
|
31
48
|
| `@researcher` | Research APIs, docs, best practices | Using an unfamiliar library or API |
|
|
32
49
|
| `@reviewer` | Code quality and convention review | After writing code, before PRs |
|
|
33
50
|
| `@security-auditor` | Deep security audit | Before merging security-sensitive code |
|
|
34
|
-
| `@task-splitter` | Decompose tasks into parallel tracks | Complex features with parallel work |
|
|
35
51
|
| `@tester` | Write and run tests (TDD) | Implementing features or fixing bugs |
|
|
36
52
|
| `@writer` | Draft project documentation | Writing or updating docs |
|
|
37
53
|
|
|
38
|
-
##
|
|
54
|
+
## Execution Paths
|
|
55
|
+
|
|
56
|
+
After the orchestrator analyzes and classifies a request, it selects ONE execution path:
|
|
57
|
+
|
|
58
|
+
### Direct Execution Path (via @default-executor)
|
|
59
|
+
|
|
60
|
+
For simple, low-risk tasks (< 5 files, no ambiguity):
|
|
61
|
+
- **Mode:** `direct-stock-tools` — use built-in tools directly for focused changes
|
|
62
|
+
- **Mode:** `quick-answer` — answer questions, no file modifications
|
|
63
|
+
- **Mode:** `inspect-only` — read and analyze, produce reports
|
|
64
|
+
- **Mode:** `simple-edit` — surgical changes (rename, typo fix, constant update)
|
|
65
|
+
|
|
66
|
+
The orchestrator routes to `@default-executor` with the chosen mode. The orchestrator does NOT do the work itself.
|
|
67
|
+
|
|
68
|
+
### Specialist Execution Path
|
|
69
|
+
|
|
70
|
+
For normal or complex tasks:
|
|
71
|
+
- Implementation → `@backend-coder`, `@frontend-coder`, `@devops`
|
|
72
|
+
- Testing → `@tester`
|
|
73
|
+
- Research → `@researcher`
|
|
74
|
+
- Review → `@reviewer`, `@security-auditor`
|
|
75
|
+
- Debug → `@debug-specialist`
|
|
76
|
+
- Docs → `@writer`, `@doc-updater`
|
|
77
|
+
|
|
78
|
+
### Workflow Classes
|
|
79
|
+
|
|
80
|
+
| Class | Stages | Executor | When Selected |
|
|
81
|
+
|-------|--------|----------|---------------|
|
|
82
|
+
| `quick` | execute → verify | `@default-executor` | Simple, low-risk tasks (< 5 files, no ambiguity) |
|
|
83
|
+
| `standard` | plan → execute → verify | Specialists | Normal implementation tasks |
|
|
84
|
+
| `explore` | discuss → plan → execute → verify | Specialists | Ambiguous or unfamiliar tasks |
|
|
85
|
+
| `ui-heavy` | discuss → design → plan → execute → verify | Specialists | UI/UX-heavy tasks |
|
|
86
|
+
| `bugfix` | discuss → fix-bug → verify | Specialists | Bug fixes |
|
|
87
|
+
| `docs-only` | write-docs → verify | `@default-executor` or `@writer` | Documentation-only changes |
|
|
88
|
+
| `verify-heavy` | plan → execute → verify | Specialists | High blast radius or sensitive paths |
|
|
89
|
+
|
|
90
|
+
## When to Use Agents Immediately
|
|
39
91
|
|
|
40
92
|
These situations should trigger agent use automatically:
|
|
41
93
|
|
|
42
94
|
| Situation | Agent |
|
|
43
95
|
|-----------|-------|
|
|
96
|
+
| Simple task (< 5 files, no ambiguity) | `@default-executor` |
|
|
44
97
|
| Complex feature spanning 3+ files | `@planner` first, then `@backend-coder` |
|
|
45
98
|
| Code was just written | `@reviewer` |
|
|
46
99
|
| Build fails | `@build-error-resolver` |
|
|
@@ -75,47 +128,34 @@ Parallel:
|
|
|
75
128
|
|
|
76
129
|
## Adaptive Workflow Routing
|
|
77
130
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
### Workflow Classes
|
|
81
|
-
|
|
82
|
-
| Class | Stages | When Selected |
|
|
83
|
-
|-------|--------|---------------|
|
|
84
|
-
| `quick` | execute → verify | Simple, low-risk tasks (< 5 files, no ambiguity) |
|
|
85
|
-
| `standard` | plan → execute → verify | Normal implementation tasks |
|
|
86
|
-
| `explore` | discuss → plan → execute → verify | Ambiguous or unfamiliar tasks |
|
|
87
|
-
| `ui-heavy` | discuss → design → plan → execute → verify | UI/UX-heavy tasks |
|
|
88
|
-
| `bugfix` | discuss → fix-bug → verify | Bug fixes |
|
|
89
|
-
| `docs-only` | write-docs → verify | Documentation-only changes |
|
|
90
|
-
| `verify-heavy` | plan → execute → verify | High blast radius or sensitive paths |
|
|
131
|
+
The orchestrator selects the most appropriate workflow class at runtime based on task context, complexity, risk, and codebase familiarity.
|
|
91
132
|
|
|
92
133
|
### Routing Criteria
|
|
93
134
|
|
|
94
|
-
The orchestrator scores tasks across these dimensions:
|
|
95
135
|
- **Simplicity**: Is the task a simple rename, typo fix, or config update?
|
|
96
136
|
- **Confidence**: How well does the task description match known patterns?
|
|
97
137
|
- **Risk**: Is the blast radius small (< 3 files) and are no sensitive paths touched?
|
|
98
138
|
- **Codebase familiarity**: Is the codebase mapping fresh (< 24h)?
|
|
99
139
|
- **Complexity**: Is the task cheap (classify, validate, summarize) vs expensive (architect, refactor entire system)?
|
|
100
140
|
|
|
101
|
-
The
|
|
102
|
-
|
|
103
|
-
### Phase Behavior
|
|
104
|
-
|
|
105
|
-
- **quick / docs-only**: Skip discuss and plan phases. Run execute directly.
|
|
106
|
-
- **standard / verify-heavy**: Skip discuss. Start with plan.
|
|
107
|
-
- **explore / bugfix / ui-heavy**: Include discuss phase for requirements gathering.
|
|
108
|
-
- **ui-heavy**: Always include design phase before execute.
|
|
141
|
+
The orchestrator prefers the lightest workflow that is sufficient. Escalate to a richer workflow only when evidence shows the current path is insufficient.
|
|
109
142
|
|
|
110
143
|
### Escalation
|
|
111
144
|
|
|
112
|
-
If the orchestrator discovers during
|
|
145
|
+
If the orchestrator discovers during supervision that the initial workflow class is insufficient, it escalates and re-routes:
|
|
113
146
|
- quick → standard: when blast radius exceeds 3 files
|
|
114
147
|
- standard → verify-heavy: when sensitive paths are touched
|
|
115
148
|
- standard → ui-heavy: when design requirements emerge
|
|
116
149
|
- explore → standard: when confidence improves after discussion
|
|
117
150
|
|
|
118
|
-
Escalation is logged with reasons and triggers
|
|
151
|
+
Escalation is logged with reasons and triggers re-routing to appropriate agents. The orchestrator STILL does not execute the work itself.
|
|
152
|
+
|
|
153
|
+
### Phase Behavior
|
|
154
|
+
|
|
155
|
+
- **quick / docs-only**: Skip discuss and plan phases. Route to `@default-executor`.
|
|
156
|
+
- **standard / verify-heavy**: Skip discuss. Start with plan.
|
|
157
|
+
- **explore / bugfix / ui-heavy**: Include discuss phase for requirements gathering.
|
|
158
|
+
- **ui-heavy**: Always include design phase before execute.
|
|
119
159
|
|
|
120
160
|
### Phase Gating (Relaxed)
|
|
121
161
|
|
|
@@ -123,3 +163,21 @@ Phase gating is advisory, not absolute:
|
|
|
123
163
|
- For `quick` and `docs-only` workflows: phases may be skipped without override.
|
|
124
164
|
- For other workflows: follow the phase order for the selected workflow class.
|
|
125
165
|
- The orchestrator may override phase gating when the workflow class permits it.
|
|
166
|
+
|
|
167
|
+
## Tool Access Enforcement
|
|
168
|
+
|
|
169
|
+
The orchestrator is restricted from using execution tools directly:
|
|
170
|
+
|
|
171
|
+
**Blocked for orchestrator:**
|
|
172
|
+
- File writes: `write`, `create`, `edit`, `patch`, `str_replace_editor`
|
|
173
|
+
- Shell execution: `bash`, `execute`, `terminal`, `shell`
|
|
174
|
+
- Build/test runners: `npm`, `bun`, `cargo`, `make`
|
|
175
|
+
- Container/deployment: `docker`, `kubectl`, `terraform`
|
|
176
|
+
|
|
177
|
+
**Allowed for orchestrator:**
|
|
178
|
+
- Read/search: `read`, `search`, `grep`, `glob`
|
|
179
|
+
- Planning: `planning-state`, `codebase-state`, `repo-memory`
|
|
180
|
+
- Governance: `decision-trace`, `policy-engine`, `reflect`
|
|
181
|
+
- Analysis: `codegraph`, `load-rules`, `council`
|
|
182
|
+
|
|
183
|
+
All file modifications and command execution MUST be routed to `@default-executor` or specialist agents.
|