@dv.nghiem/flowdeck 0.4.4 → 0.4.5
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/risk-analyst.d.ts.map +1 -1
- package/dist/dashboard/lib/state-reader.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +22 -73
- package/dist/hooks/approval-hook.d.ts.map +1 -1
- package/dist/hooks/event-log-hook.d.ts +12 -0
- package/dist/hooks/event-log-hook.d.ts.map +1 -0
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/hooks/patch-trust.d.ts +0 -1
- package/dist/hooks/patch-trust.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +622 -1145
- package/dist/lib/impact-radar.d.ts.map +1 -1
- package/dist/services/agent-validator.d.ts +1 -1
- package/dist/services/agent-validator.d.ts.map +1 -1
- package/dist/services/event-logger.d.ts +18 -0
- package/dist/services/event-logger.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts.map +1 -1
- package/dist/services/token-metrics.d.ts +1 -1
- package/dist/services/workflow-scorecard.d.ts.map +1 -1
- package/dist/tools/delegate.d.ts +1 -2
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/run-pipeline.d.ts +1 -2
- package/dist/tools/run-pipeline.d.ts.map +1 -1
- package/docs/commands/fd-deploy-check.md +1 -5
- package/docs/commands/fd-reflect.md +8 -9
- package/docs/commands/fd-suggest.md +3 -4
- package/docs/concepts/architecture.md +0 -3
- package/docs/concepts/intelligence.md +2 -36
- package/docs/skills/index.md +0 -2
- package/package.json +2 -2
- package/src/commands/fd-deploy-check.md +1 -5
- package/src/commands/fd-reflect.md +4 -6
- package/src/commands/fd-suggest.md +3 -4
- package/src/skills/change-impact-radar/SKILL.md +3 -4
- package/src/skills/confidence-aware-planning/SKILL.md +0 -1
- package/src/skills/patch-trust-score/SKILL.md +3 -5
- package/dist/dashboard/lib/port-finder.test.d.ts +0 -2
- package/dist/dashboard/lib/port-finder.test.d.ts.map +0 -1
- package/dist/hooks/notifications.test.d.ts +0 -14
- package/dist/hooks/notifications.test.d.ts.map +0 -1
- package/dist/hooks/patch-trust.test.d.ts +0 -2
- package/dist/hooks/patch-trust.test.d.ts.map +0 -1
- package/dist/hooks/telemetry-hook.d.ts +0 -33
- package/dist/hooks/telemetry-hook.d.ts.map +0 -1
- package/dist/hooks/telemetry-hook.test.d.ts +0 -2
- package/dist/hooks/telemetry-hook.test.d.ts.map +0 -1
- package/dist/hooks/tool-guard.test.d.ts +0 -2
- package/dist/hooks/tool-guard.test.d.ts.map +0 -1
- package/dist/lib/research-gate.test.d.ts +0 -2
- package/dist/lib/research-gate.test.d.ts.map +0 -1
- package/dist/services/activity-reporter.d.ts +0 -96
- package/dist/services/activity-reporter.d.ts.map +0 -1
- package/dist/services/activity-reporter.test.d.ts +0 -2
- package/dist/services/activity-reporter.test.d.ts.map +0 -1
- package/dist/services/artifact-store.d.ts +0 -39
- package/dist/services/artifact-store.d.ts.map +0 -1
- package/dist/services/artifact-store.test.d.ts +0 -2
- package/dist/services/artifact-store.test.d.ts.map +0 -1
- package/dist/services/codegraph.test.d.ts +0 -2
- package/dist/services/codegraph.test.d.ts.map +0 -1
- package/dist/services/command-validator.test.d.ts +0 -2
- package/dist/services/command-validator.test.d.ts.map +0 -1
- package/dist/services/context-assembler.d.ts +0 -29
- package/dist/services/context-assembler.d.ts.map +0 -1
- package/dist/services/context-assembler.test.d.ts +0 -2
- package/dist/services/context-assembler.test.d.ts.map +0 -1
- package/dist/services/cost-budget.d.ts +0 -53
- package/dist/services/cost-budget.d.ts.map +0 -1
- package/dist/services/cost-budget.test.d.ts +0 -2
- package/dist/services/cost-budget.test.d.ts.map +0 -1
- package/dist/services/cost-estimator.test.d.ts +0 -2
- package/dist/services/cost-estimator.test.d.ts.map +0 -1
- package/dist/services/draft-verifier.d.ts +0 -48
- package/dist/services/draft-verifier.d.ts.map +0 -1
- package/dist/services/draft-verifier.test.d.ts +0 -2
- package/dist/services/draft-verifier.test.d.ts.map +0 -1
- package/dist/services/governance.test.d.ts +0 -11
- package/dist/services/governance.test.d.ts.map +0 -1
- package/dist/services/index.d.ts +0 -25
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/lazy-rule-loader.test.d.ts +0 -23
- package/dist/services/lazy-rule-loader.test.d.ts.map +0 -1
- package/dist/services/model-router-ext.test.d.ts +0 -2
- package/dist/services/model-router-ext.test.d.ts.map +0 -1
- package/dist/services/model-router.test.d.ts +0 -2
- package/dist/services/model-router.test.d.ts.map +0 -1
- package/dist/services/policy-compiler.d.ts +0 -27
- package/dist/services/policy-compiler.d.ts.map +0 -1
- package/dist/services/preflight-explorer.test.d.ts +0 -25
- package/dist/services/preflight-explorer.test.d.ts.map +0 -1
- package/dist/services/prompt-cache-ext.test.d.ts +0 -2
- package/dist/services/prompt-cache-ext.test.d.ts.map +0 -1
- package/dist/services/prompt-cache.test.d.ts +0 -2
- package/dist/services/prompt-cache.test.d.ts.map +0 -1
- package/dist/services/quick-router.test.d.ts +0 -13
- package/dist/services/quick-router.test.d.ts.map +0 -1
- package/dist/services/recommended-question.test.d.ts +0 -2
- package/dist/services/recommended-question.test.d.ts.map +0 -1
- package/dist/services/rtk-manager.test.d.ts +0 -2
- package/dist/services/rtk-manager.test.d.ts.map +0 -1
- package/dist/services/rtk-policy.test.d.ts +0 -2
- package/dist/services/rtk-policy.test.d.ts.map +0 -1
- package/dist/services/rule-engine.d.ts +0 -29
- package/dist/services/rule-engine.d.ts.map +0 -1
- package/dist/services/rule-engine.test.d.ts +0 -2
- package/dist/services/rule-engine.test.d.ts.map +0 -1
- package/dist/services/services.test.d.ts +0 -2
- package/dist/services/services.test.d.ts.map +0 -1
- package/dist/services/supervisor.test.d.ts +0 -14
- package/dist/services/supervisor.test.d.ts.map +0 -1
- package/dist/services/task-batcher.d.ts +0 -48
- package/dist/services/task-batcher.d.ts.map +0 -1
- package/dist/services/task-batcher.test.d.ts +0 -2
- package/dist/services/task-batcher.test.d.ts.map +0 -1
- package/dist/services/telemetry.d.ts +0 -48
- package/dist/services/telemetry.d.ts.map +0 -1
- package/dist/services/token-budget.d.ts +0 -44
- package/dist/services/token-budget.d.ts.map +0 -1
- package/dist/services/token-budget.test.d.ts +0 -2
- package/dist/services/token-budget.test.d.ts.map +0 -1
- package/dist/services/token-metrics-ext.test.d.ts +0 -2
- package/dist/services/token-metrics-ext.test.d.ts.map +0 -1
- package/dist/services/token-metrics.test.d.ts +0 -2
- package/dist/services/token-metrics.test.d.ts.map +0 -1
- package/dist/tools/agent-dispatch.test.d.ts +0 -2
- package/dist/tools/agent-dispatch.test.d.ts.map +0 -1
- package/dist/tools/codebase-index.test.d.ts +0 -2
- package/dist/tools/codebase-index.test.d.ts.map +0 -1
- package/dist/tools/context-generator.d.ts +0 -3
- package/dist/tools/context-generator.d.ts.map +0 -1
- package/dist/tools/create-skill.d.ts +0 -3
- package/dist/tools/create-skill.d.ts.map +0 -1
- package/dist/tools/dispatch-routing.test.d.ts +0 -2
- package/dist/tools/dispatch-routing.test.d.ts.map +0 -1
- package/dist/tools/failure-replay.test.d.ts +0 -2
- package/dist/tools/failure-replay.test.d.ts.map +0 -1
- package/dist/tools/repo-memory.test.d.ts +0 -2
- package/dist/tools/repo-memory.test.d.ts.map +0 -1
- package/dist/tools/volatility-map.d.ts +0 -18
- package/dist/tools/volatility-map.d.ts.map +0 -1
- package/dist/tools/volatility-map.test.d.ts +0 -2
- package/dist/tools/volatility-map.test.d.ts.map +0 -1
- package/dist/tools/workspace-state.d.ts +0 -3
- package/dist/tools/workspace-state.d.ts.map +0 -1
- package/src/skills/volatility-map/SKILL.md +0 -52
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export type TelemetryEventType = "command.start" | "command.end" | "tool.call" | "tool.complete" | "tool.failed" | "tool.retried" | "tool.fallback" | "cache.hit" | "stage.progress" | "agent.dispatch" | "agent.complete" | "approval.request" | "approval.resolve" | "run.complete" | "run.fail" | "policy.violation" | "patch.scored" | "contract.violation" | "agent.span.open" | "agent.span.close" | "budget.warning" | "budget.exhausted" | "deadlock.detected" | "scorecard.generated" | "supervisor.review";
|
|
2
|
-
export interface TelemetryEvent {
|
|
3
|
-
id: string;
|
|
4
|
-
ts: string;
|
|
5
|
-
session_id: string;
|
|
6
|
-
run_id: string;
|
|
7
|
-
event: TelemetryEventType;
|
|
8
|
-
command?: string;
|
|
9
|
-
agent?: string;
|
|
10
|
-
tool?: string;
|
|
11
|
-
model?: string;
|
|
12
|
-
duration_ms?: number;
|
|
13
|
-
status?: "ok" | "error" | "blocked" | "approved" | "rejected";
|
|
14
|
-
risk_score?: number;
|
|
15
|
-
files?: string[];
|
|
16
|
-
cost_estimate?: number;
|
|
17
|
-
error_category?: string;
|
|
18
|
-
/** Short summary of the tool's input (no raw dumps) */
|
|
19
|
-
input_summary?: string;
|
|
20
|
-
/** Short summary of the tool's result */
|
|
21
|
-
result_summary?: string;
|
|
22
|
-
/** Workflow stage (e.g. "research", "plan", "execute") */
|
|
23
|
-
stage?: string;
|
|
24
|
-
/** Number of retry attempts consumed */
|
|
25
|
-
retry_count?: number;
|
|
26
|
-
/** Estimated input tokens (chars / 4) for this event. */
|
|
27
|
-
input_tokens?: number;
|
|
28
|
-
/** Estimated output tokens (chars / 4) for this event. */
|
|
29
|
-
output_tokens?: number;
|
|
30
|
-
/** Raw input character count before prompt was sent to the model. */
|
|
31
|
-
context_size_chars?: number;
|
|
32
|
-
meta?: Record<string, unknown>;
|
|
33
|
-
}
|
|
34
|
-
export declare function telemetryPath(dir: string): string;
|
|
35
|
-
export declare function appendEvent(dir: string, partial: Omit<TelemetryEvent, "id" | "ts">): TelemetryEvent | null;
|
|
36
|
-
export declare function readEvents(dir: string, limit?: number): TelemetryEvent[];
|
|
37
|
-
export declare function getRunEvents(dir: string, run_id: string): TelemetryEvent[];
|
|
38
|
-
export interface CommandSummary {
|
|
39
|
-
command: string;
|
|
40
|
-
total_runs: number;
|
|
41
|
-
successes: number;
|
|
42
|
-
failures: number;
|
|
43
|
-
avg_duration_ms: number;
|
|
44
|
-
last_run: string;
|
|
45
|
-
}
|
|
46
|
-
export declare function getCommandSummary(dir: string, n?: number): CommandSummary[];
|
|
47
|
-
export declare function getRecentToolFailures(dir: string, limit?: number): TelemetryEvent[];
|
|
48
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/services/telemetry.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,aAAa,GACb,WAAW,GACX,eAAe,GACf,aAAa,GACb,cAAc,GACd,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,UAAU,GACV,kBAAkB,GAClB,cAAc,GAEd,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GAErB,mBAAmB,CAAA;AAEvB,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,kBAAkB,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,cAAc,GAAG,IAAI,CAa1G;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAM,GAAG,cAAc,EAAE,CAUrE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAE1E;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,SAAM,GAAG,cAAc,EAAE,CAuBxE;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,cAAc,EAAE,CAI/E"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token Budget Service
|
|
3
|
-
*
|
|
4
|
-
* Provides INPUT size budgets and soft response directives by workflow stage
|
|
5
|
-
* and task complexity. These are GUIDANCE values, not hard limits
|
|
6
|
-
* (OpenCode SDK does not expose a max_tokens parameter on session.prompt).
|
|
7
|
-
*
|
|
8
|
-
* Hard controls apply to INPUT: context_chars_limit and prompt_chars_limit
|
|
9
|
-
* cap carry-forward and total prompt size before sending.
|
|
10
|
-
*
|
|
11
|
-
* Soft controls: response_directive is a hint string appended to the prompt.
|
|
12
|
-
* It asks the model to be concise — not enforced at the API level.
|
|
13
|
-
*/
|
|
14
|
-
import type { WorkflowStage } from "./token-metrics";
|
|
15
|
-
import type { TaskComplexity } from "./model-router";
|
|
16
|
-
export interface TokenBudget {
|
|
17
|
-
/** Hard cap on context/carry-forward chars (apply before sending). */
|
|
18
|
-
context_chars_limit: number;
|
|
19
|
-
/** Hard cap on total prompt chars including system instructions. */
|
|
20
|
-
prompt_chars_limit: number;
|
|
21
|
-
/**
|
|
22
|
-
* Soft directive to append to the prompt.
|
|
23
|
-
* Empty string = no constraint injected.
|
|
24
|
-
* This is guidance only — not API-enforced.
|
|
25
|
-
*/
|
|
26
|
-
response_directive: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get the token budget for a given workflow stage and task complexity.
|
|
30
|
-
* Cheap tasks receive ~40% of the base budget; expensive tasks receive ~150%.
|
|
31
|
-
*/
|
|
32
|
-
export declare function getTokenBudget(stage: WorkflowStage, complexity: TaskComplexity): TokenBudget;
|
|
33
|
-
/**
|
|
34
|
-
* Truncate a carry-forward context to fit within budget.
|
|
35
|
-
* Preserves the most recent content (tail) when truncating.
|
|
36
|
-
* Attempts to trim to a line boundary to avoid mid-line cuts.
|
|
37
|
-
*/
|
|
38
|
-
export declare function applyContextBudget(context: string, budget: TokenBudget): string;
|
|
39
|
-
/**
|
|
40
|
-
* Append the response directive to a prompt, if one is set for this budget.
|
|
41
|
-
* Returns the prompt unchanged when no directive applies.
|
|
42
|
-
*/
|
|
43
|
-
export declare function applyResponseDirective(prompt: string, budget: TokenBudget): string;
|
|
44
|
-
//# sourceMappingURL=token-budget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-budget.d.ts","sourceRoot":"","sources":["../../src/services/token-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,CAAA;IAC3B,oEAAoE;IACpE,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAyBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,GAAG,WAAW,CAY5F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAK/E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAGlF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-budget.test.d.ts","sourceRoot":"","sources":["../../src/services/token-budget.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-metrics-ext.test.d.ts","sourceRoot":"","sources":["../../src/services/token-metrics-ext.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-metrics.test.d.ts","sourceRoot":"","sources":["../../src/services/token-metrics.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-dispatch.test.d.ts","sourceRoot":"","sources":["../../src/tools/agent-dispatch.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codebase-index.test.d.ts","sourceRoot":"","sources":["../../src/tools/codebase-index.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-generator.d.ts","sourceRoot":"","sources":["../../src/tools/context-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAI/D,eAAO,MAAM,oBAAoB,EAAE,cAuDjC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-skill.d.ts","sourceRoot":"","sources":["../../src/tools/create-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAO/D,eAAO,MAAM,eAAe,EAAE,cAgD5B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-routing.test.d.ts","sourceRoot":"","sources":["../../src/tools/dispatch-routing.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"failure-replay.test.d.ts","sourceRoot":"","sources":["../../src/tools/failure-replay.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repo-memory.test.d.ts","sourceRoot":"","sources":["../../src/tools/repo-memory.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
-
export interface VolatilityEntry {
|
|
3
|
-
path: string;
|
|
4
|
-
churn_score: number;
|
|
5
|
-
hotfix_count: number;
|
|
6
|
-
todo_count: number;
|
|
7
|
-
last_breakage?: string;
|
|
8
|
-
stability: "stable" | "moderate" | "volatile" | "critical";
|
|
9
|
-
notes: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface VolatilityStore {
|
|
12
|
-
version: string;
|
|
13
|
-
last_updated: string;
|
|
14
|
-
generated_at: string;
|
|
15
|
-
entries: VolatilityEntry[];
|
|
16
|
-
}
|
|
17
|
-
export declare const volatilityMapTool: ToolDefinition;
|
|
18
|
-
//# sourceMappingURL=volatility-map.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"volatility-map.d.ts","sourceRoot":"","sources":["../../src/tools/volatility-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAO/D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;IAC1D,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,eAAe,EAAE,CAAA;CAC3B;AA+BD,eAAO,MAAM,iBAAiB,EAAE,cAwE9B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"volatility-map.test.d.ts","sourceRoot":"","sources":["../../src/tools/volatility-map.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../../src/tools/workspace-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAiH/D,eAAO,MAAM,kBAAkB,EAAE,cAmC/B,CAAA"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: volatility-map
|
|
3
|
-
description: Highlight unstable zones of the repo based on commit churn, recent breakages, hotfix frequency, and unresolved TODO clusters.
|
|
4
|
-
origin: FlowDeck
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Codebase Volatility Map
|
|
8
|
-
|
|
9
|
-
Activate this skill to generate a heatmap of the most unstable parts of the codebase. Results are stored in `.codebase/VOLATILITY.json` for use by other FlowDeck features.
|
|
10
|
-
|
|
11
|
-
## Stability Levels
|
|
12
|
-
|
|
13
|
-
| Level | Score | Meaning |
|
|
14
|
-
|-------|-------|---------|
|
|
15
|
-
| stable | 0–19 | Low churn, no hotfixes, few TODOs |
|
|
16
|
-
| moderate | 20–49 | Some churn, occasional fixes |
|
|
17
|
-
| volatile | 50–79 | High churn or repeated hotfixes |
|
|
18
|
-
| critical | 80+ | Highest risk, most likely to break |
|
|
19
|
-
|
|
20
|
-
## Score Formula
|
|
21
|
-
|
|
22
|
-
`score = churn_commits + (hotfix_count × 10) + (todo_count × 2)`
|
|
23
|
-
|
|
24
|
-
## Data Collection Workflow
|
|
25
|
-
|
|
26
|
-
1. **Churn analysis** (git log, last 90 days):
|
|
27
|
-
```bash
|
|
28
|
-
git log --since="90 days ago" --name-only --pretty=format: | sort | uniq -c | sort -rn
|
|
29
|
-
```
|
|
30
|
-
2. **Hotfix detection** (commit messages):
|
|
31
|
-
```bash
|
|
32
|
-
git log --since="90 days ago" --pretty=format:"%s %H" | grep -i "hotfix\|revert\|urgent\|critical"
|
|
33
|
-
```
|
|
34
|
-
3. **TODO scan** (source files):
|
|
35
|
-
```bash
|
|
36
|
-
grep -rn "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" | cut -d: -f1 | sort | uniq -c
|
|
37
|
-
```
|
|
38
|
-
4. Write results to VOLATILITY.json via `volatility-map` tool
|
|
39
|
-
|
|
40
|
-
## How Other Features Use This
|
|
41
|
-
|
|
42
|
-
- **Patch Trust Score**: deducts points for volatile/critical files
|
|
43
|
-
- **Change Impact Radar**: flags volatile files in impact reports
|
|
44
|
-
- **Safe Execution Modes**: switches to `guarded` for volatile, `review-only` for critical
|
|
45
|
-
- **Human Review Routing**: escalates changes to volatile files to senior reviewers
|
|
46
|
-
|
|
47
|
-
## Refresh Schedule
|
|
48
|
-
|
|
49
|
-
Refresh the volatility map:
|
|
50
|
-
- Before any significant feature work
|
|
51
|
-
- After a production incident
|
|
52
|
-
- Weekly in active development periods
|