agent-docs 1.0.0

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 (44) hide show
  1. package/.cursor/plans/OPTIMISE.md +379 -0
  2. package/.cursor/plans/VERSIONING.md +207 -0
  3. package/.cursor/rules/IMPORTANT.mdc +97 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +13 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  6. package/.github/dependabot.yml +38 -0
  7. package/.github/pull_request_template.md +10 -0
  8. package/.github/workflows/format.yml +35 -0
  9. package/CODE_OF_CONDUCT.md +64 -0
  10. package/CONTRIBUTING.md +52 -0
  11. package/LICENSE.md +20 -0
  12. package/PLAN.md +707 -0
  13. package/README.md +133 -0
  14. package/SECURITY.md +21 -0
  15. package/docs/APEXANNOTATIONS.md +472 -0
  16. package/docs/APEXDOC.md +198 -0
  17. package/docs/CML.md +877 -0
  18. package/docs/CODEANALYZER.md +435 -0
  19. package/docs/CONTEXTDEFINITIONS.md +617 -0
  20. package/docs/ESLINT.md +827 -0
  21. package/docs/ESLINTJSDOC.md +520 -0
  22. package/docs/FIELDSERVICE.md +4452 -0
  23. package/docs/GRAPHBINARY.md +208 -0
  24. package/docs/GRAPHENGINE.md +616 -0
  25. package/docs/GRAPHML.md +337 -0
  26. package/docs/GRAPHSON.md +302 -0
  27. package/docs/GREMLIN.md +490 -0
  28. package/docs/GRYO.md +232 -0
  29. package/docs/HUSKY.md +106 -0
  30. package/docs/JEST.md +387 -0
  31. package/docs/JORJE.md +537 -0
  32. package/docs/JSDOC.md +621 -0
  33. package/docs/PMD.md +910 -0
  34. package/docs/PNPM.md +409 -0
  35. package/docs/PRETTIER.md +716 -0
  36. package/docs/PRETTIERAPEX.md +874 -0
  37. package/docs/REVENUETRANSACTIONMANAGEMENT.md +887 -0
  38. package/docs/TINKERPOP.md +252 -0
  39. package/docs/VITEST.md +706 -0
  40. package/docs/VSCODE.md +231 -0
  41. package/docs/XPATH31.md +213 -0
  42. package/package.json +32 -0
  43. package/postinstall.mjs +51 -0
  44. package/prettier.config.js +18 -0
@@ -0,0 +1,198 @@
1
+ # ApexDoc Quick Reference for AI Agents
2
+
3
+ > **Version**: 1.0.0
4
+
5
+ ## Overview
6
+
7
+ ApexDoc is Salesforce's standardized documentation format for Apex code. Uses
8
+ Javadoc-style comments (`/** ... */`) placed immediately before class, method,
9
+ property, or enum declarations.
10
+
11
+ ## Basic Syntax
12
+
13
+ ```apex
14
+ /**
15
+ * Description text (first line is summary)
16
+ *
17
+ * Additional description paragraphs.
18
+ *
19
+ * @tagName tag content
20
+ */
21
+ ```
22
+
23
+ ## Common Tags
24
+
25
+ ### Class/Interface Documentation
26
+
27
+ - `@description` - Class purpose and overview
28
+ - `@author` - Author name
29
+ - `@date` - Creation/modification date
30
+ - `@group` - Group/namespace for organization
31
+ - `@see` - Reference to related classes/methods
32
+
33
+ ### Method Documentation
34
+
35
+ - `@description` - Method purpose and behavior
36
+ - `@param parameterName Description` - Parameter documentation (one per
37
+ parameter)
38
+ - `@return Description` - Return value description
39
+ - `@throws ExceptionType Description` - Exception documentation (one per
40
+ exception)
41
+ - `@example` - Usage example (code block)
42
+ - `@see` - Reference to related methods/classes
43
+
44
+ ### Property/Field Documentation
45
+
46
+ - `@description` - Property purpose and usage
47
+ - `@see` - Reference to related properties/methods
48
+
49
+ ## Tag Syntax
50
+
51
+ ### @param
52
+
53
+ ```apex
54
+ /**
55
+ * @param input The string to reverse
56
+ * @param caseSensitive Whether comparison is case-sensitive
57
+ */
58
+ ```
59
+
60
+ ### @return
61
+
62
+ ```apex
63
+ /**
64
+ * @return The reversed string, or null if input is null
65
+ */
66
+ ```
67
+
68
+ ### @throws
69
+
70
+ ```apex
71
+ /**
72
+ * @throws IllegalArgumentException if input is empty
73
+ * @throws NullPointerException if input is null
74
+ */
75
+ ```
76
+
77
+ ### @example
78
+
79
+ ```apex
80
+ /**
81
+ * @example
82
+ * String result = StringUtils.reverse('hello');
83
+ * // result is 'olleh'
84
+ */
85
+ ```
86
+
87
+ ### @see
88
+
89
+ ```apex
90
+ /**
91
+ * @see StringUtils#capitalize(String)
92
+ * @see RelatedClass
93
+ */
94
+ ```
95
+
96
+ ## Complete Examples
97
+
98
+ ### Class with Methods
99
+
100
+ ```apex
101
+ /**
102
+ * @description Utility methods for string manipulation
103
+ * @author John Doe
104
+ * @date 2024-01-15
105
+ */
106
+ public class StringUtils {
107
+
108
+ /**
109
+ * @description Reverses the given string
110
+ * @param input The string to reverse
111
+ * @return The reversed string, or null if input is null
112
+ * @example
113
+ * String reversed = StringUtils.reverse('hello');
114
+ * // reversed is 'olleh'
115
+ */
116
+ public static String reverse(String input) {
117
+ if (input == null) {
118
+ return null;
119
+ }
120
+ return input.reverse();
121
+ }
122
+
123
+ /**
124
+ * @description Capitalizes the first letter of a string
125
+ * @param input The string to capitalize
126
+ * @return The capitalized string
127
+ * @throws IllegalArgumentException if input is empty
128
+ */
129
+ public static String capitalize(String input) {
130
+ if (String.isBlank(input)) {
131
+ throw new IllegalArgumentException('Input cannot be empty');
132
+ }
133
+ return input.substring(0, 1).toUpperCase() + input.substring(1);
134
+ }
135
+ }
136
+ ```
137
+
138
+ ### Property Documentation
139
+
140
+ ```apex
141
+ /**
142
+ * @description Account name for this record
143
+ */
144
+ public String accountName { get; set; }
145
+ ```
146
+
147
+ ### Enum Documentation
148
+
149
+ ```apex
150
+ /**
151
+ * @description Status values for order processing
152
+ */
153
+ public enum OrderStatus {
154
+ PENDING,
155
+ PROCESSING,
156
+ COMPLETED,
157
+ CANCELLED
158
+ }
159
+ ```
160
+
161
+ ## Best Practices
162
+
163
+ - **First line is summary** - Brief one-line description
164
+ - **Additional paragraphs** - Detailed explanation if needed
165
+ - **Tag order** - `@description`, `@param`, `@return`, `@throws`, `@example`,
166
+ `@see`
167
+ - **Complete documentation** - Document all public classes, methods, and
168
+ properties
169
+ - **Clear descriptions** - Use clear, concise language
170
+ - **Examples** - Include `@example` for complex methods
171
+ - **Exception documentation** - Document all thrown exceptions with `@throws`
172
+
173
+ ## PMD AST Context
174
+
175
+ In PMD AST, ApexDoc comments appear as **FormalComment** nodes:
176
+
177
+ ```xpath
178
+ //FormalComment[starts-with(@Image, '/**')]
179
+ //Method[preceding-sibling::FormalComment]
180
+ ```
181
+
182
+ **Note:** PMD typically ignores comments in XPath queries. For ApexDoc
183
+ validation, use Regex engine or custom Java rules.
184
+
185
+ ## Related Documentation
186
+
187
+ - **[PMD Quick Reference](PMD.md)** - PMD essentials (PMD typically ignores
188
+ comments; use Regex for ApexDoc validation)
189
+ - **[PMD Apex AST Reference](PMD.md#apex-ast-reference)** - PMD AST structure
190
+ (ApexDoc appears as FormalComment nodes)
191
+ - **[Salesforce ApexDoc Introduction](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_doc_intro.htm)** -
192
+ Official ApexDoc overview
193
+ - **[ApexDoc Format](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_doc_format.htm)** -
194
+ Formatting guidelines
195
+ - **[ApexDoc Constructs](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_doc_constructs.htm)** -
196
+ Available tags and constructs
197
+ - **[ApexDoc Examples](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_doc_examples.htm)** -
198
+ Complete examples