@gyomu/ai-compiler 0.2.4-beta.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.
Files changed (67) hide show
  1. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.d.ts +2 -0
  2. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.d.ts.map +1 -0
  3. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.js +67 -0
  4. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.js.map +1 -0
  5. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.test.d.ts +2 -0
  6. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.test.d.ts.map +1 -0
  7. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.test.js +60 -0
  8. package/dist/pipelines/jsdoc-update/__sit__/documentable-child-members.test.js.map +1 -0
  9. package/dist/pipelines/jsdoc-update/__sit__/existing-jsdoc.test.d.ts +2 -0
  10. package/dist/pipelines/jsdoc-update/__sit__/existing-jsdoc.test.d.ts.map +1 -0
  11. package/dist/pipelines/jsdoc-update/__sit__/existing-jsdoc.test.js +175 -0
  12. package/dist/pipelines/jsdoc-update/__sit__/existing-jsdoc.test.js.map +1 -0
  13. package/dist/pipelines/jsdoc-update/__sit__/simple-function.test.d.ts +2 -0
  14. package/dist/pipelines/jsdoc-update/__sit__/simple-function.test.d.ts.map +1 -0
  15. package/dist/pipelines/jsdoc-update/__sit__/simple-function.test.js +108 -0
  16. package/dist/pipelines/jsdoc-update/__sit__/simple-function.test.js.map +1 -0
  17. package/dist/pipelines/jsdoc-update/context/JsDocUpdateContext.d.ts +156 -0
  18. package/dist/pipelines/jsdoc-update/context/JsDocUpdateContext.d.ts.map +1 -0
  19. package/dist/pipelines/jsdoc-update/context/JsDocUpdateContext.js +2 -0
  20. package/dist/pipelines/jsdoc-update/context/JsDocUpdateContext.js.map +1 -0
  21. package/dist/pipelines/jsdoc-update/context/TsDocFileContext.d.ts +16 -0
  22. package/dist/pipelines/jsdoc-update/context/TsDocFileContext.d.ts.map +1 -0
  23. package/dist/pipelines/jsdoc-update/context/TsDocFileContext.js +2 -0
  24. package/dist/pipelines/jsdoc-update/context/TsDocFileContext.js.map +1 -0
  25. package/dist/pipelines/jsdoc-update/context/TsDocSymbolContext.d.ts +164 -0
  26. package/dist/pipelines/jsdoc-update/context/TsDocSymbolContext.d.ts.map +1 -0
  27. package/dist/pipelines/jsdoc-update/context/TsDocSymbolContext.js +2 -0
  28. package/dist/pipelines/jsdoc-update/context/TsDocSymbolContext.js.map +1 -0
  29. package/dist/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.d.ts +2 -0
  30. package/dist/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.d.ts.map +1 -0
  31. package/dist/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.js +47 -0
  32. package/dist/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.js.map +1 -0
  33. package/dist/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.d.ts +9 -0
  34. package/dist/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.d.ts.map +1 -0
  35. package/dist/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.js +30 -0
  36. package/dist/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.js.map +1 -0
  37. package/dist/pipelines/jsdoc-update/index.d.ts +6 -0
  38. package/dist/pipelines/jsdoc-update/index.d.ts.map +1 -0
  39. package/dist/pipelines/jsdoc-update/index.js +3 -0
  40. package/dist/pipelines/jsdoc-update/index.js.map +1 -0
  41. package/dist/pipelines/jsdoc-update/mode/ComplexityStrategy.d.ts +6 -0
  42. package/dist/pipelines/jsdoc-update/mode/ComplexityStrategy.d.ts.map +1 -0
  43. package/dist/pipelines/jsdoc-update/mode/ComplexityStrategy.js +4 -0
  44. package/dist/pipelines/jsdoc-update/mode/ComplexityStrategy.js.map +1 -0
  45. package/dist/pipelines/jsdoc-update/mode/ModeContext.d.ts +15 -0
  46. package/dist/pipelines/jsdoc-update/mode/ModeContext.d.ts.map +1 -0
  47. package/dist/pipelines/jsdoc-update/mode/ModeContext.js +2 -0
  48. package/dist/pipelines/jsdoc-update/mode/ModeContext.js.map +1 -0
  49. package/dist/pipelines/jsdoc-update/mode/index.d.ts +4 -0
  50. package/dist/pipelines/jsdoc-update/mode/index.d.ts.map +1 -0
  51. package/dist/pipelines/jsdoc-update/mode/index.js +4 -0
  52. package/dist/pipelines/jsdoc-update/mode/index.js.map +1 -0
  53. package/dist/pipelines/jsdoc-update/mode/modeResolver.d.ts +4 -0
  54. package/dist/pipelines/jsdoc-update/mode/modeResolver.d.ts.map +1 -0
  55. package/dist/pipelines/jsdoc-update/mode/modeResolver.js +12 -0
  56. package/dist/pipelines/jsdoc-update/mode/modeResolver.js.map +1 -0
  57. package/dist/pipelines/jsdoc-update/prompt/loadPrompt.d.ts +4 -0
  58. package/dist/pipelines/jsdoc-update/prompt/loadPrompt.d.ts.map +1 -0
  59. package/dist/pipelines/jsdoc-update/prompt/loadPrompt.js +7 -0
  60. package/dist/pipelines/jsdoc-update/prompt/loadPrompt.js.map +1 -0
  61. package/dist/pipelines/jsdoc-update/prompt/tsdoc-update-base.md +174 -0
  62. package/dist/pipelines/jsdoc-update/prompt/tsdoc-update-deep.md +13 -0
  63. package/dist/pipelines/jsdoc-update/schema/JsDocUpdatePlan.d.ts +254 -0
  64. package/dist/pipelines/jsdoc-update/schema/JsDocUpdatePlan.d.ts.map +1 -0
  65. package/dist/pipelines/jsdoc-update/schema/JsDocUpdatePlan.js +151 -0
  66. package/dist/pipelines/jsdoc-update/schema/JsDocUpdatePlan.js.map +1 -0
  67. package/package.json +42 -0
@@ -0,0 +1,16 @@
1
+ import type { SymbolIdentity } from '@gyomu/schema/schemas/typescript/SymbolIdentity';
2
+ import type { TsDocSymbolContext } from './TsDocSymbolContext.js';
3
+ export interface TsDocFileContext {
4
+ project: {
5
+ name: string;
6
+ };
7
+ source: {
8
+ relativePath: string;
9
+ };
10
+ symbols: Array<TsDocSymbolContext>;
11
+ retry?: {
12
+ attempt: number;
13
+ missingSymboldentity: Array<SymbolIdentity>;
14
+ };
15
+ }
16
+ //# sourceMappingURL=TsDocFileContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TsDocFileContext.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/context/TsDocFileContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAA;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IAED,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IAED,OAAO,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;IAElC,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,oBAAoB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;KAC5C,CAAA;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TsDocFileContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TsDocFileContext.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/context/TsDocFileContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,164 @@
1
+ import type { SymbolIdentity } from '@gyomu/schema/schemas/typescript/index';
2
+ import type { EffectSignals } from '@gyomu/schema/typescript';
3
+ /**
4
+ * Defines the base interface for a JSDoc update context containing project metadata and target identification.
5
+ */
6
+ export interface TsDocSymbolContext {
7
+ /**
8
+ * The specific symbol identity targeted for the JSDoc update.
9
+ */
10
+ target: SymbolIdentity;
11
+ /**
12
+ * The metadata of the targeted symbol.
13
+ */
14
+ symbol: {
15
+ name: string;
16
+ kind: string;
17
+ };
18
+ /**
19
+ * Container for the code snippet information.
20
+ */
21
+ code: {
22
+ snippet?: string;
23
+ };
24
+ /**
25
+ * Optional existing JSDoc documentation for the target symbol.
26
+ */
27
+ existingJsDoc?: ExistingJsDoc;
28
+ /**
29
+ * The optional effect type declaration
30
+ */
31
+ effectSignals: Pick<EffectSignals, 'success' | 'error' | 'requirements'> | undefined;
32
+ /**
33
+ * List of related symbols to be documented.
34
+ */
35
+ relatedSymbols: Array<RelatedSymbol>;
36
+ /**
37
+ * List of documentable child members.
38
+ */
39
+ children?: Array<ContextEntry>;
40
+ /**
41
+ * Deep analysis metadata for code refinement.
42
+ */
43
+ analysis?: {
44
+ paramSemantics: Array<{
45
+ name: string;
46
+ meaning: string;
47
+ role: string;
48
+ }>;
49
+ protectedRegions: Array<ProtectedSection>;
50
+ returnSemantics?: string;
51
+ sideEffects: Array<string>;
52
+ schemaStructure?: SchemaStructureNode;
53
+ };
54
+ /**
55
+ * Configuration and metrics regarding how the symbol is used.
56
+ */
57
+ usageContext?: {
58
+ publicApi: boolean;
59
+ usedAcrossModules: boolean;
60
+ callSites?: number;
61
+ };
62
+ }
63
+ export type NonDocumentableReason = 'inline-object-member' | 'generated' | 'external' | 'non-documentable-member';
64
+ export type DocumentableInfo = {
65
+ documentable?: true;
66
+ reason?: never;
67
+ } | {
68
+ documentable: false;
69
+ reason: NonDocumentableReason;
70
+ };
71
+ /**
72
+ * Represents an entry in the JSDoc update context, defining a target symbol and its associated metadata.
73
+ */
74
+ export type ContextEntry = {
75
+ /**
76
+ * The target symbol identity to be documented.
77
+ */
78
+ target: SymbolIdentity;
79
+ /**
80
+ * The name of the symbol.
81
+ */
82
+ name: string;
83
+ /**
84
+ * The category of the symbol.
85
+ */
86
+ kind: 'property' | 'method' | 'parameter' | 'type';
87
+ /**
88
+ * The optional type definition of the symbol.
89
+ */
90
+ type?: string;
91
+ /**
92
+ * Existing JSDoc content associated with the symbol, if any.
93
+ */
94
+ existingJsDoc?: ExistingJsDoc;
95
+ /**
96
+ * The optional effect type declaration
97
+ */
98
+ effectSignals: Pick<EffectSignals, 'success' | 'error' | 'requirements'> | undefined;
99
+ /**
100
+ * Child entries nested under this symbol.
101
+ */
102
+ children?: Array<ContextEntry>;
103
+ } & DocumentableInfo;
104
+ /**
105
+ * Represents the existing JSDoc documentation structure for a symbol.
106
+ */
107
+ export interface ExistingJsDoc {
108
+ /**
109
+ * The JSDoc summary text, if present.
110
+ */
111
+ summary?: string;
112
+ /**
113
+ * An array of parameter documentation entries.
114
+ */
115
+ params: Array<{
116
+ name: string;
117
+ sortOrder: number;
118
+ type?: string;
119
+ description?: string;
120
+ }>;
121
+ /**
122
+ * The return value documentation, if present.
123
+ */
124
+ returns?: string;
125
+ /**
126
+ * An array of additional JSDoc tags.
127
+ */
128
+ tags: Array<{
129
+ tag: string;
130
+ content: string;
131
+ sortOrder: number;
132
+ }>;
133
+ }
134
+ interface RelatedSymbol {
135
+ name: string;
136
+ kind: string;
137
+ signature: string;
138
+ }
139
+ export interface SchemaStructureNode {
140
+ name: string;
141
+ kind: 'property' | 'object' | 'array' | 'union' | 'primitive' | 'reference' | 'literal';
142
+ type?: string;
143
+ semanticHint?: string;
144
+ children?: Array<SchemaStructureNode>;
145
+ }
146
+ /**
147
+ * Represents a section of code or documentation that should be protected from automatic modification.
148
+ */
149
+ export interface ProtectedSection {
150
+ /**
151
+ * The type of section being protected.
152
+ */
153
+ kind: 'summary' | 'param' | 'returns' | 'tag';
154
+ /**
155
+ * Optional identifier for the section.
156
+ */
157
+ key?: string;
158
+ /**
159
+ * The reason why the section is protected.
160
+ */
161
+ reason: 'preserve-marker' | 'human-edited' | 'custom-content';
162
+ }
163
+ export {};
164
+ //# sourceMappingURL=TsDocSymbolContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TsDocSymbolContext.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/context/TsDocSymbolContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IAEtB;;OAEG;IACH,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IAED;;OAEG;IACH,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IAED;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAE7B;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC,GAAG,SAAS,CAAA;IAEpF;;OAEG;IACH,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IAE9B;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,cAAc,EAAE,KAAK,CAAC;YACpB,IAAI,EAAE,MAAM,CAAA;YACZ,OAAO,EAAE,MAAM,CAAA;YACf,IAAI,EAAE,MAAM,CAAA;SACb,CAAC,CAAA;QAEF,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;QAEzC,eAAe,CAAC,EAAE,MAAM,CAAA;QAExB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QAE1B,eAAe,CAAC,EAAE,mBAAmB,CAAA;KACtC,CAAA;IAED;;OAEG;IACH,YAAY,CAAC,EAAE;QACb,SAAS,EAAE,OAAO,CAAA;QAClB,iBAAiB,EAAE,OAAO,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,MAAM,qBAAqB,GAC7B,sBAAsB,GACtB,WAAW,GACX,UAAU,GACV,yBAAyB,CAAA;AAE7B,MAAM,MAAM,gBAAgB,GACxB;IACE,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf,GACD;IACE,YAAY,EAAE,KAAK,CAAA;IACnB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAA;AAEL;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAA;IAElD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAE7B;;OAEG;IACH,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC,GAAG,SAAS,CAAA;IAEpF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CAC/B,GAAG,gBAAgB,CAAA;AAEpB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAC,CAAA;IAEF;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;QACV,GAAG,EAAE,MAAM,CAAA;QACX,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC,CAAA;CACH;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAA;IAEvF,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAA;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;IAE7C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,MAAM,EAAE,iBAAiB,GAAG,cAAc,GAAG,gBAAgB,CAAA;CAC9D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TsDocSymbolContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TsDocSymbolContext.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/context/TsDocSymbolContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=executeJsDocUpdatePlan.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeJsDocUpdatePlan.test.d.ts","sourceRoot":"","sources":["../../../../../src/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { describe, expect, test } from 'vitest';
2
+ import { Effect, Layer } from 'effect';
3
+ import { NodeFileSystem } from '@effect/platform-node';
4
+ import { AiModelService } from '@gyomu/ai';
5
+ import { executeJsDocUpdatePlan } from '../executeJsDocUpdatePlan.js';
6
+ describe('executeJsDocUpdatePlan', () => {
7
+ test('returns object from AiModelService', async () => {
8
+ const expected = [
9
+ {
10
+ identity: {
11
+ signatureId: '(filePath: string) => string',
12
+ symbolId: 'readFile',
13
+ },
14
+ summary: {
15
+ action: { type: 'replace', value: 'Reads file content' },
16
+ confidence: 0.95,
17
+ },
18
+ params: [],
19
+ returns: {
20
+ action: { type: 'preserve' },
21
+ confidence: 1,
22
+ },
23
+ tags: [],
24
+ reasoning: {
25
+ summary: 'Test',
26
+ paramMapping: 'Test',
27
+ returnMapping: 'Test',
28
+ },
29
+ risk: {
30
+ hasHumanConflict: false,
31
+ riskLevel: 'low',
32
+ },
33
+ },
34
+ ];
35
+ const mockAiModelService = Layer.succeed(AiModelService, {
36
+ generateObject: () => Effect.succeed({
37
+ object: expected,
38
+ }),
39
+ });
40
+ const context = {
41
+ mode: 'light',
42
+ };
43
+ const result = await Effect.runPromise(executeJsDocUpdatePlan(context).pipe(Effect.provide(mockAiModelService), Effect.provide(NodeFileSystem.layer)));
44
+ expect(result).toEqual(expected);
45
+ });
46
+ });
47
+ //# sourceMappingURL=executeJsDocUpdatePlan.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeJsDocUpdatePlan.test.js","sourceRoot":"","sources":["../../../../../src/pipelines/jsdoc-update/executor/__tests__/executeJsDocUpdatePlan.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAGrE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,QAAQ,GAAoB;YAChC;gBACE,QAAQ,EAAE;oBACR,WAAW,EAAE,8BAA8B;oBAC3C,QAAQ,EAAE,UAAU;iBACrB;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,EAAE;oBACxD,UAAU,EAAE,IAAI;iBACjB;gBACD,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE;oBACP,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;oBAC5B,UAAU,EAAE,CAAC;iBACd;gBACD,IAAI,EAAE,EAAE;gBACR,SAAS,EAAE;oBACT,OAAO,EAAE,MAAM;oBACf,YAAY,EAAE,MAAM;oBACpB,aAAa,EAAE,MAAM;iBACtB;gBACD,IAAI,EAAE;oBACJ,gBAAgB,EAAE,KAAK;oBACvB,SAAS,EAAE,KAAK;iBACjB;aACF;SACF,CAAA;QAED,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE;YACvD,cAAc,EAAE,GAAG,EAAE,CACnB,MAAM,CAAC,OAAO,CAAC;gBACb,MAAM,EAAE,QAAQ;aACjB,CAAC;SACE,CAAC,CAAA;QAET,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,OAAO;SACP,CAAA;QAER,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CACpC,sBAAsB,CAAC,OAAO,CAAC,CAAC,IAAI,CAClC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAClC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CACrC,CACF,CAAA;QAED,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAClC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { Effect } from 'effect';
2
+ import { AiModelService } from '@gyomu/ai';
3
+ import type { AiError, IOError } from '@gyomu/schema';
4
+ import type { RetryOption } from '@gyomu/ai';
5
+ import type { JsDocUpdatePlan } from '../schema/JsDocUpdatePlan.js';
6
+ import type { FileSystem } from 'effect';
7
+ import type { TsDocFileContext } from '../context/TsDocFileContext.js';
8
+ export declare const executeJsDocUpdatePlan: (context: TsDocFileContext, retryOption?: RetryOption) => Effect.Effect<JsDocUpdatePlan, IOError | AiError, AiModelService | FileSystem.FileSystem>;
9
+ //# sourceMappingURL=executeJsDocUpdatePlan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeJsDocUpdatePlan.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAa,cAAc,EAAE,MAAM,WAAW,CAAA;AAKrD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,eAAO,MAAM,sBAAsB,GACjC,SAAS,gBAAgB,EACzB,cAAc,WAAW,KACxB,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,GAAG,OAAO,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAyB1F,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { Effect } from 'effect';
2
+ import { AI_MODELS, AiModelService } from '@gyomu/ai';
3
+ import { MessageRole } from '@gyomu/schema/conversation';
4
+ import { withOptional } from '@gyomu/schema';
5
+ import { loadPrompt } from '../prompt/loadPrompt.js';
6
+ import { JsDocUpdatePlanSchema } from '../schema/JsDocUpdatePlan.js';
7
+ export const executeJsDocUpdatePlan = (context, retryOption) => {
8
+ const promptFilename = `tsdoc-update-base.md`;
9
+ // const deepPromptFilename = `tsdoc-update-deep.md`
10
+ return Effect.gen(function* () {
11
+ const service = yield* AiModelService;
12
+ const basePrompt = yield* loadPrompt(promptFilename);
13
+ // const deepPrompt = yield* loadPrompt(deepPromptFilename)
14
+ const prompt = basePrompt;
15
+ // if (context.mode === 'deep') {
16
+ // prompt += '\n\n' + deepPrompt
17
+ // }
18
+ const result = yield* service.generateObject(withOptional({
19
+ model: AI_MODELS.fast,
20
+ messages: [
21
+ { id: '1', role: MessageRole.system, content: prompt },
22
+ { id: '2', role: MessageRole.user, content: JSON.stringify(context, null, 2) },
23
+ ],
24
+ schema: JsDocUpdatePlanSchema,
25
+ retryOption,
26
+ }));
27
+ return result.object;
28
+ });
29
+ };
30
+ //# sourceMappingURL=executeJsDocUpdatePlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeJsDocUpdatePlan.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/executor/executeJsDocUpdatePlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAOpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,OAAyB,EACzB,WAAyB,EACkE,EAAE;IAC7F,MAAM,cAAc,GAAG,sBAAsB,CAAA;IAC7C,oDAAoD;IAEpD,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,cAAc,CAAA;QACrC,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;QACpD,2DAA2D;QAC3D,MAAM,MAAM,GAAG,UAAU,CAAA;QACzB,iCAAiC;QACjC,kCAAkC;QAClC,IAAI;QACJ,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,cAAc,CAC1C,YAAY,CAAC;YACX,KAAK,EAAE,SAAS,CAAC,IAAI;YACrB,QAAQ,EAAE;gBACR,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;gBACtD,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;aAC/E;YACD,MAAM,EAAE,qBAAqB;YAC7B,WAAW;SACZ,CAAC,CACH,CAAA;QACD,OAAO,MAAM,CAAC,MAAM,CAAA;IACtB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export { TsDocFileContext } from './context/TsDocFileContext.js';
2
+ export { TsDocSymbolContext, ProtectedSection, ExistingJsDoc, ContextEntry, SchemaStructureNode, NonDocumentableReason, DocumentableInfo, } from './context/TsDocSymbolContext.js';
3
+ export * from './mode/index.js';
4
+ export { executeJsDocUpdatePlan } from './executor/executeJsDocUpdatePlan.js';
5
+ export { JsDocUpdatePlan, JsDocUpdateEntryPlan, MergeAction, JsDocTarget, ParamActionValue, ParamMergeAction, } from './schema/JsDocUpdatePlan.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pipelines/jsdoc-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iCAAiC,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './mode/index.js';
2
+ export { executeJsDocUpdatePlan } from './executor/executeJsDocUpdatePlan.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipelines/jsdoc-update/index.ts"],"names":[],"mappings":"AAUA,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { ModeContext } from './ModeContext.js';
2
+ export interface ComplexityStrategy {
3
+ isComplex: (context: ModeContext) => boolean;
4
+ }
5
+ export declare const defaultComplexityStrategy: ComplexityStrategy;
6
+ //# sourceMappingURL=ComplexityStrategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComplexityStrategy.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/ComplexityStrategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAA;CAC7C;AACD,eAAO,MAAM,yBAAyB,EAAE,kBAEvC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export const defaultComplexityStrategy = {
2
+ isComplex: (context) => context.symbol.complexityScore >= 5,
3
+ };
4
+ //# sourceMappingURL=ComplexityStrategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComplexityStrategy.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/ComplexityStrategy.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC3D,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,IAAI,CAAC;CAC5D,CAAA"}
@@ -0,0 +1,15 @@
1
+ export interface ModeContext {
2
+ file: {
3
+ defaultMode: 'light' | 'deep';
4
+ hasGeneratedJsDoc: boolean;
5
+ stabilityScore: number;
6
+ };
7
+ symbol: {
8
+ exported: boolean;
9
+ publicApi: boolean;
10
+ hasJsDoc: boolean;
11
+ humanEdited: boolean;
12
+ complexityScore: number;
13
+ };
14
+ }
15
+ //# sourceMappingURL=ModeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModeContext.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/ModeContext.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE;QACJ,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;QAC7B,iBAAiB,EAAE,OAAO,CAAA;QAC1B,cAAc,EAAE,MAAM,CAAA;KACvB,CAAA;IAED,MAAM,EAAE;QACN,QAAQ,EAAE,OAAO,CAAA;QACjB,SAAS,EAAE,OAAO,CAAA;QAClB,QAAQ,EAAE,OAAO,CAAA;QACjB,WAAW,EAAE,OAAO,CAAA;QACpB,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ModeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModeContext.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/ModeContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './ComplexityStrategy.js';
2
+ export * from './ModeContext.js';
3
+ export * from './modeResolver.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './ComplexityStrategy.js';
2
+ export * from './ModeContext.js';
3
+ export * from './modeResolver.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { ComplexityStrategy } from './ComplexityStrategy.js';
2
+ import type { ModeContext } from './ModeContext.js';
3
+ export declare const modeResolver: (context: ModeContext, strategy: ComplexityStrategy) => "light" | "deep";
4
+ //# sourceMappingURL=modeResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modeResolver.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/modeResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,eAAO,MAAM,YAAY,GACvB,SAAS,WAAW,EACpB,UAAU,kBAAkB,KAC3B,OAAO,GAAG,MAUZ,CAAA"}
@@ -0,0 +1,12 @@
1
+ export const modeResolver = (context, strategy) => {
2
+ if (context.symbol.publicApi)
3
+ return 'deep';
4
+ if (context.symbol.humanEdited)
5
+ return 'deep';
6
+ if (context.file.defaultMode === 'deep')
7
+ return 'deep';
8
+ if (strategy.isComplex(context))
9
+ return 'deep';
10
+ return 'light';
11
+ };
12
+ //# sourceMappingURL=modeResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modeResolver.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/mode/modeResolver.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,OAAoB,EACpB,QAA4B,EACV,EAAE;IACpB,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS;QAAE,OAAO,MAAM,CAAA;IAE3C,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW;QAAE,OAAO,MAAM,CAAA;IAE7C,IAAI,OAAO,CAAC,IAAI,CAAC,WAAW,KAAK,MAAM;QAAE,OAAO,MAAM,CAAA;IAEtD,IAAI,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;QAAE,OAAO,MAAM,CAAA;IAE9C,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Effect, FileSystem } from 'effect';
2
+ import type { IOError } from '@gyomu/schema';
3
+ export declare const loadPrompt: (name: string) => Effect.Effect<string, IOError, FileSystem.FileSystem>;
4
+ //# sourceMappingURL=loadPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadPrompt.d.ts","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/prompt/loadPrompt.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAClD,CAAA"}
@@ -0,0 +1,7 @@
1
+ // prompt/loadPrompt.ts
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { readStringFromFile } from '@gyomu/infra/fs';
5
+ const currentDir = dirname(fileURLToPath(import.meta.url));
6
+ export const loadPrompt = (name) => readStringFromFile(join(currentDir, name));
7
+ //# sourceMappingURL=loadPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadPrompt.js","sourceRoot":"","sources":["../../../../src/pipelines/jsdoc-update/prompt/loadPrompt.ts"],"names":[],"mappings":"AAAA,uBAAuB;AAEvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIpD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAE1D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAyD,EAAE,CAChG,kBAAkB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAA"}
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: tsdoc-update-light
3
+ version: 1.0.0
4
+ mode: light
5
+ type: llm-prompt
6
+ target: JsDocUpdatePlan
7
+ ---
8
+
9
+ # System
10
+
11
+ You are a JSDoc update planner.
12
+
13
+ Your role is to make minimal and safe updates to existing JSDoc.
14
+
15
+ You must NOT reinterpret code intent deeply.
16
+
17
+ You must prefer preserving existing documentation.
18
+
19
+ You must output an array of JsDocUpdateEntryPlan entries only.
20
+
21
+ Do not generate full rewritten documentation unless necessary.
22
+
23
+ ---
24
+
25
+ # Input Schema
26
+
27
+ - JsDocUpdateContext
28
+
29
+ ---
30
+
31
+ # Core Principle
32
+
33
+ Focus on:
34
+
35
+ - fixing inconsistencies
36
+ - aligning parameter names
37
+ - correcting obvious mismatches
38
+ - preserving human-written content
39
+
40
+ Do NOT perform semantic redesign.
41
+
42
+ A single context may produce multiple JsDocUpdatePlan entries.
43
+
44
+ The target symbol should normally produce one plan entry.
45
+
46
+ Additional plan entries may be generated for documentable child members.
47
+
48
+ Each generated plan must be independent and reference its own identity.
49
+
50
+ Never invent behavior.
51
+ Never infer implementation intent.
52
+ Only describe information explicitly present in the declaration and type structure.
53
+
54
+ Every exported symbol must have a summary.
55
+
56
+ If the symbol name is self-explanatory,
57
+ generate a concise summary instead of omitting it.
58
+
59
+ Do not preserve an empty summary solely because
60
+ the symbol name is descriptive.
61
+
62
+ ---
63
+
64
+ # Schema Structure
65
+
66
+ Some symbols may include schemaStructure information.
67
+
68
+ This information is provided only as semantic context to help understand the shape of the data represented by the symbol.
69
+
70
+ Use schemaStructure to infer:
71
+
72
+ - the purpose of the schema
73
+ - the meaning of the represented data
74
+ - relationships between fields
75
+
76
+ Do NOT generate documentation for schemaStructure entries themselves.
77
+ Do NOT treat schemaStructure nodes as documentation targets.
78
+ Only generate documentation for the current target symbol.
79
+ Do not assume runtime validation behavior unless it is evident
80
+ from the implementation or provided analysis.
81
+
82
+ When documenting an Effect Schema definition, use the schemaStructure
83
+ to explain the important information represented by the schema.
84
+
85
+ A high-quality summary should not only identify the schema's purpose,
86
+ but also briefly describe the key categories of data contained within it.
87
+
88
+ Prefer:
89
+
90
+ - "Defines a public error response containing an error code, message, and retryability indicator."
91
+
92
+ Over:
93
+
94
+ - "Defines a public error schema."
95
+
96
+ ---
97
+
98
+ # Rules
99
+
100
+ - summary:
101
+ - preserve if adequate
102
+ - create if missing
103
+ - update only when clearly incorrect
104
+ - params:
105
+ - preserve existing descriptions
106
+ - create entries for missing parameters
107
+ - update only when mismatched
108
+ - delete parameter documentation only when the parameter no longer exists
109
+ - Parameter order must match the function signature.
110
+ - When creating new items, assign order values that produce a stable and deterministic final layout.
111
+ - returns:
112
+ - preserve existing return descriptions
113
+ - create a return description if missing and return value is meaningful
114
+ - update only when clearly incorrect
115
+ - delete only when the function no longer returns a meaningful value
116
+ - When creating new items, assign order values that produce a stable and deterministic final layout.
117
+ - tags:
118
+ - preserve unless invalid
119
+ - Tag order should preserve the existing documentation order whenever possible.
120
+ - confidence should be high when changes are minimal
121
+ - Reasoning and risk must be evaluated independently for each generated plan entry.
122
+ - delete:
123
+ - delete only when documentation is clearly invalid or refers to removed code elements
124
+ - do not delete content solely because it is incomplete or low quality
125
+ - when uncertain, preserve
126
+ - documentable child members:
127
+ - Generate an additional JsDocUpdatePlan entry for each documentable child member.
128
+ - Do not generate entries for non-documentable members.
129
+ - Each plan must reference its own identity.
130
+ - Child plans should be generated independently from the parent plan.
131
+ - EffectSignals interpretation:
132
+ - When requirements are present, describe what external services or context are required.
133
+ - When error types are present, mention possible failure conditions in documentation when appropriate.
134
+ - When the symbol returns an Effect, focus on the operation performed rather than describing the implementation as "returns an Effect".
135
+
136
+ ---
137
+
138
+ # Confidence Guidelines
139
+
140
+ 1.0 = trivial and obvious
141
+ 0.8 = highly likely
142
+ 0.6 = inferred from context
143
+ 0.4 = uncertain
144
+ 0.2 = speculative
145
+
146
+ ---
147
+
148
+ # Output Schema
149
+
150
+ Must strictly match JsDocUpdateEntryPlan[].
151
+
152
+ - Never output raw JSDoc text
153
+ - Never expand descriptions aggressively
154
+ - Prefer "preserve" actions
155
+ - If a documented section is missing, prefer action="replace" with generated content instead of "preserve".
156
+ - One plan entry may be generated for the target symbol.
157
+ - Additional plan entries may be generated for documentable child members.
158
+ - Every generated plan must contain a valid identity.
159
+
160
+ ---
161
+
162
+ # Risk Policy
163
+
164
+ - Treat human-edited content as authoritative
165
+ - Avoid rewriting stable sections
166
+ - If uncertain → preserve
167
+
168
+ ## Retry
169
+
170
+ If retry.missingSymboldentity is present:
171
+
172
+ - Existing documentation may already be generated.
173
+ - Prioritize generating documentation for the listed SymbolIdentity.
174
+ - Ensure all listed symbol identities appear in the output.