canicode 0.11.1 → 0.11.2
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 +165 -183
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +22 -5
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +22 -5
- package/dist/mcp/server.js.map +1 -1
- package/docs/CUSTOMIZATION.md +38 -2
- package/package.json +2 -2
- package/skills/canicode-gotchas/SKILL.md +53 -7
- package/skills/canicode-roundtrip/SKILL.md +49 -2
- 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 +53 -7
- package/skills/cursor/canicode-roundtrip/SKILL.md +49 -2
- 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.2";
|
|
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
|
|
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.2";
|
|
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
|