@dv.nghiem/flowdeck 0.3.6 → 0.3.7
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/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/supervisor.d.ts +3 -0
- package/dist/agents/supervisor.d.ts.map +1 -0
- package/dist/config/schema.d.ts +36 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/dashboard/lib/state-reader.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +0 -37
- package/dist/dashboard/types.d.ts +0 -2
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard/views/index.ejs +0 -6
- package/dist/dashboard/views/partials/header.ejs +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +808 -1
- package/dist/services/agent-contract-registry.d.ts.map +1 -1
- package/dist/services/supervisor-binding.d.ts +114 -0
- package/dist/services/supervisor-binding.d.ts.map +1 -0
- package/dist/services/supervisor.test.d.ts +14 -0
- package/dist/services/supervisor.test.d.ts.map +1 -0
- package/dist/services/telemetry.d.ts +1 -1
- package/dist/services/telemetry.d.ts.map +1 -1
- package/dist/services/workflow-scorecard.d.ts +20 -0
- package/dist/services/workflow-scorecard.d.ts.map +1 -1
- package/docs/agents.md +1 -1
- package/docs/commands/fd-ask.md +1 -1
- package/docs/commands/fd-deploy-check.md +1 -1
- package/docs/commands/fd-discuss.md +1 -1
- package/docs/commands/fd-fix-bug.md +1 -1
- package/docs/commands/fd-new-feature.md +1 -1
- package/docs/commands/fd-verify.md +18 -0
- package/docs/commands/fd-write-docs.md +1 -1
- package/docs/feature-integration-architecture.md +1 -1
- package/docs/notifications.md +2 -2
- package/docs/quick-start.md +1 -1
- package/docs/skills.md +1 -1
- package/package.json +1 -1
- package/src/commands/fd-new-project.md +0 -1
- package/src/rules/common/agent-orchestration.md +1 -1
- package/src/skills/design-tokens/SKILL.md +250 -0
- package/src/skills/git-release/SKILL.md +1 -1
- package/src/skills/ui-design/SKILL.md +313 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-contract-registry.d.ts","sourceRoot":"","sources":["../../src/services/agent-contract-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,mDAAmD;IACnD,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,2CAA2C;IAC3C,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,qDAAqD;IACrD,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,oCAAoC;IACpC,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AA+
|
|
1
|
+
{"version":3,"file":"agent-contract-registry.d.ts","sourceRoot":"","sources":["../../src/services/agent-contract-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,mDAAmD;IACnD,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,2CAA2C;IAC3C,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,qDAAqD;IACrD,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,oCAAoC;IACpC,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AA+UD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAE/D;AAED,wBAAgB,eAAe,IAAI,aAAa,EAAE,CAEjD;AAED,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAElD"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supervisor Binding Service
|
|
3
|
+
*
|
|
4
|
+
* Programmatic governance layer that reviews existing commands and agents
|
|
5
|
+
* before execution. It never invents new commands or workflows — it only
|
|
6
|
+
* operates on items already registered in the system.
|
|
7
|
+
*
|
|
8
|
+
* Architecture:
|
|
9
|
+
* Orchestrator → [supervisor review] → proceed / block / escalate
|
|
10
|
+
*
|
|
11
|
+
* The supervisor is strictly read-only with respect to the registry:
|
|
12
|
+
* - It inspects what already exists
|
|
13
|
+
* - It validates policy compliance
|
|
14
|
+
* - It returns a structured decision
|
|
15
|
+
* - It NEVER creates or modifies commands or workflows
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The canonical set of registered FlowDeck commands.
|
|
19
|
+
* This list is derived from src/commands/*.md at build time and must NOT
|
|
20
|
+
* be modified by the supervisor under any circumstances.
|
|
21
|
+
*/
|
|
22
|
+
export declare const REGISTERED_COMMANDS: readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* The canonical workflow phases derived from the orchestrator phase state
|
|
25
|
+
* machine. These are the only valid workflow stages in the system.
|
|
26
|
+
*/
|
|
27
|
+
export declare const WORKFLOW_PHASES: readonly string[];
|
|
28
|
+
export type SupervisorDecisionKind = "approve" | "revise" | "block" | "escalate";
|
|
29
|
+
export type SupervisorTargetType = "command" | "agent" | "workflow";
|
|
30
|
+
export type SupervisorReviewPhase = "preflight" | "post-stage";
|
|
31
|
+
export interface SupervisorDecision {
|
|
32
|
+
/** Final decision */
|
|
33
|
+
decision: SupervisorDecisionKind;
|
|
34
|
+
/** Type of the reviewed target */
|
|
35
|
+
targetType: SupervisorTargetType;
|
|
36
|
+
/** Name of the reviewed target (exact registered name) */
|
|
37
|
+
targetName: string;
|
|
38
|
+
/** Whether the target actually exists in the registry */
|
|
39
|
+
exists: boolean;
|
|
40
|
+
/** Human-readable reasons for the decision */
|
|
41
|
+
reasons: string[];
|
|
42
|
+
/** Required inputs or stages that are absent */
|
|
43
|
+
missingRequirements: string[];
|
|
44
|
+
/** Risk conditions detected */
|
|
45
|
+
riskFlags: string[];
|
|
46
|
+
/** Changes the caller must make before proceeding (for "revise") */
|
|
47
|
+
requiredChanges: string[];
|
|
48
|
+
/** Approval gate status */
|
|
49
|
+
approvalStatus: "approved" | "pending" | "denied" | "escalated";
|
|
50
|
+
/** 0–1 confidence in the decision */
|
|
51
|
+
confidenceScore: number;
|
|
52
|
+
/** Whether this was a preflight or post-stage review */
|
|
53
|
+
reviewPhase: SupervisorReviewPhase;
|
|
54
|
+
/** ISO timestamp */
|
|
55
|
+
timestamp: string;
|
|
56
|
+
}
|
|
57
|
+
export interface SupervisorContext {
|
|
58
|
+
/** Task description provided by the user or orchestrator */
|
|
59
|
+
taskDescription?: string;
|
|
60
|
+
/** Current workflow phase at the time of review */
|
|
61
|
+
currentPhase?: string;
|
|
62
|
+
/** Whether required inputs have been confirmed present */
|
|
63
|
+
prerequisitesMet?: boolean;
|
|
64
|
+
/** Specific missing inputs */
|
|
65
|
+
missingInputs?: string[];
|
|
66
|
+
/** Whether design approval is present (for UI-heavy tasks) */
|
|
67
|
+
designApprovalPresent?: boolean;
|
|
68
|
+
/** Whether a regression test exists (for bugfix commands) */
|
|
69
|
+
regressionTestPresent?: boolean;
|
|
70
|
+
/** Whether the target requires explicit human approval */
|
|
71
|
+
approvalRequired?: boolean;
|
|
72
|
+
/** Whether human approval was granted */
|
|
73
|
+
approvalGranted?: boolean;
|
|
74
|
+
/** Review phase: before or after execution */
|
|
75
|
+
reviewPhase?: SupervisorReviewPhase;
|
|
76
|
+
/** Run/session IDs for telemetry */
|
|
77
|
+
run_id?: string;
|
|
78
|
+
session_id?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ResolvedSupervisorConfig {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
mode: "advisory" | "strict";
|
|
83
|
+
/** Command/agent names to gate; empty array means gate all */
|
|
84
|
+
reviewedTargets: string[];
|
|
85
|
+
canBlock: boolean;
|
|
86
|
+
confidenceThreshold: number;
|
|
87
|
+
postExecutionReview: boolean;
|
|
88
|
+
}
|
|
89
|
+
export declare function resolveSupervisorConfig(directory: string): ResolvedSupervisorConfig;
|
|
90
|
+
export declare function isRegisteredCommand(name: string): boolean;
|
|
91
|
+
export declare function isRegisteredAgent(name: string): boolean;
|
|
92
|
+
export declare function isRegisteredTarget(name: string): {
|
|
93
|
+
exists: boolean;
|
|
94
|
+
type: SupervisorTargetType;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Run a supervisor review on an existing command or agent before execution.
|
|
98
|
+
*
|
|
99
|
+
* Returns a structured SupervisorDecision. In "advisory" mode the caller may
|
|
100
|
+
* proceed even on a "block" decision (it should log the decision). In "strict"
|
|
101
|
+
* mode the caller must honour "block" and "escalate".
|
|
102
|
+
*
|
|
103
|
+
* The supervisor NEVER creates a new command or workflow. If the target does
|
|
104
|
+
* not exist, it returns decision="block" with exists=false and explains that
|
|
105
|
+
* the requested target is not registered.
|
|
106
|
+
*/
|
|
107
|
+
export declare function runSupervisorReview(directory: string, targetName: string, ctx?: SupervisorContext): SupervisorDecision;
|
|
108
|
+
/**
|
|
109
|
+
* Shorthand: should execution proceed given a decision and the current config mode?
|
|
110
|
+
* In "advisory" mode, only "block" with a missing-existence check is hard-stopped.
|
|
111
|
+
* In "strict" mode, "block" and "escalate" both halt execution.
|
|
112
|
+
*/
|
|
113
|
+
export declare function shouldProceed(decision: SupervisorDecision, mode: "advisory" | "strict", canBlock: boolean): boolean;
|
|
114
|
+
//# sourceMappingURL=supervisor-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor-binding.d.ts","sourceRoot":"","sources":["../../src/services/supervisor-binding.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supervisor Binding Tests
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* - Approves an existing valid command
|
|
6
|
+
* - Blocks an existing command with missing required stage
|
|
7
|
+
* - Blocks a workflow that violates policy
|
|
8
|
+
* - Does not invent new commands or workflows
|
|
9
|
+
* - Integrates with current orchestrator without breaking existing command routing
|
|
10
|
+
* - Only applied to already-registered commands/workflows
|
|
11
|
+
* - Missing command/workflow reported correctly
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=supervisor.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.test.d.ts","sourceRoot":"","sources":["../../src/services/supervisor.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TelemetryEventType = "command.start" | "command.end" | "tool.call" | "tool.complete" | "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";
|
|
1
|
+
export type TelemetryEventType = "command.start" | "command.end" | "tool.call" | "tool.complete" | "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
2
|
export interface TelemetryEvent {
|
|
3
3
|
id: string;
|
|
4
4
|
ts: string;
|
|
@@ -1 +1 @@
|
|
|
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,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,CAAA;
|
|
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,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,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"}
|
|
@@ -25,6 +25,12 @@ export interface ScorecardDimensions {
|
|
|
25
25
|
handoffQuality: number;
|
|
26
26
|
/** No agent contract violations */
|
|
27
27
|
contractCompliance: number;
|
|
28
|
+
/**
|
|
29
|
+
* Supervisor review outcomes: proportion of reviews that resulted in "approve"
|
|
30
|
+
* or "revise" (recoverable), versus "block" or "escalate" (hard stops).
|
|
31
|
+
* Defaults to 1.0 when the supervisor is disabled or no reviews occurred.
|
|
32
|
+
*/
|
|
33
|
+
supervisorCompliance: number;
|
|
28
34
|
}
|
|
29
35
|
export interface WorkflowScorecard {
|
|
30
36
|
scorecard_id: string;
|
|
@@ -40,6 +46,10 @@ export interface WorkflowScorecard {
|
|
|
40
46
|
human_interventions: number;
|
|
41
47
|
overrides_used: number;
|
|
42
48
|
deadlock_signals: number;
|
|
49
|
+
/** Total supervisor review events for this run */
|
|
50
|
+
supervisor_reviews: number;
|
|
51
|
+
/** Supervisor reviews that resulted in block or escalate */
|
|
52
|
+
supervisor_hard_stops: number;
|
|
43
53
|
success_reason?: string;
|
|
44
54
|
failure_reason?: string;
|
|
45
55
|
}
|
|
@@ -55,6 +65,16 @@ export interface ScorecardInput {
|
|
|
55
65
|
policy_violations?: number;
|
|
56
66
|
human_interventions?: number;
|
|
57
67
|
overrides_used?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Total supervisor reviews that occurred.
|
|
70
|
+
* Computed automatically from telemetry when omitted.
|
|
71
|
+
*/
|
|
72
|
+
supervisor_reviews?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Number of reviews that resulted in "block" or "escalate".
|
|
75
|
+
* Computed automatically from telemetry when omitted.
|
|
76
|
+
*/
|
|
77
|
+
supervisor_hard_stops?: number;
|
|
58
78
|
}
|
|
59
79
|
export declare function scorecardsPath(dir: string): string;
|
|
60
80
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-scorecard.d.ts","sourceRoot":"","sources":["../../src/services/workflow-scorecard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,qBAAqB,EAAE,MAAM,CAAA;IAC7B,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAA;IACrB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAA;IACvB,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAA;IACtB,mCAAmC;IACnC,kBAAkB,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-scorecard.d.ts","sourceRoot":"","sources":["../../src/services/workflow-scorecard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,qBAAqB,EAAE,MAAM,CAAA;IAC7B,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAA;IACrB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAA;IACvB,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAA;IACtB,mCAAmC;IACnC,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;IAClE,UAAU,EAAE,mBAAmB,CAAA;IAC/B,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,kDAAkD;IAClD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,4DAA4D;IAC5D,qBAAqB,EAAE,MAAM,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,4CAA4C;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAgBD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,QAAQ,EACf,KAAK,GAAE,cAAmB,GACzB,iBAAiB,CAiFnB;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,iBAAiB,EAAE,CAS3E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAEvF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,iBAAiB,EAAE,CAIhG;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIhF"}
|
package/docs/agents.md
CHANGED
|
@@ -527,7 +527,7 @@ The writer drafts technical documentation that developers will actually read. It
|
|
|
527
527
|
**Best for:**
|
|
528
528
|
- Writing a README.md from scratch for a new project or module
|
|
529
529
|
- Drafting API reference documentation for newly implemented public functions
|
|
530
|
-
- Creating a changelog entry after a release
|
|
530
|
+
- Creating a changelog entry after a release
|
|
531
531
|
- Writing a code tour or architectural overview document
|
|
532
532
|
|
|
533
533
|
**Example usage:**
|
package/docs/commands/fd-ask.md
CHANGED
|
@@ -46,6 +46,6 @@ Route a free-form task to the best specialized agent automatically.
|
|
|
46
46
|
|
|
47
47
|
After `/fd-ask` completes, you can go deeper:
|
|
48
48
|
|
|
49
|
-
1. **Full workflow** → `/fd-fix-bug`, `/fd-new-feature`, `/fd-
|
|
49
|
+
1. **Full workflow** → `/fd-fix-bug`, `/fd-new-feature`, `/fd-verify`
|
|
50
50
|
2. **Detailed planning** → `/fd-discuss`, `/fd-plan`
|
|
51
51
|
3. **Another question** → `/fd-ask --task '...'`
|
|
@@ -7,5 +7,5 @@ Run the FlowDeck deploy-check workflow before deploying to production.
|
|
|
7
7
|
|
|
8
8
|
1. **Fix blocking issues** → `/fd-fix-bug [issue]`
|
|
9
9
|
2. **Create deployment checkpoint** → `/fd-checkpoint`
|
|
10
|
-
3. **Review code again** → `/fd-
|
|
10
|
+
3. **Review code again** → `/fd-verify`
|
|
11
11
|
4. **View project roadmap** → `/fd-roadmap`
|
|
@@ -22,7 +22,7 @@ After discussion completes, choose your next step:
|
|
|
22
22
|
|
|
23
23
|
1. **Create implementation plan** → `/fd-plan [phase-number]`
|
|
24
24
|
2. **Continue discussion** → `/fd-discuss [phase-number]`
|
|
25
|
-
3. **Review existing work** → `/fd-
|
|
25
|
+
3. **Review existing work** → `/fd-verify`
|
|
26
26
|
4. **Check project dashboard** → `/fd-dashboard`
|
|
27
27
|
|
|
28
28
|
Type the number or the command to proceed.
|
|
@@ -18,7 +18,7 @@ Systematically debug and fix a bug using FlowDeck's structured approach.
|
|
|
18
18
|
|
|
19
19
|
## What Next?
|
|
20
20
|
|
|
21
|
-
1. **Run code review** → `/fd-
|
|
21
|
+
1. **Run code review** → `/fd-verify`
|
|
22
22
|
2. **Check for more bugs** → `/fd-fix-bug [next-issue]`
|
|
23
23
|
3. **Update documentation** → `/fd-write-docs`
|
|
24
24
|
4. **Deploy check** → `/fd-deploy-check`
|
|
@@ -19,7 +19,7 @@ Execute a new feature using FlowDeck's multi-agent workflow.
|
|
|
19
19
|
|
|
20
20
|
## What Next?
|
|
21
21
|
|
|
22
|
-
1. **Review the code** → `/fd-
|
|
22
|
+
1. **Review the code** → `/fd-verify`
|
|
23
23
|
2. **Write documentation** → `/fd-write-docs`
|
|
24
24
|
3. **Deploy check** → `/fd-deploy-check`
|
|
25
25
|
4. **Start next feature** → `/fd-new-feature [description]`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review code quality, security, and conventions — runs parallel @reviewer + @security-auditor agents
|
|
3
|
+
argument-hint: "[file-pattern|dir|stage number]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run the FlowDeck code review workflow. Reviews can target:
|
|
7
|
+
- **Specific files or directories** — `fd-verify src/services/`
|
|
8
|
+
- **Git staged changes** — `fd-verify staged`
|
|
9
|
+
- **Full project** — `fd-verify`
|
|
10
|
+
|
|
11
|
+
## What Next?
|
|
12
|
+
|
|
13
|
+
1. **Fix issues found** → `/fd-fix-bug [issue]`
|
|
14
|
+
2. **Create deployment checkpoint** → `/fd-checkpoint`
|
|
15
|
+
3. **Deploy to production** → `/fd-deploy-check`
|
|
16
|
+
4. **View project dashboard** → `/fd-dashboard`
|
|
17
|
+
|
|
18
|
+
Type the number or command to proceed.
|
|
@@ -5,6 +5,6 @@ Run the FlowDeck write-docs workflow to generate accurate project documentation.
|
|
|
5
5
|
|
|
6
6
|
## What Next?
|
|
7
7
|
|
|
8
|
-
1. **Review documentation** → `/fd-
|
|
8
|
+
1. **Review documentation** → `/fd-verify staged`
|
|
9
9
|
2. **Deploy check** → `/fd-deploy-check`
|
|
10
10
|
3. **Create checkpoint** → `/fd-checkpoint`
|
|
@@ -219,7 +219,7 @@ All existing commands continue to work unchanged. New capabilities are additive:
|
|
|
219
219
|
|
|
220
220
|
- `fd-new-feature` — now uses model router instead of hardcoded models; emits telemetry
|
|
221
221
|
- `fd-fix-bug` — emits run trace on entry, evaluates policies, proposes new policies from failures
|
|
222
|
-
- `fd-
|
|
222
|
+
- `fd-verify` — shows policy violations in output table
|
|
223
223
|
- Dashboard — new operational sections appear only when data exists (no empty-state noise)
|
|
224
224
|
- Approval hook — only triggers for write operations on sensitive file patterns; safe paths are unaffected
|
|
225
225
|
- Telemetry — append-only, never read during hook execution, cannot slow down tool calls
|
package/docs/notifications.md
CHANGED
|
@@ -8,7 +8,7 @@ FlowDeck fires desktop notifications when commands that require your attention c
|
|
|
8
8
|
|
|
9
9
|
When an interactive command finishes (one that either asks questions or produces output you need to approve), FlowDeck sends a desktop notification through the OS notification system. Notification urgency depends on the command:
|
|
10
10
|
|
|
11
|
-
- **Critical-level (urgent):** `/fd-discuss`, `/fd-plan`, `/fd-
|
|
11
|
+
- **Critical-level (urgent):** `/fd-discuss`, `/fd-plan`, `/fd-verify`, `/fd-deploy-check`, `/fd-new-project`
|
|
12
12
|
These commands present questions or decisions that block further progress. The notification is sent at high urgency so it appears even in Do Not Disturb mode on some systems.
|
|
13
13
|
|
|
14
14
|
- **Info-level:** `/fd-new-feature`, `/fd-fix-bug`, `/fd-write-docs`, `/fd-checkpoint`
|
|
@@ -97,7 +97,7 @@ $toast = [Windows.UI.Notifications.ToastNotification]::new($template)
|
|
|
97
97
|
|---------|-------|------|
|
|
98
98
|
| `/fd-discuss` | `FlowDeck: /fd-discuss` | Your input is needed — please check OpenCode |
|
|
99
99
|
| `/fd-plan` | `FlowDeck: /fd-plan` | Your input is needed — please check OpenCode |
|
|
100
|
-
| `/fd-
|
|
100
|
+
| `/fd-verify` | `FlowDeck: /fd-verify` | Your input is needed — please check OpenCode |
|
|
101
101
|
| `/fd-deploy-check` | `FlowDeck: /fd-deploy-check` | Your input is needed — please check OpenCode |
|
|
102
102
|
| `/fd-new-project` | `FlowDeck: /fd-new-project` | Your input is needed — please check OpenCode |
|
|
103
103
|
| `/fd-new-feature` | `FlowDeck: /fd-new-feature complete` | Review the output and choose your next step |
|
package/docs/quick-start.md
CHANGED
|
@@ -45,7 +45,7 @@ This creates the `.planning/` directory at your project root with the following
|
|
|
45
45
|
.planning/
|
|
46
46
|
├── PROJECT.md # Project context: name, goals, constraints, tech stack
|
|
47
47
|
├── STATE.md # Current execution state, tracked by all agents
|
|
48
|
-
├── ROADMAP.md # Phase definitions and
|
|
48
|
+
├── ROADMAP.md # Phase definitions and features
|
|
49
49
|
└── config.json # FlowDeck project configuration
|
|
50
50
|
```
|
|
51
51
|
|
package/docs/skills.md
CHANGED
|
@@ -335,7 +335,7 @@ Creates consistent releases with semantic versioning, changelog generation from
|
|
|
335
335
|
Collect merged PRs since the last tag and generate the changelog entry.
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
-
**When to use:** When a
|
|
338
|
+
**When to use:** When a release is ready to ship, or when a hotfix needs a patch release.
|
|
339
339
|
|
|
340
340
|
---
|
|
341
341
|
|
package/package.json
CHANGED
|
@@ -79,6 +79,6 @@ discuss → plan → execute → review
|
|
|
79
79
|
| discuss | `@discusser` | `/fd-discuss` |
|
|
80
80
|
| plan | `@planner` → `@plan-checker` | `/fd-plan` |
|
|
81
81
|
| execute | `@orchestrator` → `@backend-coder`, `@tester`, etc. | `/fd-new-feature` |
|
|
82
|
-
| review | `@reviewer` + `@security-auditor` | `/fd-
|
|
82
|
+
| review | `@reviewer` + `@security-auditor` | `/fd-verify` |
|
|
83
83
|
|
|
84
84
|
Do not skip phases. The orchestrator enforces phase gating automatically.
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-tokens
|
|
3
|
+
description: Design token system with semantic color palettes, typography scales, spacing systems, and W3C DTCG compliant token definitions
|
|
4
|
+
origin: Built for FlowDeck's design agent workflow
|
|
5
|
+
tags:
|
|
6
|
+
- design
|
|
7
|
+
- tokens
|
|
8
|
+
- semantic
|
|
9
|
+
- w3c-dtcg
|
|
10
|
+
- color
|
|
11
|
+
- typography
|
|
12
|
+
- spacing
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Design Tokens Skill
|
|
16
|
+
|
|
17
|
+
Design tokens are the single source of truth for visual design decisions. They enable consistent, themeable UI and bridge design tools with code.
|
|
18
|
+
|
|
19
|
+
## Token Structure
|
|
20
|
+
|
|
21
|
+
Tokens follow W3C Design Token Community Group (DTCG) format:
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
/* Category/Role/Variant */
|
|
25
|
+
--color-text-primary: oklch(68% 0.21 250);
|
|
26
|
+
--color-surface: oklch(98% 0 0);
|
|
27
|
+
--spacing-lg: 1.5rem; /* 24px */
|
|
28
|
+
--radius-md: 0.5rem; /* 8px */
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Color Tokens
|
|
32
|
+
|
|
33
|
+
### Semantic Color Palette (Light Mode)
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
:root {
|
|
37
|
+
/* Text Colors */
|
|
38
|
+
--color-text-primary: oklch(18% 0 0); /* #1a1a1a - Main text */
|
|
39
|
+
--color-text-secondary: oklch(45% 0 0); /* #6b6b6b - Secondary text */
|
|
40
|
+
--color-text-tertiary: oklch(65% 0 0); /* #a3a3a3 - Muted text */
|
|
41
|
+
--color-text-inverse: oklch(98% 0 0); /* White text on dark */
|
|
42
|
+
|
|
43
|
+
/* Surface Colors */
|
|
44
|
+
--color-surface: oklch(98% 0 0); /* #fafafa - Background */
|
|
45
|
+
--color-surface-elevated: oklch(100% 0 0); /* #ffffff - Cards, modals */
|
|
46
|
+
--color-surface-overlay: oklch(0% 0 0 / 50%); /* #00000050 - Overlays */
|
|
47
|
+
|
|
48
|
+
/* Interactive Colors */
|
|
49
|
+
--color-interactive-primary: oklch(68% 0.21 250); /* Blue - CTAs */
|
|
50
|
+
--color-interactive-hover: oklch(62% 0.22 250); /* Darker blue */
|
|
51
|
+
--color-interactive-active: oklch(55% 0.24 250); /* Even darker */
|
|
52
|
+
--color-interactive-disabled: oklch(85% 0 0); /* Gray - Disabled */
|
|
53
|
+
|
|
54
|
+
/* Feedback Colors */
|
|
55
|
+
--color-success: oklch(72% 0.19 145); /* Green */
|
|
56
|
+
--color-warning: oklch(85% 0.18 85); /* Yellow/Orange */
|
|
57
|
+
--color-error: oklch(63% 0.24 25); /* Red */
|
|
58
|
+
--color-info: oklch(68% 0.21 250); /* Blue - same as primary */
|
|
59
|
+
|
|
60
|
+
/* Border Colors */
|
|
61
|
+
--color-border: oklch(90% 0 0); /* Light gray border */
|
|
62
|
+
--color-border-strong: oklch(75% 0 0); /* Stronger border */
|
|
63
|
+
--color-border-interactive: oklch(68% 0.21 250); /* Focus ring */
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Dark Mode Tokens
|
|
68
|
+
|
|
69
|
+
```css
|
|
70
|
+
@media (prefers-color-scheme: dark) {
|
|
71
|
+
:root {
|
|
72
|
+
--color-text-primary: oklch(92% 0 0);
|
|
73
|
+
--color-text-secondary: oklch(70% 0 0);
|
|
74
|
+
--color-surface: oklch(15% 0 0);
|
|
75
|
+
--color-surface-elevated: oklch(22% 0 0);
|
|
76
|
+
--color-interactive-primary: oklch(75% 0.2 250);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Typography Tokens
|
|
82
|
+
|
|
83
|
+
```css
|
|
84
|
+
:root {
|
|
85
|
+
/* Font Families */
|
|
86
|
+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
87
|
+
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
|
88
|
+
|
|
89
|
+
/* Type Scale */
|
|
90
|
+
--text-xs: 0.75rem; /* 12px - Captions */
|
|
91
|
+
--text-sm: 0.875rem; /* 14px - Small text */
|
|
92
|
+
--text-base: 1rem; /* 16px - Body */
|
|
93
|
+
--text-lg: 1.125rem; /* 18px - Large body */
|
|
94
|
+
--text-xl: 1.25rem; /* 20px - Subheadings */
|
|
95
|
+
--text-2xl: 1.5rem; /* 24px - Section titles */
|
|
96
|
+
--text-3xl: 1.875rem; /* 30px - Page titles */
|
|
97
|
+
--text-4xl: 2.25rem; /* 36px - Hero */
|
|
98
|
+
--text-hero: clamp(3rem, 1rem + 7vw, 8rem); /* Responsive hero */
|
|
99
|
+
|
|
100
|
+
/* Line Heights */
|
|
101
|
+
--leading-tight: 1.1;
|
|
102
|
+
--leading-snug: 1.25;
|
|
103
|
+
--leading-normal: 1.5;
|
|
104
|
+
--leading-relaxed: 1.75;
|
|
105
|
+
|
|
106
|
+
/* Letter Spacing */
|
|
107
|
+
--tracking-tight: -0.02em;
|
|
108
|
+
--tracking-normal: 0;
|
|
109
|
+
--tracking-wide: 0.02em;
|
|
110
|
+
|
|
111
|
+
/* Font Weights */
|
|
112
|
+
--weight-regular: 400;
|
|
113
|
+
--weight-medium: 500;
|
|
114
|
+
--weight-semibold: 600;
|
|
115
|
+
--weight-bold: 700;
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Spacing Tokens
|
|
120
|
+
|
|
121
|
+
```css
|
|
122
|
+
:root {
|
|
123
|
+
/* Base: 4px */
|
|
124
|
+
--space-1: 0.25rem; /* 4px */
|
|
125
|
+
--space-2: 0.5rem; /* 8px */
|
|
126
|
+
--space-3: 0.75rem; /* 12px */
|
|
127
|
+
--space-4: 1rem; /* 16px */
|
|
128
|
+
--space-5: 1.5rem; /* 24px */
|
|
129
|
+
--space-6: 2rem; /* 32px */
|
|
130
|
+
--space-8: 3rem; /* 48px */
|
|
131
|
+
--space-10: 4rem; /* 64px */
|
|
132
|
+
--space-12: 6rem; /* 96px */
|
|
133
|
+
--space-section: clamp(4rem, 3rem + 5vw, 10rem); /* Responsive section spacing */
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Shadow & Elevation Tokens
|
|
138
|
+
|
|
139
|
+
```css
|
|
140
|
+
:root {
|
|
141
|
+
/* Shadows */
|
|
142
|
+
--shadow-sm: 0 1px 2px oklch(0% 0 0 / 5%);
|
|
143
|
+
--shadow-md: 0 4px 6px -1px oklch(0% 0 0 / 10%), 0 2px 4px -2px oklch(0% 0 0 / 10%);
|
|
144
|
+
--shadow-lg: 0 10px 15px -3px oklch(0% 0 0 / 10%), 0 4px 6px -4px oklch(0% 0 0 / 10%);
|
|
145
|
+
--shadow-xl: 0 20px 25px -5px oklch(0% 0 0 / 10%), 0 8px 10px -6px oklch(0% 0 0 / 10%);
|
|
146
|
+
--shadow-glow: 0 0 20px oklch(68% 0.21 250 / 30%);
|
|
147
|
+
|
|
148
|
+
/* Elevation (for layering) */
|
|
149
|
+
--elevation-1: 0 1px 3px var(--shadow-sm);
|
|
150
|
+
--elevation-2: 0 4px 6px var(--shadow-md);
|
|
151
|
+
--elevation-3: 0 10px 15px var(--shadow-lg);
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Border Radius Tokens
|
|
156
|
+
|
|
157
|
+
```css
|
|
158
|
+
:root {
|
|
159
|
+
--radius-sm: 0.25rem; /* 4px - Small elements */
|
|
160
|
+
--radius-md: 0.5rem; /* 8px - Buttons, inputs */
|
|
161
|
+
--radius-lg: 0.75rem; /* 12px - Cards */
|
|
162
|
+
--radius-xl: 1rem; /* 16px - Modals */
|
|
163
|
+
--radius-2xl: 1.5rem; /* 24px - Large containers */
|
|
164
|
+
--radius-full: 9999px; /* Pills, avatars */
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Animation Tokens
|
|
169
|
+
|
|
170
|
+
```css
|
|
171
|
+
:root {
|
|
172
|
+
/* Durations */
|
|
173
|
+
--duration-fast: 150ms;
|
|
174
|
+
--duration-normal: 300ms;
|
|
175
|
+
--duration-slow: 500ms;
|
|
176
|
+
|
|
177
|
+
/* Easing */
|
|
178
|
+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
|
|
179
|
+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
180
|
+
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Token Naming Conventions
|
|
185
|
+
|
|
186
|
+
Follow semantic naming — describe **purpose**, not value:
|
|
187
|
+
|
|
188
|
+
```css
|
|
189
|
+
/* WRONG - describes the value */
|
|
190
|
+
--color-blue-600: #2563eb;
|
|
191
|
+
--space-16: 4rem;
|
|
192
|
+
|
|
193
|
+
/* CORRECT - describes the role */
|
|
194
|
+
--color-interactive-primary: #2563eb;
|
|
195
|
+
--space-section: 4rem;
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Token Categories
|
|
199
|
+
|
|
200
|
+
| Category | Prefix | Example |
|
|
201
|
+
|----------|--------|---------|
|
|
202
|
+
| Color | `--color-` | `--color-text-primary` |
|
|
203
|
+
| Typography | `--typography-` | `--typography-heading-1` |
|
|
204
|
+
| Spacing | `--space-` | `--space-lg` |
|
|
205
|
+
| Sizing | `--size-` | `--size-icon-md` |
|
|
206
|
+
| Border | `--radius-` | `--radius-lg` |
|
|
207
|
+
| Shadow | `--shadow-` | `--shadow-md` |
|
|
208
|
+
| Motion | `--duration-`, `--ease-` | `--duration-fast` |
|
|
209
|
+
|
|
210
|
+
## Exporting Tokens
|
|
211
|
+
|
|
212
|
+
Tokens can be exported to multiple formats:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Using Style Dictionary
|
|
216
|
+
npx style-dictionary build
|
|
217
|
+
|
|
218
|
+
# Generates:
|
|
219
|
+
# - tokens.css (CSS custom properties)
|
|
220
|
+
# - tokens.json (raw JSON)
|
|
221
|
+
# - tokens.js (CommonJS module)
|
|
222
|
+
# - tokens.d.ts (TypeScript definitions)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Applying Tokens in Components
|
|
226
|
+
|
|
227
|
+
```css
|
|
228
|
+
/* Reference tokens, never hardcode */
|
|
229
|
+
.component {
|
|
230
|
+
color: var(--color-text-primary);
|
|
231
|
+
background: var(--color-surface);
|
|
232
|
+
padding: var(--space-lg);
|
|
233
|
+
border-radius: var(--radius-md);
|
|
234
|
+
box-shadow: var(--shadow-md);
|
|
235
|
+
font-size: var(--text-base);
|
|
236
|
+
transition: all var(--duration-fast) var(--ease-out-expo);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Figma Integration
|
|
241
|
+
|
|
242
|
+
When using Figma MCP, extract tokens from:
|
|
243
|
+
|
|
244
|
+
1. **Color styles** → Map to `--color-*` tokens
|
|
245
|
+
2. **Text styles** → Map to `--typography-*` tokens
|
|
246
|
+
3. **Effect styles** → Map to `--shadow-*` tokens
|
|
247
|
+
4. **Auto layout spacing** → Map to `--space-*` tokens
|
|
248
|
+
5. **Component properties** → Map to semantic role tokens
|
|
249
|
+
|
|
250
|
+
Tokens bridge the gap between design tools and code — they ensure that what designers specify in Figma translates directly to production code.
|
|
@@ -11,7 +11,7 @@ Creates releases with consistent versioning, accurate changelogs, and proper tag
|
|
|
11
11
|
## When to Activate
|
|
12
12
|
|
|
13
13
|
Activate when:
|
|
14
|
-
- A
|
|
14
|
+
- A release is complete and ready to ship
|
|
15
15
|
- You need to cut a release tag
|
|
16
16
|
- You need to generate a CHANGELOG entry
|
|
17
17
|
|