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,208 @@
1
+ # GraphBinary Format Specification
2
+
3
+ > **Version**: 1.0.0
4
+
5
+ Compact binary format for graph serialization optimized for network transfer.
6
+
7
+ **Related Docs:** [GRAPHENGINE.md](GRAPHENGINE.md),
8
+ [TINKERPOP.md](TINKERPOP.md), [GRAPHML.md](GRAPHML.md),
9
+ [GRAPHSON.md](GRAPHSON.md), [GRYO.md](GRYO.md),
10
+ [CODEANALYZER.md](CODEANALYZER.md)
11
+
12
+ ## Overview
13
+
14
+ GraphBinary: compact binary format optimized for network transfer and Gremlin
15
+ Server. Version v1.0. More efficient than GraphSON for large graphs. Supports
16
+ all TinkerPop data types. Not human-readable. Requires schema knowledge for some
17
+ type information modes.
18
+
19
+ ## TinkerPop GraphBinary Support
20
+
21
+ **Builder Pattern:**
22
+
23
+ ```java
24
+ GraphBinaryReader reader = GraphBinaryReader.build()
25
+ .typeInfo(TypeInfo.PARTIAL)
26
+ .serializeResultToString(false)
27
+ .create();
28
+
29
+ GraphBinaryWriter writer = GraphBinaryWriter.build()
30
+ .typeInfo(TypeInfo.PARTIAL)
31
+ .serializeResultToString(false)
32
+ .create();
33
+ ```
34
+
35
+ **Methods:** `readGraph(InputStream|File|URL, Graph)`,
36
+ `writeGraph(OutputStream|File|URL, Graph)`
37
+
38
+ **Configuration:**
39
+
40
+ - `typeInfo(TypeInfo)`: `NONE` (no type info, requires schema), `PARTIAL`
41
+ (complex types only, recommended), `FULL` (complete type info,
42
+ self-describing)
43
+ - `serializeResultToString(boolean)`: Serialize as strings (default: `false`)
44
+
45
+ **Usage:**
46
+
47
+ ```java
48
+ Graph graph = TinkerGraph.open();
49
+ GraphBinaryWriter writer = GraphBinaryWriter.build().typeInfo(TypeInfo.PARTIAL).create();
50
+ writer.writeGraph(new File("graph.graphbinary"), graph);
51
+
52
+ GraphBinaryReader reader = GraphBinaryReader.build().typeInfo(TypeInfo.PARTIAL).create();
53
+ reader.readGraph(new File("graph.graphbinary"), graph);
54
+ ```
55
+
56
+ ## Format Structure
57
+
58
+ **Header:** Version (1 byte) + format identifier
59
+
60
+ **Type Codes (Single-byte):** | Category | Types | Codes |
61
+ |----------|-------|-------| | Graph Elements | Vertex, Edge, VertexProperty,
62
+ Property | 0x01-0x04 | | Path Types | Path, Set, List, Map | 0x05-0x08 | |
63
+ Primitives | String, Date, Timestamp, UUID | 0x09-0x0C | | Numeric | Double,
64
+ Float, Integer, Long, BigInteger, BigDecimal | 0x0D-0x12 | | Other | Boolean,
65
+ Null, ByteBuffer, Byte, Short, Class, Duration, Char | 0x13-0x1A |
66
+
67
+ **Value Encoding:** Variable-length encoding (integers, strings), size-prefixed
68
+ collections, key-value pair maps. Optimizations: dictionary-based string
69
+ compression, efficient numeric encoding, network optimizations.
70
+
71
+ ## Type Information Modes
72
+
73
+ | Mode | Type Info | Schema Required | File Size | Performance | Use Cases |
74
+ | --------- | ------------------ | --------------- | --------- | ----------- | ------------------------------------------------------------ |
75
+ | `NONE` | None | Yes | Smallest | Fastest | Known schema, internal systems, max performance |
76
+ | `PARTIAL` | Complex types only | No | Medium | Good | Recommended, network transfer, Gremlin Server |
77
+ | `FULL` | All values | No | Largest | Good | Unknown schema, interoperability, debugging, max type safety |
78
+
79
+ **Important:** Reader and writer must use compatible modes. `NONE` requires
80
+ matching schema knowledge.
81
+
82
+ ## Version Information
83
+
84
+ **Current:** v1.0 (only version). No migration required. Stable format.
85
+
86
+ ## Performance Considerations
87
+
88
+ **Optimization Tips:** Use `PARTIAL` for best balance (recommended), `NONE` for
89
+ max performance when schema known, `FULL` only when necessary for type safety,
90
+ consider compression for storage.
91
+
92
+ **File Size:** More compact than GraphSON for large graphs, more efficient than
93
+ GraphML. Mode affects size: `NONE` < `PARTIAL` < `FULL`.
94
+
95
+ **Speed:** Fast serialization/deserialization, optimized for network transfer,
96
+ efficient binary encoding, low overhead.
97
+
98
+ **Memory:** Low overhead, efficient binary representation, streaming support for
99
+ large graphs.
100
+
101
+ **General Performance:** See
102
+ [TINKERPOP.md](TINKERPOP.md#general-performance-considerations) for format
103
+ comparison and general optimization tips.
104
+
105
+ ## Configuration Best Practices
106
+
107
+ **Reading:** Max Performance: `typeInfo(TypeInfo.NONE)` (requires schema),
108
+ Balanced (Recommended): `typeInfo(TypeInfo.PARTIAL)`, Max Flexibility:
109
+ `typeInfo(TypeInfo.FULL)`
110
+
111
+ **Writing:** Same as reading. Ensure compatible modes between reader/writer.
112
+
113
+ **General Configuration:** See
114
+ [TINKERPOP.md](TINKERPOP.md#general-configuration-best-practices) for general
115
+ configuration best practices across all formats.
116
+
117
+ ## Error Handling
118
+
119
+ **Format-Specific Issues:** Type information mismatch (use compatible modes),
120
+ schema mismatch with `NONE` mode (ensure matching schema), invalid binary data
121
+ (corrupted files cause deserialization errors), type code errors (invalid codes
122
+ cause parsing errors).
123
+
124
+ **Format-Specific Best Practices:** Use `PARTIAL` mode for most scenarios,
125
+ ensure schema compatibility with `NONE` mode, validate files after writing,
126
+ handle IOException appropriately.
127
+
128
+ **General Error Handling:** See
129
+ [TINKERPOP.md](TINKERPOP.md#general-error-handling-patterns) for common error
130
+ handling patterns across all formats.
131
+
132
+ ## Examples
133
+
134
+ **Complete Example:**
135
+
136
+ ```java
137
+ Graph graph = TinkerGraph.open();
138
+ Vertex alice = graph.addVertex(T.label, "person", "name", "Alice", "age", 30);
139
+ Vertex bob = graph.addVertex(T.label, "person", "name", "Bob", "age", 25);
140
+ alice.addEdge("knows", bob, "weight", 0.5);
141
+
142
+ GraphBinaryWriter writer = GraphBinaryWriter.build().typeInfo(TypeInfo.PARTIAL).create();
143
+ writer.writeGraph(new File("graph.graphbinary"), graph);
144
+
145
+ Graph readGraph = TinkerGraph.open();
146
+ GraphBinaryReader reader = GraphBinaryReader.build().typeInfo(TypeInfo.PARTIAL).create();
147
+ reader.readGraph(new File("graph.graphbinary"), readGraph);
148
+ ```
149
+
150
+ **Streaming:**
151
+
152
+ ```java
153
+ try (FileInputStream fis = new FileInputStream("graph.graphbinary");
154
+ BufferedInputStream bis = new BufferedInputStream(fis, 65536)) {
155
+ GraphBinaryReader reader = GraphBinaryReader.build().typeInfo(TypeInfo.PARTIAL).create();
156
+ reader.readGraph(bis, graph);
157
+ }
158
+ ```
159
+
160
+ ## File Extensions
161
+
162
+ `.graphbinary` (standard), `.gb` (less common). Extensions are conventions
163
+ only - format identified by binary structure and header.
164
+
165
+ ## Limitations
166
+
167
+ Not human-readable (binary format), requires schema knowledge for `NONE` mode,
168
+ cannot be edited with text editors, requires TinkerPop libraries, type
169
+ information mode affects compatibility, platform-dependent (Java-specific).
170
+
171
+ **Workarounds:** Use GraphML/GraphSON for human-readable formats, use
172
+ `PARTIAL`/`FULL` when schema unknown, consider compression.
173
+
174
+ ## Type Code Reference
175
+
176
+ | Type | Code | Description |
177
+ | -------------- | ---- | ------------------------------------ |
178
+ | Vertex | 0x01 | Graph vertex element |
179
+ | Edge | 0x02 | Graph edge element |
180
+ | VertexProperty | 0x03 | Vertex property with meta-properties |
181
+ | Property | 0x04 | Element property |
182
+ | Path | 0x05 | Traversal path |
183
+ | Set | 0x06 | Set collection |
184
+ | List | 0x07 | List collection |
185
+ | Map | 0x08 | Map collection |
186
+ | String | 0x09 | String primitive |
187
+ | Date | 0x0A | Date type |
188
+ | Timestamp | 0x0B | Timestamp type |
189
+ | UUID | 0x0C | UUID type |
190
+ | Double | 0x0D | Double numeric type |
191
+ | Float | 0x0E | Float numeric type |
192
+ | Integer | 0x0F | Integer numeric type |
193
+ | Long | 0x10 | Long numeric type |
194
+ | BigInteger | 0x11 | BigInteger numeric type |
195
+ | BigDecimal | 0x12 | BigDecimal numeric type |
196
+ | Boolean | 0x13 | Boolean type |
197
+ | Null | 0x14 | Null value |
198
+ | ByteBuffer | 0x15 | Byte buffer collection |
199
+ | Byte | 0x16 | Byte numeric type |
200
+ | Short | 0x17 | Short numeric type |
201
+ | Class | 0x18 | Class type |
202
+ | Duration | 0x19 | Duration type |
203
+ | Char | 0x1A | Character type |
204
+
205
+ ## Format Comparison
206
+
207
+ **See [TINKERPOP.md](TINKERPOP.md#detailed-format-comparisons) for detailed
208
+ comparisons with other formats.**