canicode 0.11.1 → 0.11.3
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 +2 -2
- package/dist/cli/index.js +188 -191
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +40 -9
- package/dist/index.js +33 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +84 -20
- package/dist/mcp/server.js.map +1 -1
- package/docs/CUSTOMIZATION.md +40 -2
- package/package.json +3 -2
- package/skills/canicode-gotchas/SKILL.md +74 -12
- package/skills/canicode-roundtrip/SKILL.md +69 -10
- package/skills/canicode-roundtrip/canicode-roundtrip-helpers.d.ts +54 -0
- package/skills/canicode-roundtrip/helpers-bootstrap.js +21 -0
- package/skills/canicode-roundtrip/helpers-installer.js +14 -0
- package/skills/cursor/canicode-gotchas/SKILL.md +74 -12
- package/skills/cursor/canicode-roundtrip/SKILL.md +69 -10
- package/skills/cursor/canicode-roundtrip/canicode-roundtrip-helpers.d.ts +54 -0
- package/skills/cursor/canicode-roundtrip/helpers-bootstrap.js +21 -0
- package/skills/cursor/canicode-roundtrip/helpers-installer.js +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { GetFileResponse, Node } from '@figma/rest-api-spec';
|
|
3
3
|
|
|
4
|
-
var version = "0.11.
|
|
4
|
+
var version = "0.11.3";
|
|
5
5
|
|
|
6
6
|
declare const SeveritySchema: z.ZodEnum<{
|
|
7
7
|
blocking: "blocking";
|
|
@@ -798,7 +798,11 @@ type GotchaSurveyQuestion = z.infer<typeof GotchaSurveyQuestionSchema>;
|
|
|
798
798
|
*/
|
|
799
799
|
declare const SurveyQuestionBatchSchema: z.ZodObject<{
|
|
800
800
|
ruleId: z.ZodString;
|
|
801
|
-
|
|
801
|
+
batchMode: z.ZodEnum<{
|
|
802
|
+
safe: "safe";
|
|
803
|
+
"opt-in": "opt-in";
|
|
804
|
+
none: "none";
|
|
805
|
+
}>;
|
|
802
806
|
questions: z.ZodArray<z.ZodObject<{
|
|
803
807
|
nodeId: z.ZodString;
|
|
804
808
|
nodeName: z.ZodString;
|
|
@@ -857,7 +861,11 @@ declare const SurveyQuestionGroupSchema: z.ZodObject<{
|
|
|
857
861
|
}, z.core.$strip>>;
|
|
858
862
|
batches: z.ZodArray<z.ZodObject<{
|
|
859
863
|
ruleId: z.ZodString;
|
|
860
|
-
|
|
864
|
+
batchMode: z.ZodEnum<{
|
|
865
|
+
safe: "safe";
|
|
866
|
+
"opt-in": "opt-in";
|
|
867
|
+
none: "none";
|
|
868
|
+
}>;
|
|
861
869
|
questions: z.ZodArray<z.ZodObject<{
|
|
862
870
|
nodeId: z.ZodString;
|
|
863
871
|
nodeName: z.ZodString;
|
|
@@ -918,7 +926,11 @@ declare const GroupedSurveySchema: z.ZodObject<{
|
|
|
918
926
|
}, z.core.$strip>>;
|
|
919
927
|
batches: z.ZodArray<z.ZodObject<{
|
|
920
928
|
ruleId: z.ZodString;
|
|
921
|
-
|
|
929
|
+
batchMode: z.ZodEnum<{
|
|
930
|
+
safe: "safe";
|
|
931
|
+
"opt-in": "opt-in";
|
|
932
|
+
none: "none";
|
|
933
|
+
}>;
|
|
922
934
|
questions: z.ZodArray<z.ZodObject<{
|
|
923
935
|
nodeId: z.ZodString;
|
|
924
936
|
nodeName: z.ZodString;
|
|
@@ -1039,7 +1051,11 @@ declare const GotchaSurveySchema: z.ZodObject<{
|
|
|
1039
1051
|
}, z.core.$strip>>;
|
|
1040
1052
|
batches: z.ZodArray<z.ZodObject<{
|
|
1041
1053
|
ruleId: z.ZodString;
|
|
1042
|
-
|
|
1054
|
+
batchMode: z.ZodEnum<{
|
|
1055
|
+
safe: "safe";
|
|
1056
|
+
"opt-in": "opt-in";
|
|
1057
|
+
none: "none";
|
|
1058
|
+
}>;
|
|
1043
1059
|
questions: z.ZodArray<z.ZodObject<{
|
|
1044
1060
|
nodeId: z.ZodString;
|
|
1045
1061
|
nodeName: z.ZodString;
|
|
@@ -1091,6 +1107,7 @@ declare const GotchaSurveySchema: z.ZodObject<{
|
|
|
1091
1107
|
}, z.core.$strip>>;
|
|
1092
1108
|
}, z.core.$strip>;
|
|
1093
1109
|
designKey: z.ZodString;
|
|
1110
|
+
suggestedDefaultApply: z.ZodBoolean;
|
|
1094
1111
|
}, z.core.$strip>;
|
|
1095
1112
|
type GotchaSurvey = z.infer<typeof GotchaSurveySchema>;
|
|
1096
1113
|
|
|
@@ -1277,12 +1294,25 @@ interface ScoreReport {
|
|
|
1277
1294
|
* Grade levels based on percentage
|
|
1278
1295
|
*/
|
|
1279
1296
|
type Grade = "S" | "A+" | "A" | "B+" | "B" | "C+" | "C" | "D" | "F";
|
|
1297
|
+
/**
|
|
1298
|
+
* Grade ordinal order from best to worst. Lower index = better grade.
|
|
1299
|
+
* Used for ordinal comparison in isReadyForCodeGen.
|
|
1300
|
+
*/
|
|
1301
|
+
declare const GRADE_ORDER: readonly Grade[];
|
|
1302
|
+
/**
|
|
1303
|
+
* Default minimum grade for code-gen readiness. Designs at this grade or better
|
|
1304
|
+
* are considered ready for code generation. User-configurable via --ready-min-grade
|
|
1305
|
+
* CLI flag, codegenReadyMinGrade configPath field, or MCP param.
|
|
1306
|
+
*/
|
|
1307
|
+
declare const DEFAULT_CODEGEN_READY_MIN_GRADE: Grade;
|
|
1280
1308
|
/**
|
|
1281
1309
|
* Returns true if the design is ready for code generation.
|
|
1282
|
-
* S, A+, and A grades (percentage >= 85)
|
|
1283
|
-
*
|
|
1310
|
+
* By default, S, A+, and A grades (percentage >= 85) pass. Users can tighten or
|
|
1311
|
+
* loosen this threshold via the optional minGrade parameter (or codegenReadyMinGrade
|
|
1312
|
+
* in config / --ready-min-grade CLI flag). A grade passes when its ordinal position
|
|
1313
|
+
* in GRADE_ORDER is <= the minGrade position (lower index = better grade).
|
|
1284
1314
|
*/
|
|
1285
|
-
declare function isReadyForCodeGen(grade: Grade): boolean;
|
|
1315
|
+
declare function isReadyForCodeGen(grade: Grade, minGrade?: Grade): boolean;
|
|
1286
1316
|
/**
|
|
1287
1317
|
* Convert grade to a CSS-safe class name suffix
|
|
1288
1318
|
* e.g. "A+" -> "Aplus", "B+" -> "Bplus", "C+" -> "Cplus"
|
|
@@ -1319,6 +1349,7 @@ declare function getSeverityLabel(severity: Severity): string;
|
|
|
1319
1349
|
declare function buildResultJson(fileName: string, result: AnalysisResult, scores: ScoreReport, options?: {
|
|
1320
1350
|
fileKey?: string;
|
|
1321
1351
|
designKey?: string;
|
|
1352
|
+
codegenReadyMinGrade?: Grade;
|
|
1322
1353
|
}): Record<string, unknown>;
|
|
1323
1354
|
|
|
1324
1355
|
/**
|
|
@@ -2345,4 +2376,4 @@ declare class ActivityLogger {
|
|
|
2345
2376
|
getLogPath(): string;
|
|
2346
2377
|
}
|
|
2347
2378
|
|
|
2348
|
-
export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, type AnalysisScope, AnalysisScopeSchema, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, type CalibrationConfig, type CalibrationConfigInput, CalibrationConfigSchema, type CalibrationRun, type CalibrationStatus, CalibrationStatusSchema, type Category, CategorySchema, type CategoryScore, type CategoryScoreResult, CategoryScoreSchema, type Confidence, ConfidenceSchema, type ConversionRecord, ConversionRecordSchema, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Detection, DetectionSchema, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type GotchaApplyResolution, type GotchaApplyStrategy, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, type GotchaSurvey, type GotchaSurveyQuestion, GotchaSurveyQuestionSchema, GotchaSurveySchema, type Grade, type GridChildAlign, GridChildAlignSchema, type GroupedSurvey, GroupedSurveySchema, type InstanceChildIdParts, type InstanceContext, InstanceContextSchema, type Issue, IssueSchema, type LayoutAlign, LayoutAlignSchema, type LayoutConstraint, LayoutConstraintSchema, type LayoutMode, LayoutModeSchema, type LayoutPositioning, LayoutPositioningSchema, type LayoutWrap, LayoutWrapSchema, type McpAnalyzeResponse, McpAnalyzeResponseSchema, type MismatchCase, MismatchCaseSchema, type MismatchType, MismatchTypeSchema, type NewRuleProposal, NewRuleProposalSchema, type NodeIssueDetail, type NodeIssueSummary, NodeIssueSummarySchema, type OutputChannel, OutputChannelSchema, type OverflowDirection, OverflowDirectionSchema, type PersistenceIntent, PersistenceIntentSchema, type Preset, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, type Report, type ReportMetadata, ReportMetadataSchema, ReportSchema, type Rule, type RuleApplyStrategy, RuleApplyStrategySchema, type RuleCheckFn, type RuleConfig, RuleConfigSchema, type RuleContext, type RuleDefinition, RuleDefinitionSchema, RuleEngine, type RuleEngineOptions, type RuleFailure, type RuleId, RuleImpactAssessmentSchema, type RulePurpose, RulePurposeSchema, type RuleRelatedStruggle, RuleRelatedStruggleSchema, type RuleViolation, SEVERITY_LABELS, SEVERITY_WEIGHT, type SamplingStrategy, SamplingStrategySchema, type ScoreAdjustment, ScoreAdjustmentSchema, type ScoreReport, type Severity, SeveritySchema, type StripDeltaForEval, type StripDeltaResult, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, type SurveyQuestionBatch, SurveyQuestionBatchSchema, type SurveyQuestionGroup, SurveyQuestionGroupSchema, type TuningAgentInput, type TuningAgentOutput, type UncoveredStruggle, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, type VisualCompareCliOptions, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, isInstanceChildNodeId, isReadyForCodeGen, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, parseInstanceChildNodeId, rawValue, resolveComponentDefinitions, resolveGotchaApplyTarget, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };
|
|
2379
|
+
export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, type AnalysisScope, AnalysisScopeSchema, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, type CalibrationConfig, type CalibrationConfigInput, CalibrationConfigSchema, type CalibrationRun, type CalibrationStatus, CalibrationStatusSchema, type Category, CategorySchema, type CategoryScore, type CategoryScoreResult, CategoryScoreSchema, type Confidence, ConfidenceSchema, type ConversionRecord, ConversionRecordSchema, DEFAULT_CODEGEN_READY_MIN_GRADE, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Detection, DetectionSchema, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, GRADE_ORDER, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type GotchaApplyResolution, type GotchaApplyStrategy, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, type GotchaSurvey, type GotchaSurveyQuestion, GotchaSurveyQuestionSchema, GotchaSurveySchema, type Grade, type GridChildAlign, GridChildAlignSchema, type GroupedSurvey, GroupedSurveySchema, type InstanceChildIdParts, type InstanceContext, InstanceContextSchema, type Issue, IssueSchema, type LayoutAlign, LayoutAlignSchema, type LayoutConstraint, LayoutConstraintSchema, type LayoutMode, LayoutModeSchema, type LayoutPositioning, LayoutPositioningSchema, type LayoutWrap, LayoutWrapSchema, type McpAnalyzeResponse, McpAnalyzeResponseSchema, type MismatchCase, MismatchCaseSchema, type MismatchType, MismatchTypeSchema, type NewRuleProposal, NewRuleProposalSchema, type NodeIssueDetail, type NodeIssueSummary, NodeIssueSummarySchema, type OutputChannel, OutputChannelSchema, type OverflowDirection, OverflowDirectionSchema, type PersistenceIntent, PersistenceIntentSchema, type Preset, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, type Report, type ReportMetadata, ReportMetadataSchema, ReportSchema, type Rule, type RuleApplyStrategy, RuleApplyStrategySchema, type RuleCheckFn, type RuleConfig, RuleConfigSchema, type RuleContext, type RuleDefinition, RuleDefinitionSchema, RuleEngine, type RuleEngineOptions, type RuleFailure, type RuleId, RuleImpactAssessmentSchema, type RulePurpose, RulePurposeSchema, type RuleRelatedStruggle, RuleRelatedStruggleSchema, type RuleViolation, SEVERITY_LABELS, SEVERITY_WEIGHT, type SamplingStrategy, SamplingStrategySchema, type ScoreAdjustment, ScoreAdjustmentSchema, type ScoreReport, type Severity, SeveritySchema, type StripDeltaForEval, type StripDeltaResult, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, type SurveyQuestionBatch, SurveyQuestionBatchSchema, type SurveyQuestionGroup, SurveyQuestionGroupSchema, type TuningAgentInput, type TuningAgentOutput, type UncoveredStruggle, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, type VisualCompareCliOptions, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, isInstanceChildNodeId, isReadyForCodeGen, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, parseInstanceChildNodeId, rawValue, resolveComponentDefinitions, resolveGotchaApplyTarget, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import 'crypto';
|
|
|
6
6
|
import { homedir } from 'os';
|
|
7
7
|
|
|
8
8
|
// package.json
|
|
9
|
-
var version = "0.11.
|
|
9
|
+
var version = "0.11.3";
|
|
10
10
|
var SeveritySchema = z.enum([
|
|
11
11
|
"blocking",
|
|
12
12
|
"risk",
|
|
@@ -411,13 +411,17 @@ var GotchaSurveyQuestionSchema = z.object({
|
|
|
411
411
|
var SurveyQuestionBatchSchema = z.object({
|
|
412
412
|
ruleId: z.string(),
|
|
413
413
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
414
|
+
* Rendering mode for this batch (see `BatchMode` in
|
|
415
|
+
* `src/core/gotcha/group-and-batch-questions.ts` — the authoritative
|
|
416
|
+
* whitelists `BATCHABLE_RULE_IDS` and `OPT_IN_BATCHABLE_RULE_IDS` live
|
|
417
|
+
* there):
|
|
418
|
+
* - `"safe"` — one answer uniformly applies to every member (#369).
|
|
419
|
+
* - `"opt-in"` — one shared answer is a suggested default; the user may
|
|
420
|
+
* reply `split` for per-node override (#426).
|
|
421
|
+
* - `"none"` — single-member batch, renders the standard per-question
|
|
422
|
+
* template.
|
|
419
423
|
*/
|
|
420
|
-
|
|
424
|
+
batchMode: z.enum(["safe", "opt-in", "none"]),
|
|
421
425
|
questions: z.array(GotchaSurveyQuestionSchema),
|
|
422
426
|
/**
|
|
423
427
|
* Sum of `max(question.replicas, 1)` across `questions`. Counts the
|
|
@@ -451,7 +455,21 @@ var GotchaSurveySchema = z.object({
|
|
|
451
455
|
* this directly when upserting the per-design section, so the SKILL.md
|
|
452
456
|
* prose no longer parses URLs (per ADR-016).
|
|
453
457
|
*/
|
|
454
|
-
designKey: z.string()
|
|
458
|
+
designKey: z.string(),
|
|
459
|
+
/**
|
|
460
|
+
* #428 — threshold hint for the `allowDefinitionWrite` picker in the
|
|
461
|
+
* `canicode-roundtrip` skill. `true` when `propagationCandidates >= 3`
|
|
462
|
+
* (i.e. three or more questions target instance children that could
|
|
463
|
+
* benefit from definition-level writes). When `false`, the skill silently
|
|
464
|
+
* uses the annotation default (ADR-012) without surfacing the picker —
|
|
465
|
+
* the opt-in flow is over-engineered for tiny surveys.
|
|
466
|
+
*
|
|
467
|
+
* Computed server-side from `questions` so the skill doesn't have to
|
|
468
|
+
* count `isInstanceChild` manually; the skill may still override this
|
|
469
|
+
* hint when it has additional context (e.g. all candidates are
|
|
470
|
+
* read-only per probe result).
|
|
471
|
+
*/
|
|
472
|
+
suggestedDefaultApply: z.boolean()
|
|
455
473
|
});
|
|
456
474
|
|
|
457
475
|
// src/core/rules/rule-config.ts
|
|
@@ -1126,6 +1144,8 @@ function computeApplyContext(violation, instanceContext) {
|
|
|
1126
1144
|
}
|
|
1127
1145
|
|
|
1128
1146
|
// src/core/engine/scoring.ts
|
|
1147
|
+
var GRADE_ORDER = ["S", "A+", "A", "B+", "B", "C+", "C", "D", "F"];
|
|
1148
|
+
var DEFAULT_CODEGEN_READY_MIN_GRADE = "A";
|
|
1129
1149
|
function computeTotalScorePerCategory(configs) {
|
|
1130
1150
|
const totals = Object.fromEntries(
|
|
1131
1151
|
CATEGORIES.map((c) => [c, 0])
|
|
@@ -1152,8 +1172,9 @@ function calculateGrade(percentage) {
|
|
|
1152
1172
|
if (percentage >= 50) return "D";
|
|
1153
1173
|
return "F";
|
|
1154
1174
|
}
|
|
1155
|
-
function isReadyForCodeGen(grade) {
|
|
1156
|
-
|
|
1175
|
+
function isReadyForCodeGen(grade, minGrade) {
|
|
1176
|
+
const threshold = minGrade ?? DEFAULT_CODEGEN_READY_MIN_GRADE;
|
|
1177
|
+
return GRADE_ORDER.indexOf(grade) <= GRADE_ORDER.indexOf(threshold);
|
|
1157
1178
|
}
|
|
1158
1179
|
function gradeToClassName(grade) {
|
|
1159
1180
|
return grade.replace("+", "plus");
|
|
@@ -1361,7 +1382,7 @@ function buildResultJson(fileName, result, scores, options) {
|
|
|
1361
1382
|
scope: result.scope,
|
|
1362
1383
|
issueCount: result.issues.length,
|
|
1363
1384
|
acknowledgedCount: scores.summary.acknowledgedCount,
|
|
1364
|
-
isReadyForCodeGen: isReadyForCodeGen(scores.overall.grade),
|
|
1385
|
+
isReadyForCodeGen: isReadyForCodeGen(scores.overall.grade, options?.codegenReadyMinGrade),
|
|
1365
1386
|
blockingIssueCount: scores.summary.blocking,
|
|
1366
1387
|
scores: {
|
|
1367
1388
|
overall: scores.overall,
|
|
@@ -5339,6 +5360,6 @@ var ActivityLogger = class {
|
|
|
5339
5360
|
}
|
|
5340
5361
|
};
|
|
5341
5362
|
|
|
5342
|
-
export { ALL_STRIP_TYPES, ActivityLogger, AnalysisFileSchema, AnalysisNodeSchema, AnalysisNodeTypeSchema, AnalysisScopeSchema, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, CalibrationConfigSchema, CalibrationStatusSchema, CategorySchema, CategoryScoreSchema, ConfidenceSchema, ConversionRecordSchema, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, DetectionSchema, DifficultySchema, FigmaClient, FigmaClientError, FigmaFileLoadError, FigmaUrlInfoSchema, FigmaUrlParseError, GapAnalyzerOutputSchema, GapEntrySchema, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, GotchaSurveyQuestionSchema, GotchaSurveySchema, GridChildAlignSchema, GroupedSurveySchema, InstanceContextSchema, IssueSchema, LayoutAlignSchema, LayoutConstraintSchema, LayoutModeSchema, LayoutPositioningSchema, LayoutWrapSchema, McpAnalyzeResponseSchema, MismatchCaseSchema, MismatchTypeSchema, NewRuleProposalSchema, NodeIssueSummarySchema, OutputChannelSchema, OverflowDirectionSchema, PersistenceIntentSchema, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, ReportMetadataSchema, ReportSchema, RuleApplyStrategySchema, RuleConfigSchema, RuleDefinitionSchema, RuleEngine, RuleImpactAssessmentSchema, RulePurposeSchema, RuleRelatedStruggleSchema, SEVERITY_LABELS, SEVERITY_WEIGHT, SamplingStrategySchema, ScoreAdjustmentSchema, SeveritySchema, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, SurveyQuestionBatchSchema, SurveyQuestionGroupSchema, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, isInstanceChildNodeId, isReadyForCodeGen, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, parseInstanceChildNodeId, rawValue, resolveComponentDefinitions, resolveGotchaApplyTarget, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };
|
|
5363
|
+
export { ALL_STRIP_TYPES, ActivityLogger, AnalysisFileSchema, AnalysisNodeSchema, AnalysisNodeTypeSchema, AnalysisScopeSchema, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, CalibrationConfigSchema, CalibrationStatusSchema, CategorySchema, CategoryScoreSchema, ConfidenceSchema, ConversionRecordSchema, DEFAULT_CODEGEN_READY_MIN_GRADE, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, DetectionSchema, DifficultySchema, FigmaClient, FigmaClientError, FigmaFileLoadError, FigmaUrlInfoSchema, FigmaUrlParseError, GRADE_ORDER, GapAnalyzerOutputSchema, GapEntrySchema, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, GotchaSurveyQuestionSchema, GotchaSurveySchema, GridChildAlignSchema, GroupedSurveySchema, InstanceContextSchema, IssueSchema, LayoutAlignSchema, LayoutConstraintSchema, LayoutModeSchema, LayoutPositioningSchema, LayoutWrapSchema, McpAnalyzeResponseSchema, MismatchCaseSchema, MismatchTypeSchema, NewRuleProposalSchema, NodeIssueSummarySchema, OutputChannelSchema, OverflowDirectionSchema, PersistenceIntentSchema, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, ReportMetadataSchema, ReportSchema, RuleApplyStrategySchema, RuleConfigSchema, RuleDefinitionSchema, RuleEngine, RuleImpactAssessmentSchema, RulePurposeSchema, RuleRelatedStruggleSchema, SEVERITY_LABELS, SEVERITY_WEIGHT, SamplingStrategySchema, ScoreAdjustmentSchema, SeveritySchema, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, SurveyQuestionBatchSchema, SurveyQuestionGroupSchema, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, isInstanceChildNodeId, isReadyForCodeGen, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, parseInstanceChildNodeId, rawValue, resolveComponentDefinitions, resolveGotchaApplyTarget, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };
|
|
5343
5364
|
//# sourceMappingURL=index.js.map
|
|
5344
5365
|
//# sourceMappingURL=index.js.map
|