@dv.nghiem/flowdeck 0.3.9 → 0.4.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.
- package/README.md +13 -21
- package/dist/agents/code-explorer.d.ts.map +1 -1
- package/dist/agents/mapper.d.ts.map +1 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/specialist.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +12 -2
- package/dist/hooks/compaction-hook.d.ts +1 -2
- package/dist/hooks/compaction-hook.d.ts.map +1 -1
- package/dist/hooks/file-tracker.d.ts +6 -0
- package/dist/hooks/file-tracker.d.ts.map +1 -1
- package/dist/hooks/notifications.d.ts.map +1 -1
- package/dist/hooks/session-start.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +742 -794
- package/dist/lib/completion-validator.d.ts +51 -0
- package/dist/lib/completion-validator.d.ts.map +1 -0
- package/dist/lib/recommended-question.d.ts +24 -0
- package/dist/lib/recommended-question.d.ts.map +1 -0
- package/dist/lib/research-gate.d.ts +97 -0
- package/dist/lib/research-gate.d.ts.map +1 -0
- package/dist/lib/research-gate.test.d.ts +2 -0
- package/dist/lib/research-gate.test.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +12 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/services/codegraph.d.ts +36 -0
- package/dist/services/codegraph.d.ts.map +1 -0
- package/dist/services/codegraph.test.d.ts +2 -0
- package/dist/services/codegraph.test.d.ts.map +1 -0
- package/dist/services/question-guard.d.ts +4 -0
- package/dist/services/question-guard.d.ts.map +1 -1
- package/dist/services/recommended-question.test.d.ts +2 -0
- package/dist/services/recommended-question.test.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts +3 -1
- package/dist/services/supervisor-binding.d.ts.map +1 -1
- package/dist/tools/codebase-index.d.ts +30 -0
- package/dist/tools/codebase-index.d.ts.map +1 -0
- package/dist/tools/codebase-index.test.d.ts +2 -0
- package/dist/tools/codebase-index.test.d.ts.map +1 -0
- package/dist/tools/codegraph-tool.d.ts +3 -0
- package/dist/tools/codegraph-tool.d.ts.map +1 -0
- package/dist/tools/planning-state-lib.d.ts +23 -0
- package/dist/tools/planning-state-lib.d.ts.map +1 -1
- package/docs/agents/index.md +154 -0
- package/docs/commands/fd-ask.md +71 -39
- package/docs/commands/fd-checkpoint.md +63 -8
- package/docs/commands/fd-deploy-check.md +166 -9
- package/docs/commands/fd-design.md +101 -0
- package/docs/commands/fd-discuss.md +87 -20
- package/docs/commands/fd-doctor.md +100 -13
- package/docs/commands/fd-done.md +215 -0
- package/docs/commands/fd-execute.md +104 -0
- package/docs/commands/fd-fix-bug.md +144 -24
- package/docs/commands/fd-map-codebase.md +85 -21
- package/docs/commands/fd-multi-repo.md +155 -40
- package/docs/commands/fd-new-feature.md +63 -19
- package/docs/commands/fd-plan.md +80 -27
- package/docs/commands/fd-quick.md +143 -29
- package/docs/commands/fd-reflect.md +81 -13
- package/docs/commands/fd-resume.md +65 -8
- package/docs/commands/fd-status.md +80 -12
- package/docs/commands/fd-suggest.md +114 -0
- package/docs/commands/fd-translate-intent.md +69 -9
- package/docs/commands/fd-verify.md +71 -14
- package/docs/commands/fd-write-docs.md +121 -8
- package/docs/concepts/architecture.md +163 -0
- package/docs/concepts/governance.md +242 -0
- package/docs/concepts/intelligence.md +145 -0
- package/docs/concepts/multi-repo.md +227 -0
- package/docs/concepts/workflows.md +205 -0
- package/docs/configuration/index.md +208 -0
- package/docs/configuration/opencode-settings.md +98 -0
- package/docs/getting-started/first-project.md +126 -0
- package/docs/getting-started/installation.md +73 -0
- package/docs/getting-started/quick-start.md +74 -0
- package/docs/index.md +36 -72
- package/docs/reference/hooks.md +176 -0
- package/docs/reference/rules.md +109 -0
- package/docs/skills/code-review.md +47 -0
- package/docs/skills/index.md +148 -0
- package/docs/skills/planning.md +39 -0
- package/package.json +1 -1
- package/src/commands/fd-discuss.md +74 -10
- package/src/commands/fd-done.md +196 -0
- package/src/commands/fd-execute.md +43 -6
- package/src/commands/fd-fix-bug.md +43 -6
- package/src/commands/fd-map-codebase.md +99 -19
- package/src/commands/fd-new-feature.md +14 -5
- package/src/commands/fd-plan.md +38 -1
- package/src/commands/fd-quick.md +1 -1
- package/src/commands/fd-resume.md +1 -1
- package/src/commands/fd-status.md +1 -1
- package/src/commands/fd-verify.md +16 -2
- package/src/commands/fd-write-docs.md +30 -5
- package/src/skills/context-load/SKILL.md +1 -1
- package/dist/hooks/memory-hook.d.ts +0 -28
- package/dist/hooks/memory-hook.d.ts.map +0 -1
- package/dist/services/memory-store.d.ts +0 -73
- package/dist/services/memory-store.d.ts.map +0 -1
- package/dist/services/memory-store.test.d.ts +0 -2
- package/dist/services/memory-store.test.d.ts.map +0 -1
- package/dist/tools/memory-search.d.ts +0 -3
- package/dist/tools/memory-search.d.ts.map +0 -1
- package/dist/tools/memory-status.d.ts +0 -3
- package/dist/tools/memory-status.d.ts.map +0 -1
- package/docs/USER_GUIDE.md +0 -20
- package/docs/agents.md +0 -544
- package/docs/best-practices.md +0 -47
- package/docs/commands/fd-new-project.md +0 -24
- package/docs/commands.md +0 -557
- package/docs/configuration.md +0 -325
- package/docs/design-first-workflow.md +0 -94
- package/docs/feature-integration-architecture.md +0 -227
- package/docs/installation.md +0 -123
- package/docs/intelligence.md +0 -370
- package/docs/memory.md +0 -69
- package/docs/multi-repo.md +0 -201
- package/docs/notifications.md +0 -170
- package/docs/optimization-baseline.md +0 -21
- package/docs/quick-start.md +0 -197
- package/docs/rules.md +0 -432
- package/docs/skills.md +0 -417
- package/docs/workflows.md +0 -134
- package/src/commands/fd-new-project.md +0 -114
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PlanningState } from "../tools/planning-state-lib";
|
|
2
|
+
export interface CompletionReadiness {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
/** Why it's ready (when valid) */
|
|
5
|
+
summary?: string;
|
|
6
|
+
/** Blocking reasons (when not valid) */
|
|
7
|
+
blockers: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Validate whether a feature/workflow is in a finishable state.
|
|
11
|
+
*
|
|
12
|
+
* Rules:
|
|
13
|
+
* - STATE.md must exist (caller is responsible for passing state)
|
|
14
|
+
* - status must not be "planned" (nothing has started)
|
|
15
|
+
* - plan_confirmed must be true (plan must have been confirmed)
|
|
16
|
+
* - no active blockers
|
|
17
|
+
* - if design-first was required, it must be satisfied
|
|
18
|
+
* - status must be "verified" or "in_progress" (not already "complete")
|
|
19
|
+
*/
|
|
20
|
+
export declare function validateCompletionReadiness(state: PlanningState): CompletionReadiness;
|
|
21
|
+
export interface CompletionMetadata {
|
|
22
|
+
/** Feature/phase number */
|
|
23
|
+
phase: number;
|
|
24
|
+
/** ISO timestamp of completion */
|
|
25
|
+
completedAt: string;
|
|
26
|
+
/** Who/what triggered completion */
|
|
27
|
+
completedBy: string;
|
|
28
|
+
/** Final status before done was called */
|
|
29
|
+
priorStatus: string;
|
|
30
|
+
/** Steps that were complete at time of closing */
|
|
31
|
+
stepsComplete: number[];
|
|
32
|
+
/** Whether /fd-verify had been run */
|
|
33
|
+
wasVerified: boolean;
|
|
34
|
+
/** Changed files summary from git diff */
|
|
35
|
+
changedFiles: string[];
|
|
36
|
+
/** Whether verify was explicitly skipped */
|
|
37
|
+
verifySkipped: boolean;
|
|
38
|
+
/** Whether codebase mapping was refreshed */
|
|
39
|
+
mappingRefreshed: boolean;
|
|
40
|
+
/** Freshness status of mapping after done */
|
|
41
|
+
mappingFreshnessStatus: "fresh" | "stale" | "skipped";
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build a human-readable DONE.md summary artifact for the current phase.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildCompletionSummary(meta: CompletionMetadata): string;
|
|
47
|
+
/**
|
|
48
|
+
* Check whether the prior status indicates /fd-verify was run.
|
|
49
|
+
*/
|
|
50
|
+
export declare function wasVerified(status: string): boolean;
|
|
51
|
+
//# sourceMappingURL=completion-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion-validator.d.ts","sourceRoot":"","sources":["../../src/lib/completion-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAEhE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAA;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,aAAa,GAAG,mBAAmB,CAoDrF;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAA;IACnB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,sCAAsC;IACtC,WAAW,EAAE,OAAO,CAAA;IACpB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,4CAA4C;IAC5C,aAAa,EAAE,OAAO,CAAA;IACtB,6CAA6C;IAC7C,gBAAgB,EAAE,OAAO,CAAA;IACzB,6CAA6C;IAC7C,sBAAsB,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;CACtD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAuCvE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface RecommendedQuestion {
|
|
2
|
+
question: string;
|
|
3
|
+
recommendation: string;
|
|
4
|
+
rationale: string;
|
|
5
|
+
alternatives?: string[];
|
|
6
|
+
defaultIfNoResponse: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Render a RecommendedQuestion to a human-readable string format.
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatRecommendedQuestion(q: RecommendedQuestion): string;
|
|
12
|
+
/**
|
|
13
|
+
* Type guard — returns true only if the value is a valid RecommendedQuestion
|
|
14
|
+
* with all required fields present and non-empty.
|
|
15
|
+
*
|
|
16
|
+
* Also returns false for trivially bare question patterns.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateRecommendedQuestion(value: unknown): value is RecommendedQuestion;
|
|
19
|
+
/**
|
|
20
|
+
* Parse a formatted RecommendedQuestion string back into an object.
|
|
21
|
+
* Returns null if the text does not contain the required fields.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseQuestionBlocks(text: string): RecommendedQuestion | null;
|
|
24
|
+
//# sourceMappingURL=recommended-question.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended-question.d.ts","sourceRoot":"","sources":["../../src/lib/recommended-question.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAOxE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAmCxF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAsC5E"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Research Gate — shared research-first enforcement for FlowDeck commands.
|
|
3
|
+
*
|
|
4
|
+
* Enforces that major workflow stages (discuss, plan, execute, fix-bug)
|
|
5
|
+
* perform targeted research BEFORE asking human questions or producing plans.
|
|
6
|
+
*
|
|
7
|
+
* Research is scoped to the stage:
|
|
8
|
+
* - discuss: gather facts and open questions from repo evidence
|
|
9
|
+
* - plan: gather implementation constraints and design options
|
|
10
|
+
* - execute: verify actual code paths and impacted files
|
|
11
|
+
* - fix-bug: inspect bug path, reproduction, and known remedies
|
|
12
|
+
*
|
|
13
|
+
* Research results are persisted in shared state so later stages can reuse them.
|
|
14
|
+
* Freshness metadata determines whether existing research is sufficient or
|
|
15
|
+
* new research is needed.
|
|
16
|
+
*/
|
|
17
|
+
import { type PlanningState } from "../tools/planning-state-lib";
|
|
18
|
+
export type ResearchScope = "discuss" | "plan" | "execute" | "fix-bug";
|
|
19
|
+
/** Evidence collected during a research pass. */
|
|
20
|
+
export interface ResearchEvidence {
|
|
21
|
+
/** Which scope this evidence is for. */
|
|
22
|
+
scope: ResearchScope;
|
|
23
|
+
/** When this evidence was collected. */
|
|
24
|
+
collectedAt: string;
|
|
25
|
+
/** Files that were read/inspected. */
|
|
26
|
+
filesExplored: string[];
|
|
27
|
+
/** Key findings from the research. */
|
|
28
|
+
findings: string[];
|
|
29
|
+
/** Whether MCP tools were used. */
|
|
30
|
+
mcpToolsUsed: string[];
|
|
31
|
+
/** Whether the research gate was satisfied (enough evidence gathered). */
|
|
32
|
+
gateSatisfied: boolean;
|
|
33
|
+
/** Whether additional exploration was skipped (fresh evidence existed). */
|
|
34
|
+
skippedExploration: boolean;
|
|
35
|
+
/** Summary version when this research was conducted. */
|
|
36
|
+
summaryVersion: number;
|
|
37
|
+
}
|
|
38
|
+
/** Diagnostics logged during research. */
|
|
39
|
+
export interface ResearchDiagnostics {
|
|
40
|
+
/** Research scope. */
|
|
41
|
+
scope: ResearchScope;
|
|
42
|
+
/** Timestamp of research. */
|
|
43
|
+
timestamp: string;
|
|
44
|
+
/** Sources consulted. */
|
|
45
|
+
sourcesUsed: string[];
|
|
46
|
+
/** MCP tools invoked. */
|
|
47
|
+
mcpToolsInvoked: string[];
|
|
48
|
+
/** Evidence collected. */
|
|
49
|
+
evidenceCollected: string[];
|
|
50
|
+
/** Whether gate was satisfied. */
|
|
51
|
+
gateSatisfied: boolean;
|
|
52
|
+
/** Whether additional exploration was skipped. */
|
|
53
|
+
skippedExploration: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check whether existing research in shared state is still fresh enough to reuse.
|
|
57
|
+
* Research is considered fresh if:
|
|
58
|
+
* 1. The summaryVersion matches the current state's summaryVersion
|
|
59
|
+
* 2. The state itself is fresh (within 5 minutes)
|
|
60
|
+
* 3. The research scope matches
|
|
61
|
+
*/
|
|
62
|
+
export declare function isResearchFresh(state: PlanningState, scope: ResearchScope): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Persist research evidence to STATE.md so later stages can reuse it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function persistResearchEvidence(dir: string, scope: ResearchScope, evidence: ResearchEvidence): void;
|
|
67
|
+
/**
|
|
68
|
+
* Load persisted research evidence for a given scope.
|
|
69
|
+
*/
|
|
70
|
+
export declare function loadResearchEvidence(dir: string, scope: ResearchScope): ResearchEvidence | null;
|
|
71
|
+
/**
|
|
72
|
+
* Build diagnostics log entry for a research pass.
|
|
73
|
+
*/
|
|
74
|
+
export declare function buildResearchDiagnostics(evidence: ResearchEvidence): ResearchDiagnostics;
|
|
75
|
+
/**
|
|
76
|
+
* Log research diagnostics to console (for agent visibility).
|
|
77
|
+
*/
|
|
78
|
+
export declare function logResearchDiagnostics(diags: ResearchDiagnostics): void;
|
|
79
|
+
/**
|
|
80
|
+
* Perform a research pass for a given scope, checking freshness first.
|
|
81
|
+
*
|
|
82
|
+
* Returns ResearchEvidence with gateSatisfied=true if enough evidence was gathered.
|
|
83
|
+
* If existing research is fresh, returns that and sets skippedExploration=true.
|
|
84
|
+
*/
|
|
85
|
+
export declare function runResearchGate(dir: string, scope: ResearchScope, options?: {
|
|
86
|
+
forceRefresh?: boolean;
|
|
87
|
+
customEvidence?: Partial<ResearchEvidence>;
|
|
88
|
+
}): Promise<ResearchEvidence>;
|
|
89
|
+
/**
|
|
90
|
+
* Check if a stage should proceed or block based on research gate.
|
|
91
|
+
* Returns an error message if the gate is not satisfied and the stage should block.
|
|
92
|
+
*/
|
|
93
|
+
export declare function researchGateStatus(evidence: ResearchEvidence): {
|
|
94
|
+
satisfied: boolean;
|
|
95
|
+
blocker?: string;
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=research-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-gate.d.ts","sourceRoot":"","sources":["../../src/lib/research-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAA0F,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGxJ,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAEtE,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,KAAK,EAAE,aAAa,CAAA;IACpB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,sCAAsC;IACtC,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,mCAAmC;IACnC,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,0EAA0E;IAC1E,aAAa,EAAE,OAAO,CAAA;IACtB,2EAA2E;IAC3E,kBAAkB,EAAE,OAAO,CAAA;IAC3B,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,KAAK,EAAE,aAAa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@
|
|
|
1
|
+
{"version":3,"file":"research-gate.test.d.ts","sourceRoot":"","sources":["../../src/lib/research-gate.test.ts"],"names":[],"mappings":""}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* - grep_app https://mcp.grep.app (code search)
|
|
8
8
|
* - github https://api.githubcopilot.com/mcp/ (GitHub code search)
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Local stdio MCPs (when installed):
|
|
11
|
+
* - codegraph codegraph serve --mcp (code knowledge graph — symbol search, call graphs, impact analysis)
|
|
12
|
+
*
|
|
13
|
+
* Disable individual MCPs with: FLOWDECK_DISABLE_MCP=context7,websearch,grep_app,github,codegraph
|
|
11
14
|
*/
|
|
12
15
|
type RemoteMcp = {
|
|
13
16
|
type: "remote";
|
|
@@ -16,6 +19,13 @@ type RemoteMcp = {
|
|
|
16
19
|
headers?: Record<string, string>;
|
|
17
20
|
oauth?: false;
|
|
18
21
|
};
|
|
19
|
-
|
|
22
|
+
type LocalMcp = {
|
|
23
|
+
type: "local";
|
|
24
|
+
command: string;
|
|
25
|
+
args?: string[];
|
|
26
|
+
env?: Record<string, string>;
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare function createFlowDeckMcps(): Record<string, RemoteMcp | LocalMcp>;
|
|
20
30
|
export {};
|
|
21
31
|
//# sourceMappingURL=index.d.ts.map
|
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;;;;;;;;;;;;;GAaG;AAIH,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,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAOD,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC,CAgEzE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface CodegraphMeta {
|
|
2
|
+
installed: boolean;
|
|
3
|
+
indexed: boolean;
|
|
4
|
+
lastIndexedAt: string;
|
|
5
|
+
lastIndexedRevision: string;
|
|
6
|
+
lastIndexedBy: string;
|
|
7
|
+
freshnessStatus: "fresh" | "stale" | "unknown";
|
|
8
|
+
installLog: string;
|
|
9
|
+
indexLog: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function isCodegraphInstalled(): boolean;
|
|
12
|
+
export declare function isCodegraphIndexed(dir: string): boolean;
|
|
13
|
+
export declare function readCodegraphMeta(dir: string): CodegraphMeta;
|
|
14
|
+
export declare function writeCodegraphMeta(dir: string, meta: CodegraphMeta): void;
|
|
15
|
+
export declare function isCodegraphFresh(dir: string, maxAgeMs?: number): boolean;
|
|
16
|
+
export declare function getCurrentRevision(dir: string): string;
|
|
17
|
+
export declare function getChangedFilesSince(dir: string, revision: string): string[];
|
|
18
|
+
export declare function hasChangedSinceLastIndex(dir: string): boolean;
|
|
19
|
+
export interface InstallResult {
|
|
20
|
+
success: boolean;
|
|
21
|
+
alreadyInstalled: boolean;
|
|
22
|
+
log: string;
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function installCodegraph(): InstallResult;
|
|
26
|
+
export interface IndexResult {
|
|
27
|
+
success: boolean;
|
|
28
|
+
full: boolean;
|
|
29
|
+
log: string;
|
|
30
|
+
changedFiles: string[];
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function initCodegraphIndex(dir: string, agent: string): IndexResult;
|
|
34
|
+
export declare function refreshCodegraphIndex(dir: string, agent: string): IndexResult;
|
|
35
|
+
export declare function markCodegraphStale(dir: string): void;
|
|
36
|
+
//# sourceMappingURL=codegraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegraph.d.ts","sourceRoot":"","sources":["../../src/services/codegraph.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;IAC9C,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAMD,wBAAgB,oBAAoB,IAAI,OAAO,CAW9C;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CA6B5D;AAkDD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAgBzE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAmB,GAAG,OAAO,CAOlF;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAYtD;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAc5E;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAK7D;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,OAAO,CAAA;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAmChD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CA8E1E;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CA+D7E;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegraph.test.d.ts","sourceRoot":"","sources":["../../src/services/codegraph.test.ts"],"names":[],"mappings":""}
|
|
@@ -27,6 +27,10 @@ export interface CheckResult {
|
|
|
27
27
|
answeredByEvidence?: boolean;
|
|
28
28
|
/** Whether the block was due to a duplicate question */
|
|
29
29
|
duplicate?: boolean;
|
|
30
|
+
/** Field names missing from the question block (when allow=false due to missing recommendation) */
|
|
31
|
+
missingRecommendationFields?: string[];
|
|
32
|
+
/** Hint for how to rewrite a bare question into a recommended question */
|
|
33
|
+
rewriteHint?: string;
|
|
30
34
|
}
|
|
31
35
|
export interface QuestionGuard {
|
|
32
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-guard.d.ts","sourceRoot":"","sources":["../../src/services/question-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"question-guard.d.ts","sourceRoot":"","sources":["../../src/services/question-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAK7D,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,KAAK,EAAE,OAAO,CAAA;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mGAAmG;IACnG,2BAA2B,CAAC,EAAE,MAAM,EAAE,CAAA;IACtC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,GAAG,WAAW,CAAA;IAC3E;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,4DAA4D;IAC5D,QAAQ,IAAI,MAAM,EAAE,CAAA;IACpB,6CAA6C;IAC7C,KAAK,IAAI,IAAI,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,GAAE,MAAM,EAAO,GAAG,aAAa,CAuFhF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,iBAAiB,GAAG,IAAI,GACpC,MAAM,EAAE,CASV;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,iBAAiB,GAAG,IAAI,GACpC,OAAO,CAGT;AAMD;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAA;IACnB,oEAAoE;IACpE,YAAY,EAAE,OAAO,CAAA;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,iBAAiB,GAC7B,mBAAmB,CAmBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended-question.test.d.ts","sourceRoot":"","sources":["../../src/services/recommended-question.test.ts"],"names":[],"mappings":""}
|
|
@@ -51,6 +51,8 @@ export interface SupervisorDecision {
|
|
|
51
51
|
confidenceScore: number;
|
|
52
52
|
/** Whether this was a preflight or post-stage review */
|
|
53
53
|
reviewPhase: SupervisorReviewPhase;
|
|
54
|
+
/** Present when decision is 'escalate' — a recommended question for the human */
|
|
55
|
+
clarificationQuestion?: string;
|
|
54
56
|
/** ISO timestamp */
|
|
55
57
|
timestamp: string;
|
|
56
58
|
}
|
|
@@ -104,7 +106,7 @@ export declare function isRegisteredTarget(name: string): {
|
|
|
104
106
|
* not exist, it returns decision="block" with exists=false and explains that
|
|
105
107
|
* the requested target is not registered.
|
|
106
108
|
*/
|
|
107
|
-
export declare function runSupervisorReview(directory: string, targetName: string, ctx?: SupervisorContext): SupervisorDecision;
|
|
109
|
+
export declare function runSupervisorReview(directory: string, targetName: string, ctx?: SupervisorContext, clarificationQuestion?: string): SupervisorDecision;
|
|
108
110
|
/**
|
|
109
111
|
* Shorthand: should execution proceed given a decision and the current config mode?
|
|
110
112
|
* In "advisory" mode, only "block" with a missing-existence check is hard-stopped.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-binding.d.ts","sourceRoot":"","sources":["../../src/services/supervisor-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"supervisor-binding.d.ts","sourceRoot":"","sources":["../../src/services/supervisor-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAUH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAsBvC,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAMnC,CAAA;AAIV,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAA;AAChF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AACnE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,YAAY,CAAA;AAE9D,MAAM,WAAW,kBAAkB;IACjC,qBAAqB;IACrB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,kCAAkC;IAClC,UAAU,EAAE,oBAAoB,CAAA;IAChC,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAA;IACf,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,gDAAgD;IAChD,mBAAmB,EAAE,MAAM,EAAE,CAAA;IAC7B,+BAA+B;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,oEAAoE;IACpE,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,2BAA2B;IAC3B,cAAc,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAA;IAC/D,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAA;IACvB,wDAAwD;IACxD,WAAW,EAAE,qBAAqB,CAAA;IAClC,iFAAiF;IACjF,qBAAqB,CAAC,EAAE,MA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;CAAE,CAIhG;AA6LD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,iBAAsB,EAC3B,qBAAqB,CAAC,EAAE,MAAM,GAC7B,kBAAkB,CA8FpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,kBAAkB,EAC5B,IAAI,EAAE,UAAU,GAAG,QAAQ,EAC3B,QAAQ,EAAE,OAAO,GAChB,OAAO,CAWT"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface FileSnapshot {
|
|
2
|
+
lastModifiedAt: string;
|
|
3
|
+
lastModifiedBy: string;
|
|
4
|
+
changeType: "added" | "modified" | "deleted";
|
|
5
|
+
sourceStage: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ExplorationEntry {
|
|
8
|
+
stage: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
filesExplored: string[];
|
|
11
|
+
reason: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CodebaseIndex {
|
|
14
|
+
exists: boolean;
|
|
15
|
+
lastUpdatedAt: string;
|
|
16
|
+
lastUpdatedBy: string;
|
|
17
|
+
sourceStage: string;
|
|
18
|
+
changedFiles: string[];
|
|
19
|
+
fileSnapshots: Record<string, FileSnapshot>;
|
|
20
|
+
explorationHistory: ExplorationEntry[];
|
|
21
|
+
summaryVersion: number;
|
|
22
|
+
freshnessStatus: "fresh" | "stale" | "unknown";
|
|
23
|
+
}
|
|
24
|
+
export declare function readCodebaseIndex(dir: string): CodebaseIndex;
|
|
25
|
+
export declare function isCodebaseIndexFresh(dir: string, maxAgeMs?: number): boolean;
|
|
26
|
+
export declare function writeCodebaseIndex(dir: string, index: Omit<CodebaseIndex, "exists">): void;
|
|
27
|
+
export declare function appendChangedFiles(dir: string, agent: string, stage: string, files: string[]): void;
|
|
28
|
+
export declare function recordExploration(dir: string, stage: string, filesExplored: string[], reason: string): void;
|
|
29
|
+
export declare function getFileSnapshot(dir: string, filePath: string): FileSnapshot | null;
|
|
30
|
+
//# sourceMappingURL=codebase-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codebase-index.d.ts","sourceRoot":"","sources":["../../src/tools/codebase-index.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;IAC5C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAC3C,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;CAC/C;AAMD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CA+B5D;AAkED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAgB,GAAG,OAAO,CAOnF;AAOD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,IAAI,CAyB1F;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EAAE,GACd,IAAI,CAgCN;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EAAE,EACvB,MAAM,EAAE,MAAM,GACb,IAAI,CAuBN;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAGlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codebase-index.test.d.ts","sourceRoot":"","sources":["../../src/tools/codebase-index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegraph-tool.d.ts","sourceRoot":"","sources":["../../src/tools/codegraph-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAa/D,eAAO,MAAM,aAAa,EAAE,cA6G1B,CAAA"}
|
|
@@ -49,6 +49,16 @@ export interface PlanningState {
|
|
|
49
49
|
blockers: string[];
|
|
50
50
|
/** TDD workflow state (undefined when TDD not active) */
|
|
51
51
|
tdd: TDDState | undefined;
|
|
52
|
+
/** When this state was last updated */
|
|
53
|
+
lastUpdatedAt: string;
|
|
54
|
+
/** Which agent last updated the state */
|
|
55
|
+
lastUpdatedBy: string;
|
|
56
|
+
/** Phase when state was last updated */
|
|
57
|
+
lastUpdatedPhase: number;
|
|
58
|
+
/** Monotonically increasing version number */
|
|
59
|
+
summaryVersion: number;
|
|
60
|
+
/** Whether the state is still considered fresh enough to use */
|
|
61
|
+
freshnessStatus: "fresh" | "stale" | "unknown";
|
|
52
62
|
}
|
|
53
63
|
/** Extended PlanningState with TDD state for internal use */
|
|
54
64
|
export type PlanningStateWithTDD = PlanningState & {
|
|
@@ -57,6 +67,19 @@ export type PlanningStateWithTDD = PlanningState & {
|
|
|
57
67
|
export declare function getTDDState(state: PlanningState): TDDState | undefined;
|
|
58
68
|
export declare function parseState(content: string): Record<string, unknown>;
|
|
59
69
|
export declare function timestamp(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Returns true if state was updated within maxAgeMs milliseconds.
|
|
72
|
+
* Defaults to 5 minutes.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isStateFresh(state: PlanningState, maxAgeMs?: number): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Mark the state as stale by updating freshnessStatus and appending to history.
|
|
77
|
+
*/
|
|
78
|
+
export declare function markStateStale(dir: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Publish a state update with fresh metadata. Called after any significant change.
|
|
81
|
+
*/
|
|
82
|
+
export declare function publishStateUpdate(dir: string, agent: string, phase: number): void;
|
|
60
83
|
export declare function appendHistory(stateContent: string, action: string): string;
|
|
61
84
|
export declare function readPlanningState(dir: string): PlanningState;
|
|
62
85
|
export declare function hasDesignGateSatisfied(state: PlanningState): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning-state-lib.d.ts","sourceRoot":"","sources":["../../src/tools/planning-state-lib.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,MAAM,WAAW,QAAQ;IACvB,4EAA4E;IAC5E,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;IAC7D,qCA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cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAerJ"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Agents
|
|
2
|
+
|
|
3
|
+
FlowDeck runs a 27-agent system coordinated by an orchestrator. Each agent has a specific capability contract and specialized model configuration. The orchestrator selects specialists based on context and delegates work through the `delegate` tool.
|
|
4
|
+
|
|
5
|
+
## Delegation Model
|
|
6
|
+
|
|
7
|
+
The orchestrator holds the user session, decomposes requests, and dispatches to specialist agents via the `delegate` tool. Each specialist operates in its own context window and reports results back to the orchestrator. Agents are classified by mode:
|
|
8
|
+
|
|
9
|
+
- **primary**: visible and selectable from the user interface
|
|
10
|
+
- **subagent**: internal only, invoked programmatically by other agents
|
|
11
|
+
- **all**: works in both primary and subagent contexts
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
user → @orchestrator → @planner
|
|
15
|
+
→ @backend-coder
|
|
16
|
+
→ @frontend-coder
|
|
17
|
+
→ @reviewer
|
|
18
|
+
→ @security-auditor
|
|
19
|
+
→ ...
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
All agent configurations are in `src/agents/`. Agent definitions use YAML frontmatter (description, mode, model, temperature, steps, permission).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Orchestration
|
|
27
|
+
|
|
28
|
+
### @orchestrator
|
|
29
|
+
|
|
30
|
+
The central coordinator. Delegates to specialist agents, coordinates wave-structured task execution, and routes tool calls through the supervisor guard for pre-flight and post-execution review. The orchestrator holds the user session context and is the only agent visible as the default agent.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Planning
|
|
35
|
+
|
|
36
|
+
### @architect
|
|
37
|
+
|
|
38
|
+
System design and boundary decisions. Produces architecture diagrams, evaluates technical choices, and enforces architectural constraints. Works upstream of implementation to establish clear boundaries before coding starts.
|
|
39
|
+
|
|
40
|
+
### @planner
|
|
41
|
+
|
|
42
|
+
Wave-structured task planning. Takes feature requests and produces phased implementation plans with dependency graphs, file-level scope assignments, and observable success criteria per step. The output of `@planner` feeds directly into `@backend-coder` and `@frontend-coder`.
|
|
43
|
+
|
|
44
|
+
### @discusser
|
|
45
|
+
|
|
46
|
+
Structured pre-planning Q&A. Asks clarifying questions in a systematic order to surface ambiguities before `@planner` produces a plan. Prevents the wrong plan from being built by ensuring the problem is fully understood first.
|
|
47
|
+
|
|
48
|
+
### @plan-checker
|
|
49
|
+
|
|
50
|
+
Reviews PLAN.md files for quality before execution. Checks completeness, feasibility, and testability. Returns PASS or FAIL with specific recommendations.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Implementation
|
|
55
|
+
|
|
56
|
+
### @backend-coder
|
|
57
|
+
|
|
58
|
+
Implements server-side logic using TDD. Specializes in TypeScript/Node.js services, database integrations, API route handlers, and background workers. Uses `tdd-workflow` skill by default — writes failing tests first, then minimum implementation.
|
|
59
|
+
|
|
60
|
+
### @frontend-coder
|
|
61
|
+
|
|
62
|
+
Implements UI and client-side interactions using TDD. Specializes in React/Vue components, state management, API client calls, and responsive styling. Uses the same TDD discipline as `@backend-coder` but adapted for the frontend context.
|
|
63
|
+
|
|
64
|
+
### @devops
|
|
65
|
+
|
|
66
|
+
Infrastructure and deployment automation. Handles Docker, Kubernetes, CI/CD pipelines, cloud provisioning, and environment configuration. Ensures the system is deployable and monitorable before any feature is considered complete.
|
|
67
|
+
|
|
68
|
+
### @tester
|
|
69
|
+
|
|
70
|
+
Test strategy and gap detection. Analyzes modified files, identifies coverage gaps, and suggests the minimum viable test set to close them. Uses `test-gap-detector` and `test-coverage` skills to drive coverage enforcement.
|
|
71
|
+
|
|
72
|
+
### @debug-specialist
|
|
73
|
+
|
|
74
|
+
Systematic bug diagnosis and repair. Follows a structured root-cause analysis workflow: isolate the failure mode, confirm the reproduction case, identify the root cause, apply a targeted fix, then verify with a regression test.
|
|
75
|
+
|
|
76
|
+
### @build-error-resolver
|
|
77
|
+
|
|
78
|
+
Diagnoses and fixes build errors, compilation failures, and dependency issues. Use immediately when a build fails, types error out, or dependencies are broken.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Review
|
|
83
|
+
|
|
84
|
+
### @reviewer
|
|
85
|
+
|
|
86
|
+
Post-commit code review. Reviews only changed code, applies the security checklist first, then quality checks. Reports findings severity-ranked with specific remediation steps and a clear pass/fail verdict.
|
|
87
|
+
|
|
88
|
+
### @security-auditor
|
|
89
|
+
|
|
90
|
+
Security vulnerability detection. Scans for OWASP Top 10 issues: SQL injection, XSS, authentication bypass, path traversal, hardcoded credentials, and insecure deserialization. Requires a separate review pass before merging any security-sensitive change.
|
|
91
|
+
|
|
92
|
+
### @risk-analyst
|
|
93
|
+
|
|
94
|
+
Failure mode analysis. Identifies what can break from a given change, estimates blast radius, and ranks risks by likelihood and impact. Produces a risk register with specific mitigations for each identified failure mode.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Governance
|
|
99
|
+
|
|
100
|
+
### @policy-enforcer
|
|
101
|
+
|
|
102
|
+
Governance rule enforcement. Validates that agent actions comply with configured policies: guard rails, permission scopes, architectural constraints, and coding standards. Escalates violations with a specific policy citation.
|
|
103
|
+
|
|
104
|
+
### @supervisor
|
|
105
|
+
|
|
106
|
+
Pre-flight and post-execution review of tool calls. Intercepts and validates agent actions against configured policies before execution, and audits decisions after completion for compliance tracking.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Utility
|
|
111
|
+
|
|
112
|
+
### @writer
|
|
113
|
+
|
|
114
|
+
Documentation generation. Reads code structure and produces documentation: API docs from route definitions, component docs from props, README from package manifest. Follows the project conventions in `docs/`.
|
|
115
|
+
|
|
116
|
+
### @doc-updater
|
|
117
|
+
|
|
118
|
+
Updates existing documentation to reflect code changes. Tracks which docs need updating when files are modified and keeps documentation in sync with implementation.
|
|
119
|
+
|
|
120
|
+
### @mapper
|
|
121
|
+
|
|
122
|
+
Codebase indexing. Builds and maintains a searchable index of the codebase: file purposes, dependency graph, API surface, and ownership. Used by `@planner` and `@discusser` for context before planning.
|
|
123
|
+
|
|
124
|
+
### @code-explorer
|
|
125
|
+
|
|
126
|
+
Explores unfamiliar code quickly. Analyzes file structure, traces dependencies, and produces summaries that help other agents understand a new module or codebase area without reading every line.
|
|
127
|
+
|
|
128
|
+
### @researcher
|
|
129
|
+
|
|
130
|
+
API docs and library research. Reads documentation, extracts relevant patterns, and answers questions about libraries, frameworks, and tools used in the project.
|
|
131
|
+
|
|
132
|
+
### @performance-optimizer
|
|
133
|
+
|
|
134
|
+
Identifies and fixes performance bottlenecks using data. Profiles code, detects N+1 queries, analyzes bundle size, and optimizes React render performance. Measures before and after to verify improvements.
|
|
135
|
+
|
|
136
|
+
### @refactor-guide
|
|
137
|
+
|
|
138
|
+
Guides safe refactoring of existing code without changing behavior. Provides step-by-step transformation guidance, ensures tests stay green, and helps extract functions or restructure modules.
|
|
139
|
+
|
|
140
|
+
### @auto-learner
|
|
141
|
+
|
|
142
|
+
Continuously learns from project patterns and agent decisions. Improves future recommendations by analyzing what worked well in similar past tasks.
|
|
143
|
+
|
|
144
|
+
### @design
|
|
145
|
+
|
|
146
|
+
Design-first workflow coordinator. Produces wireframes, component specs, and design token decisions. Runs before `@frontend-coder` starts implementation to ensure UI consistency and user experience quality.
|
|
147
|
+
|
|
148
|
+
### @task-splitter
|
|
149
|
+
|
|
150
|
+
Decomposes complex tasks into parallel workstreams. Analyzes dependencies, groups independent work into waves, and produces a plan for multi-agent execution.
|
|
151
|
+
|
|
152
|
+
### @architect (already listed in Planning)
|
|
153
|
+
|
|
154
|
+
System design and boundary decisions. See Planning section above.
|