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.
- package/.cursor/plans/OPTIMISE.md +379 -0
- package/.cursor/plans/VERSIONING.md +207 -0
- package/.cursor/rules/IMPORTANT.mdc +97 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +13 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- package/.github/dependabot.yml +38 -0
- package/.github/pull_request_template.md +10 -0
- package/.github/workflows/format.yml +35 -0
- package/CODE_OF_CONDUCT.md +64 -0
- package/CONTRIBUTING.md +52 -0
- package/LICENSE.md +20 -0
- package/PLAN.md +707 -0
- package/README.md +133 -0
- package/SECURITY.md +21 -0
- package/docs/APEXANNOTATIONS.md +472 -0
- package/docs/APEXDOC.md +198 -0
- package/docs/CML.md +877 -0
- package/docs/CODEANALYZER.md +435 -0
- package/docs/CONTEXTDEFINITIONS.md +617 -0
- package/docs/ESLINT.md +827 -0
- package/docs/ESLINTJSDOC.md +520 -0
- package/docs/FIELDSERVICE.md +4452 -0
- package/docs/GRAPHBINARY.md +208 -0
- package/docs/GRAPHENGINE.md +616 -0
- package/docs/GRAPHML.md +337 -0
- package/docs/GRAPHSON.md +302 -0
- package/docs/GREMLIN.md +490 -0
- package/docs/GRYO.md +232 -0
- package/docs/HUSKY.md +106 -0
- package/docs/JEST.md +387 -0
- package/docs/JORJE.md +537 -0
- package/docs/JSDOC.md +621 -0
- package/docs/PMD.md +910 -0
- package/docs/PNPM.md +409 -0
- package/docs/PRETTIER.md +716 -0
- package/docs/PRETTIERAPEX.md +874 -0
- package/docs/REVENUETRANSACTIONMANAGEMENT.md +887 -0
- package/docs/TINKERPOP.md +252 -0
- package/docs/VITEST.md +706 -0
- package/docs/VSCODE.md +231 -0
- package/docs/XPATH31.md +213 -0
- package/package.json +32 -0
- package/postinstall.mjs +51 -0
- package/prettier.config.js +18 -0
package/PLAN.md
ADDED
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
# Project: agent-docs
|
|
2
|
+
|
|
3
|
+
Define and maintain the `agent-docs` repository as a reusable set of low-token
|
|
4
|
+
AI agent instruction documents ("docs") for AI-enabled IDEs.
|
|
5
|
+
|
|
6
|
+
## Repository Setup
|
|
7
|
+
|
|
8
|
+
- **License**: MIT
|
|
9
|
+
- **Security contact**: security@starch.uk
|
|
10
|
+
- **Package manager**: pnpm
|
|
11
|
+
- **Primary contents**: Markdown documentation in `docs/`
|
|
12
|
+
- **Code formatting**: Prettier (via `pnpm format` / `pnpm format:check`)
|
|
13
|
+
- **CI**: GitHub Actions workflow that runs `pnpm format:check` on push/PR
|
|
14
|
+
- **Postinstall script**: `postinstall.mjs` that creates symlinks/junctions to
|
|
15
|
+
`docs/` in consuming projects
|
|
16
|
+
- **AI Agent Guidance**: `.cursor/plans/` contains structured workflows and
|
|
17
|
+
instructions for AI coding assistants
|
|
18
|
+
- **IDE Rules**: `.cursor/rules/` contains agent rules for Cursor IDE
|
|
19
|
+
integration
|
|
20
|
+
|
|
21
|
+
**Repository Files:**
|
|
22
|
+
|
|
23
|
+
The following files should be created following the same structure and style as
|
|
24
|
+
other starch-uk repositories:
|
|
25
|
+
|
|
26
|
+
### `README.md`
|
|
27
|
+
|
|
28
|
+
The README.md should contain:
|
|
29
|
+
|
|
30
|
+
- **Project title and description** - Brief overview of agent-docs as the
|
|
31
|
+
reusable, low-token AI agent instruction documents to be reused in other
|
|
32
|
+
projects
|
|
33
|
+
- **License badge** - MIT License badge link
|
|
34
|
+
- **Overview section** - Explanation of what docs are, their purpose (low token
|
|
35
|
+
count, comprehensive, reusable), and their use in AI-enabled IDEs. This
|
|
36
|
+
section should reference the inspiration from The Matrix (1999) where Neo says
|
|
37
|
+
"I know kung fu" after having knowledge uploaded directly into his brain. In
|
|
38
|
+
that scene, Neo instantly gains complete knowledge and skills without needing
|
|
39
|
+
to learn through practice - the knowledge is simply "there" when needed.
|
|
40
|
+
Similarly, agent-docs creates comprehensive documentation "programs" that can
|
|
41
|
+
be referenced by AI agents, giving them instant, complete knowledge about
|
|
42
|
+
libraries, frameworks, and tools. Just as Neo could access kung fu knowledge
|
|
43
|
+
instantly, AI agents can reference these docs to immediately understand APIs,
|
|
44
|
+
patterns, best practices, and architectural decisions without needing to
|
|
45
|
+
search or learn incrementally. The docs serve as the "knowledge upload" that
|
|
46
|
+
makes the AI agent instantly capable with any technology.
|
|
47
|
+
- **Installation instructions** - Should include:
|
|
48
|
+
- Steps to clone the repository and install dependencies using pnpm
|
|
49
|
+
- Instructions for adding the package to a project (as a dependency or
|
|
50
|
+
submodule)
|
|
51
|
+
- Explanation of the automatic `postinstall` behavior:
|
|
52
|
+
- When `@starch-uk/agent-docs` is installed into another project, a
|
|
53
|
+
`postinstall` script will run in the consuming project.
|
|
54
|
+
- If the consuming project does **not** already have a `docs/`
|
|
55
|
+
directory, the script will create a single symlink/junction from the
|
|
56
|
+
consuming project's `docs/` directory to this package's `docs/`
|
|
57
|
+
directory:
|
|
58
|
+
- On Unix/macOS, a directory symlink is created
|
|
59
|
+
- On Windows, a junction is created
|
|
60
|
+
- If the consuming project **already has** a `docs/` directory, the
|
|
61
|
+
script does nothing and you can instead manage your own docs layout.
|
|
62
|
+
- Optional manual instructions for symlinking (Unix/macOS) or junction
|
|
63
|
+
linking (Windows) if you prefer not to rely on `postinstall`, or need a
|
|
64
|
+
custom layout:
|
|
65
|
+
- Individual files from the `docs/` folder to the root of the actual
|
|
66
|
+
project, OR
|
|
67
|
+
- The entire `docs` folder to the root of the actual project
|
|
68
|
+
- Explanation of how to update IDE agent rules (e.g., Cursor's
|
|
69
|
+
`.cursor/rules/` or similar) to reference the linked docs using
|
|
70
|
+
`@filename` syntax or relative paths, so the AI agent can access the
|
|
71
|
+
documentation when needed
|
|
72
|
+
- **Usage section** - Should explain how to create and maintain docs:
|
|
73
|
+
- How to add new markdown files under `docs/` following the core concept
|
|
74
|
+
- How to apply versioning and optimization plans from `.cursor/plans/*`
|
|
75
|
+
- **AI Agent Guidance** - Explanation that `.cursor/plans/*` contains
|
|
76
|
+
guidance files for AI Agents. These plan files provide structured
|
|
77
|
+
instructions and workflows that AI coding assistants (like Cursor's Agent)
|
|
78
|
+
can reference when helping developers. The plans document processes, best
|
|
79
|
+
practices, and step-by-step workflows for various tasks, making them
|
|
80
|
+
accessible to AI agents through the `.cursor/plans/` directory structure.
|
|
81
|
+
When AI agents need guidance on how to perform specific tasks or follow
|
|
82
|
+
certain workflows, they can reference these plan files to understand the
|
|
83
|
+
expected process and provide accurate assistance.
|
|
84
|
+
- **Documentation section** - Reference to generated docs in the `docs/`
|
|
85
|
+
directory. This section should include a brief overview of each file in the
|
|
86
|
+
`docs/` directory, listing the filename and a one-line description of its
|
|
87
|
+
contents. This helps users quickly understand what documentation is available
|
|
88
|
+
and what each doc covers.
|
|
89
|
+
- **Contributing link** - Link to CONTRIBUTING.md
|
|
90
|
+
- **License section** - Reference to LICENSE.md
|
|
91
|
+
- **Security section** - Reference to SECURITY.md
|
|
92
|
+
- **Support section** - Links to GitHub Issues and repository URL
|
|
93
|
+
|
|
94
|
+
### `CODE_OF_CONDUCT.md`
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# Contributor Covenant Code of Conduct
|
|
98
|
+
|
|
99
|
+
## Our Pledge
|
|
100
|
+
|
|
101
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
102
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
103
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
104
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
105
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
106
|
+
orientation.
|
|
107
|
+
|
|
108
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
109
|
+
diverse, inclusive, and healthy community.
|
|
110
|
+
|
|
111
|
+
## Our Standards
|
|
112
|
+
|
|
113
|
+
Examples of behavior that contributes to a positive environment for our
|
|
114
|
+
community include:
|
|
115
|
+
|
|
116
|
+
- Demonstrating empathy and kindness toward other people
|
|
117
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
118
|
+
- Giving and gracefully accepting constructive feedback
|
|
119
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
120
|
+
and learning from the experience
|
|
121
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
122
|
+
community
|
|
123
|
+
|
|
124
|
+
Examples of unacceptable behavior include:
|
|
125
|
+
|
|
126
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
127
|
+
any kind
|
|
128
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
129
|
+
- Public or private harassment
|
|
130
|
+
- Publishing others' private information, such as a physical or email address,
|
|
131
|
+
without their explicit permission
|
|
132
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
133
|
+
professional setting
|
|
134
|
+
|
|
135
|
+
## Enforcement Responsibilities
|
|
136
|
+
|
|
137
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
138
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
139
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
140
|
+
or harmful.
|
|
141
|
+
|
|
142
|
+
## Scope
|
|
143
|
+
|
|
144
|
+
This Code of Conduct applies within all community spaces and also applies when
|
|
145
|
+
an individual is officially representing the community in public spaces.
|
|
146
|
+
|
|
147
|
+
## Enforcement
|
|
148
|
+
|
|
149
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
150
|
+
reported to the community leaders responsible for enforcement at
|
|
151
|
+
security@starch.uk. All complaints will be reviewed and investigated promptly
|
|
152
|
+
and fairly.
|
|
153
|
+
|
|
154
|
+
## Attribution
|
|
155
|
+
|
|
156
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
157
|
+
version 2.0, available at
|
|
158
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
|
159
|
+
|
|
160
|
+
[homepage]: https://www.contributor-covenant.org
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### `CONTRIBUTING.md`
|
|
164
|
+
|
|
165
|
+
````markdown
|
|
166
|
+
# Contributing to agent-docs
|
|
167
|
+
|
|
168
|
+
Thank you for considering contributing to agent-docs! We welcome contributions
|
|
169
|
+
from the community.
|
|
170
|
+
|
|
171
|
+
## How to Contribute
|
|
172
|
+
|
|
173
|
+
1. **Fork the repository** and clone it to your local machine
|
|
174
|
+
2. **Create a new branch** for your feature or bug fix:
|
|
175
|
+
```bash
|
|
176
|
+
git checkout -b feature/your-feature-name
|
|
177
|
+
```
|
|
178
|
+
````
|
|
179
|
+
|
|
180
|
+
3. **Make your changes** following the project's documentation style and
|
|
181
|
+
conventions
|
|
182
|
+
4. **Format files**:
|
|
183
|
+
```bash
|
|
184
|
+
pnpm format
|
|
185
|
+
```
|
|
186
|
+
5. **Commit your changes** with a descriptive commit message:
|
|
187
|
+
```bash
|
|
188
|
+
git commit -m "Add feature: your feature description"
|
|
189
|
+
```
|
|
190
|
+
6. **Push your changes** to your forked repository:
|
|
191
|
+
```bash
|
|
192
|
+
git push origin feature/your-feature-name
|
|
193
|
+
```
|
|
194
|
+
7. **Open a pull request** to the main repository's `main` branch
|
|
195
|
+
|
|
196
|
+
## Style
|
|
197
|
+
|
|
198
|
+
- Follow the docs structure and content guidelines in this plan
|
|
199
|
+
- Use Prettier for formatting (run `pnpm format` before committing)
|
|
200
|
+
|
|
201
|
+
## Reporting Issues
|
|
202
|
+
|
|
203
|
+
If you encounter any issues or have suggestions for improvements, please open an
|
|
204
|
+
issue in the repository with:
|
|
205
|
+
|
|
206
|
+
- A clear description of the issue
|
|
207
|
+
- Steps to reproduce (if applicable)
|
|
208
|
+
- Expected vs actual behavior
|
|
209
|
+
- Environment details (OS, Node version, etc.)
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
By contributing to agent-docs, you agree that your contributions will be
|
|
214
|
+
licensed under the MIT License.
|
|
215
|
+
|
|
216
|
+
````
|
|
217
|
+
|
|
218
|
+
### `LICENSE.md`
|
|
219
|
+
|
|
220
|
+
```markdown
|
|
221
|
+
MIT License
|
|
222
|
+
|
|
223
|
+
Copyright (c) 2024 starch-uk
|
|
224
|
+
|
|
225
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
226
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
227
|
+
in the Software without restriction, including without limitation the rights
|
|
228
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
229
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
230
|
+
furnished to do so, subject to the following conditions:
|
|
231
|
+
|
|
232
|
+
The above copyright notice and this permission notice shall be included in all
|
|
233
|
+
copies or substantial portions of the Software.
|
|
234
|
+
|
|
235
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
236
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
237
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
238
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
239
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
240
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
241
|
+
SOFTWARE.
|
|
242
|
+
````
|
|
243
|
+
|
|
244
|
+
### `SECURITY.md`
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
# Security Policy
|
|
248
|
+
|
|
249
|
+
## Supported Versions
|
|
250
|
+
|
|
251
|
+
We release patches for security vulnerabilities as they are identified. Please
|
|
252
|
+
ensure you are using the latest version of the software.
|
|
253
|
+
|
|
254
|
+
| Version | Supported |
|
|
255
|
+
| -------- | ------------------ |
|
|
256
|
+
| >= 1.0.0 | :white_check_mark: |
|
|
257
|
+
| < 1.0.0 | :x: |
|
|
258
|
+
|
|
259
|
+
## Reporting a Vulnerability
|
|
260
|
+
|
|
261
|
+
If you discover a security vulnerability, please report it by emailing
|
|
262
|
+
**security@starch.uk**.
|
|
263
|
+
|
|
264
|
+
**Please do not** open a public GitHub issue for security vulnerabilities.
|
|
265
|
+
|
|
266
|
+
We will respond as promptly as possible to address the issue. We appreciate your
|
|
267
|
+
help in keeping the project secure.
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### `.github/pull_request_template.md`
|
|
271
|
+
|
|
272
|
+
```markdown
|
|
273
|
+
## Description
|
|
274
|
+
|
|
275
|
+
<!-- Provide a brief description of your changes -->
|
|
276
|
+
|
|
277
|
+
## Type of Change
|
|
278
|
+
|
|
279
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
280
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
281
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to
|
|
282
|
+
not work as expected)
|
|
283
|
+
- [ ] Documentation update
|
|
284
|
+
- [ ] Other (please describe)
|
|
285
|
+
|
|
286
|
+
## Checklist
|
|
287
|
+
|
|
288
|
+
- [ ] My code follows the project's style guidelines
|
|
289
|
+
- [ ] I have performed a self-review of my own code
|
|
290
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
291
|
+
- [ ] I have made corresponding changes to the documentation
|
|
292
|
+
- [ ] Code formatted with Prettier
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### `.github/ISSUE_TEMPLATE/bug_report.md`
|
|
296
|
+
|
|
297
|
+
```markdown
|
|
298
|
+
---
|
|
299
|
+
name: Bug report
|
|
300
|
+
about: Create a report to help us improve
|
|
301
|
+
title: '[BUG] '
|
|
302
|
+
labels: bug
|
|
303
|
+
assignees: ''
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Description
|
|
307
|
+
|
|
308
|
+
A clear and concise description of what the bug is.
|
|
309
|
+
|
|
310
|
+
## Steps to Reproduce
|
|
311
|
+
|
|
312
|
+
1.
|
|
313
|
+
2.
|
|
314
|
+
3.
|
|
315
|
+
|
|
316
|
+
## Expected Behavior
|
|
317
|
+
|
|
318
|
+
A clear and concise description of what you expected to happen.
|
|
319
|
+
|
|
320
|
+
## Actual Behavior
|
|
321
|
+
|
|
322
|
+
A clear and concise description of what actually happened.
|
|
323
|
+
|
|
324
|
+
## Environment
|
|
325
|
+
|
|
326
|
+
- OS: [e.g., macOS 14.0, Windows 11, Ubuntu 22.04]
|
|
327
|
+
- Node version: [e.g., 20.10.0]
|
|
328
|
+
- pnpm version: [e.g., 8.10.0]
|
|
329
|
+
- agent-docs version: [e.g., 1.0.0]
|
|
330
|
+
|
|
331
|
+
## Additional Context
|
|
332
|
+
|
|
333
|
+
Add any other context about the problem here.
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### `.github/ISSUE_TEMPLATE/feature_request.md`
|
|
337
|
+
|
|
338
|
+
```markdown
|
|
339
|
+
---
|
|
340
|
+
name: Feature request
|
|
341
|
+
about: Suggest an idea for this project
|
|
342
|
+
title: '[FEATURE] '
|
|
343
|
+
labels: enhancement
|
|
344
|
+
assignees: ''
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Description
|
|
348
|
+
|
|
349
|
+
A clear and concise description of what you want to happen.
|
|
350
|
+
|
|
351
|
+
## Motivation
|
|
352
|
+
|
|
353
|
+
Why is this feature needed? What problem does it solve?
|
|
354
|
+
|
|
355
|
+
## Proposed Solution
|
|
356
|
+
|
|
357
|
+
A clear and concise description of how you envision this feature working.
|
|
358
|
+
|
|
359
|
+
## Alternatives Considered
|
|
360
|
+
|
|
361
|
+
A clear and concise description of any alternative solutions or features you've
|
|
362
|
+
considered.
|
|
363
|
+
|
|
364
|
+
## Additional Context
|
|
365
|
+
|
|
366
|
+
Add any other context, examples, or screenshots about the feature request here.
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### `postinstall.mjs`
|
|
370
|
+
|
|
371
|
+
The postinstall script that runs when this package is installed in another
|
|
372
|
+
project. It should create a symlink/junction from the consuming project's
|
|
373
|
+
`docs/` directory to this package's `docs/` directory, but only if the consuming
|
|
374
|
+
project doesn't already have a `docs/` directory.
|
|
375
|
+
|
|
376
|
+
```js
|
|
377
|
+
// postinstall.mjs
|
|
378
|
+
// Implementation details for creating cross-platform symlinks/junctions
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### `prettier.config.js`
|
|
382
|
+
|
|
383
|
+
Prettier configuration file defining code formatting rules for the project.
|
|
384
|
+
|
|
385
|
+
```js
|
|
386
|
+
/** @type {import('prettier').Config} */
|
|
387
|
+
export default {
|
|
388
|
+
// Configuration options for consistent code formatting
|
|
389
|
+
};
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### `.github/workflows/format.yml`
|
|
393
|
+
|
|
394
|
+
GitHub Actions CI workflow that runs `pnpm format:check` on push and pull
|
|
395
|
+
requests to ensure code formatting compliance.
|
|
396
|
+
|
|
397
|
+
```yaml
|
|
398
|
+
name: Format Check
|
|
399
|
+
on:
|
|
400
|
+
push:
|
|
401
|
+
pull_request:
|
|
402
|
+
jobs:
|
|
403
|
+
format:
|
|
404
|
+
runs-on: ubuntu-latest
|
|
405
|
+
steps:
|
|
406
|
+
- uses: actions/checkout@v4
|
|
407
|
+
- uses: pnpm/action-setup@v4
|
|
408
|
+
- name: Install dependencies
|
|
409
|
+
run: pnpm install
|
|
410
|
+
- name: Check formatting
|
|
411
|
+
run: pnpm format:check
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### `.cursor/rules/IMPORTANT.mdc`
|
|
415
|
+
|
|
416
|
+
Cursor IDE agent rules that provide instructions for AI agents working with this
|
|
417
|
+
project. These rules help AI coding assistants understand the project's
|
|
418
|
+
structure, conventions, and workflows.
|
|
419
|
+
|
|
420
|
+
```
|
|
421
|
+
# Important Rules for agent-docs
|
|
422
|
+
|
|
423
|
+
Rules and guidelines for AI agents working with this codebase...
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### `.cursor/plans/OPTIMISE.md`
|
|
427
|
+
|
|
428
|
+
AI agent guidance file containing optimization strategies and best practices for
|
|
429
|
+
maintaining low token counts and efficient documentation formats.
|
|
430
|
+
|
|
431
|
+
### `.cursor/plans/VERSIONING.md`
|
|
432
|
+
|
|
433
|
+
AI agent guidance file containing versioning rules and workflows for managing
|
|
434
|
+
semantic versioning of documentation files according to semver principles.
|
|
435
|
+
|
|
436
|
+
## Core Concept
|
|
437
|
+
|
|
438
|
+
"Docs" are markdown files (e.g., `REACT.md`, `XPATH31.md`, `PMD.md`) containing
|
|
439
|
+
distilled technical, style, architectural, and philosophical knowledge. They are
|
|
440
|
+
designed to be:
|
|
441
|
+
|
|
442
|
+
- Low token count
|
|
443
|
+
- Comprehensive for AI agent consumption
|
|
444
|
+
- Reusable across projects
|
|
445
|
+
|
|
446
|
+
**Filename format:** Uppercase, no spaces, no dots. Version numbers like "XPath
|
|
447
|
+
3.1" become `XPATH31.md`. Remove redundant words like "plugin" when they appear
|
|
448
|
+
between other words (e.g., "prettier-plugin-apex" → `PRETTIERAPEX.md`,
|
|
449
|
+
"eslint-plugin-jsdoc" → `ESLINTJSDOC.md`). All files go in the `docs/` folder.
|
|
450
|
+
|
|
451
|
+
**Versioning:** Every file in `docs/` should be versioned using semantic
|
|
452
|
+
versioning (semver). Version information should be tracked and managed according
|
|
453
|
+
to the rules in `.cursor/plans/VERSIONING.md`. The versioning system tracks
|
|
454
|
+
changes to each doc file:
|
|
455
|
+
|
|
456
|
+
- **Patch version bump** - Minor changes or corrections (typos, clarifications,
|
|
457
|
+
formatting)
|
|
458
|
+
- **Minor version bump** - New sections added to a file
|
|
459
|
+
- **Major version bump** - Sections replaced or removed from a file
|
|
460
|
+
|
|
461
|
+
Versions are compared against the latest commit in the `main` branch. A script
|
|
462
|
+
can be created to help with versioning by reading markdown headers and detecting
|
|
463
|
+
changes.
|
|
464
|
+
|
|
465
|
+
**Existing Docs:** The existing documentation files in the `docs/` directory
|
|
466
|
+
remain and help seed the project. These existing docs need to be versioned using
|
|
467
|
+
the same semver system. When the versioning system is implemented, all existing
|
|
468
|
+
docs should be initialized with version `1.0.0` and tracked going forward.
|
|
469
|
+
|
|
470
|
+
## Output Format
|
|
471
|
+
|
|
472
|
+
Each doc should follow this structure (sections should be omitted if not
|
|
473
|
+
applicable):
|
|
474
|
+
|
|
475
|
+
```markdown
|
|
476
|
+
# <NAME> [Quick Reference | Reference]
|
|
477
|
+
|
|
478
|
+
> Optional: One-line philosophy/description quote
|
|
479
|
+
|
|
480
|
+
## Overview
|
|
481
|
+
|
|
482
|
+
Brief context (2-3 sentences max). May include reference links to official docs.
|
|
483
|
+
|
|
484
|
+
## Core Concepts / Key Features
|
|
485
|
+
|
|
486
|
+
Bulleted list of fundamental concepts, features, or capabilities
|
|
487
|
+
|
|
488
|
+
## Configuration / Setup
|
|
489
|
+
|
|
490
|
+
Tables for configuration options, properties, or setup instructions
|
|
491
|
+
|
|
492
|
+
| Property | Type | Default | Description |
|
|
493
|
+
| -------- | ---- | ------- | ----------- |
|
|
494
|
+
|
|
495
|
+
## Usage / Examples
|
|
496
|
+
|
|
497
|
+
Code examples (minimal, essential only)
|
|
498
|
+
|
|
499
|
+
## API Reference
|
|
500
|
+
|
|
501
|
+
Essential APIs, methods, components (condensed, often in tables)
|
|
502
|
+
|
|
503
|
+
## Patterns & Best Practices
|
|
504
|
+
|
|
505
|
+
Recommended patterns, anti-patterns to avoid
|
|
506
|
+
|
|
507
|
+
## Architecture
|
|
508
|
+
|
|
509
|
+
Key architectural patterns and decisions (if relevant)
|
|
510
|
+
|
|
511
|
+
## Common Patterns
|
|
512
|
+
|
|
513
|
+
Common usage patterns with examples
|
|
514
|
+
|
|
515
|
+
## Important Notes
|
|
516
|
+
|
|
517
|
+
Critical gotchas, limitations, or warnings
|
|
518
|
+
|
|
519
|
+
**Note:** If an `IMPORTANT.md` file exists in the repository, it should
|
|
520
|
+
reference `.cursor/plans/VERSIONING.md` for versioning guidelines.
|
|
521
|
+
|
|
522
|
+
## Related Documentation
|
|
523
|
+
|
|
524
|
+
Cross-references to other docs using `[Name](FILENAME.md)` format
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**Content Style Guidelines:**
|
|
528
|
+
|
|
529
|
+
- **Terse but precise** - Every word counts, no fluff
|
|
530
|
+
- **Bullet points over prose** - Use lists for scannability
|
|
531
|
+
- **Tables for structured data** - Configuration options, APIs, properties
|
|
532
|
+
- **Code snippets only when essential** - Minimal examples that demonstrate key
|
|
533
|
+
concepts
|
|
534
|
+
- **Prioritise actionable information** - Focus on what AI agents need to know,
|
|
535
|
+
not theory
|
|
536
|
+
- **Cross-reference related docs** - Use `[Name](FILENAME.md)` format for
|
|
537
|
+
related docs
|
|
538
|
+
- **Title format** - Usually "X Quick Reference" or "X Reference", sometimes "X
|
|
539
|
+
Guide"
|
|
540
|
+
- **Optional philosophy quote** - Some docs include a `>` blockquote at the top
|
|
541
|
+
with core philosophy
|
|
542
|
+
|
|
543
|
+
## Project Structure
|
|
544
|
+
|
|
545
|
+
```
|
|
546
|
+
agent-docs/
|
|
547
|
+
├── .github/
|
|
548
|
+
│ ├── ISSUE_TEMPLATE/
|
|
549
|
+
│ │ ├── bug_report.md
|
|
550
|
+
│ │ └── feature_request.md
|
|
551
|
+
│ ├── pull_request_template.md
|
|
552
|
+
│ └── workflows/
|
|
553
|
+
│ └── format.yml
|
|
554
|
+
├── .cursor/
|
|
555
|
+
│ ├── plans/
|
|
556
|
+
│ │ ├── OPTIMISE.md
|
|
557
|
+
│ │ └── VERSIONING.md
|
|
558
|
+
│ └── rules/
|
|
559
|
+
│ └── IMPORTANT.mdc
|
|
560
|
+
├── docs/ # Documentation docs (versioned using semver, includes existing seed docs)
|
|
561
|
+
├── CODE_OF_CONDUCT.md
|
|
562
|
+
├── CONTRIBUTING.md
|
|
563
|
+
├── LICENSE.md
|
|
564
|
+
├── README.md
|
|
565
|
+
├── SECURITY.md
|
|
566
|
+
├── package.json
|
|
567
|
+
├── pnpm-lock.yaml
|
|
568
|
+
├── postinstall.mjs
|
|
569
|
+
└── prettier.config.js
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
## Files to Create
|
|
573
|
+
|
|
574
|
+
### README.md
|
|
575
|
+
|
|
576
|
+
Include:
|
|
577
|
+
|
|
578
|
+
- Project name and Matrix-inspired tagline
|
|
579
|
+
- What docs are and why they exist
|
|
580
|
+
- Installation instructions (clone + `pnpm install`)
|
|
581
|
+
- How to add/link the `docs/` directory into another project
|
|
582
|
+
- How to configure an IDE agent to reference the docs (e.g. `@PMD.md`)
|
|
583
|
+
- Documentation section listing the docs in `docs/` with one-line descriptions
|
|
584
|
+
- Contributing guidelines
|
|
585
|
+
- Links to SECURITY, LICENSE, and repository/Issues
|
|
586
|
+
|
|
587
|
+
### SECURITY.md
|
|
588
|
+
|
|
589
|
+
```markdown
|
|
590
|
+
# Security Policy
|
|
591
|
+
|
|
592
|
+
## Reporting a Vulnerability
|
|
593
|
+
|
|
594
|
+
Please report security vulnerabilities to: security@starch.uk
|
|
595
|
+
|
|
596
|
+
Do not open public issues for security concerns.
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### LICENSE.md
|
|
600
|
+
|
|
601
|
+
Standard MIT license with copyright holder: starch-uk
|
|
602
|
+
|
|
603
|
+
### GitHub Action (.github/workflows/format.yml)
|
|
604
|
+
|
|
605
|
+
- Trigger on push and pull_request
|
|
606
|
+
- Use pnpm for package management
|
|
607
|
+
- Run `pnpm format:check`
|
|
608
|
+
|
|
609
|
+
### package.json
|
|
610
|
+
|
|
611
|
+
- Name: `@starch-uk/agent-docs`
|
|
612
|
+
- Type: module
|
|
613
|
+
- Version: `1.0.0`
|
|
614
|
+
- Scripts: `format`, `format:fix`, `format:check`, `postinstall`
|
|
615
|
+
- Dev dependencies: `prettier`
|
|
616
|
+
- Engines: Node.js >= 20.0.0
|
|
617
|
+
|
|
618
|
+
**Project Versioning:** The project as a whole maintains a version in
|
|
619
|
+
`package.json`. Any changes to docs files should increment the corresponding
|
|
620
|
+
patch/minor/major version (whichever is the greatest change in any docs file),
|
|
621
|
+
compared to the version in the latest commit in the `main` branch. A script can
|
|
622
|
+
be created to help with this by analyzing changes across all docs files and
|
|
623
|
+
determining the appropriate version bump.
|
|
624
|
+
|
|
625
|
+
### .cursor/plans/VERSIONING.md
|
|
626
|
+
|
|
627
|
+
Create a plan document that documents the versioning system for docs files and
|
|
628
|
+
the project as a whole.
|
|
629
|
+
|
|
630
|
+
The plan should:
|
|
631
|
+
|
|
632
|
+
- Document that every file in `docs/` should be versioned using semantic
|
|
633
|
+
versioning (semver)
|
|
634
|
+
- Explain versioning rules:
|
|
635
|
+
- **Patch version bump** - Minor changes or corrections (typos,
|
|
636
|
+
clarifications, formatting fixes) compared to the version in the latest
|
|
637
|
+
commit in the `main` branch
|
|
638
|
+
- **Minor version bump** - New sections added to a file compared to the
|
|
639
|
+
version in the latest commit in the `main` branch
|
|
640
|
+
- **Major version bump** - Sections replaced or removed from a file compared
|
|
641
|
+
to the version in the latest commit in the `main` branch
|
|
642
|
+
- Document that the project as a whole maintains a version in `package.json`
|
|
643
|
+
(currently `1.0.0`)
|
|
644
|
+
- Explain that changes to docs files should increment the project version
|
|
645
|
+
(patch/minor/major based on the greatest change in any docs file) compared to
|
|
646
|
+
the version in the latest commit in the `main` branch
|
|
647
|
+
- **Document initialization of existing docs:** The existing documentation files
|
|
648
|
+
in the `docs/` directory (APEXANNOTATIONS.md, APEXDOC.md, CODEANALYZER.md,
|
|
649
|
+
CPD.md, ESLINT.md, ESLINTJSDOC.md, FLOWSCANNER.md, GRAPHBINARY.md,
|
|
650
|
+
GRAPHENGINE.md, GRAPHML.md, GRAPHSON.md, GREMLIN.md, GRYO.md, HUSKY.md,
|
|
651
|
+
JEST30.md, JORJE.md, JSDOC.md, PMD.md, PMDAPEXAST.md, PMDSUPPRESSWARNINGS.md,
|
|
652
|
+
PNPM.md, PRETTIER.md, PRETTIERAPEX.md, REGEX.md, RETIREJS.md, SFCLI.md,
|
|
653
|
+
TINKERPOP.md, VITEST.md, VSCODE.md, XPATH31.md) need to be initialized with
|
|
654
|
+
version `1.0.0` (or appropriate version based on their current state) when the
|
|
655
|
+
versioning system is first implemented. These existing docs will be tracked
|
|
656
|
+
going forward using the same semver system.
|
|
657
|
+
- Describe how scripts can help with versioning by:
|
|
658
|
+
- Reading markdown files and detecting headers/sections
|
|
659
|
+
- Comparing current state with the latest commit in `main` branch
|
|
660
|
+
- Determining appropriate version bumps based on change types
|
|
661
|
+
- Updating version information in docs files and `package.json`
|
|
662
|
+
- Initializing version information for existing docs that don't have version
|
|
663
|
+
metadata yet
|
|
664
|
+
- Include guidance on how to track versions for each doc file (e.g., in file
|
|
665
|
+
metadata, separate version file, or git tags)
|
|
666
|
+
- Document the workflow: make changes → analyze changes → determine version
|
|
667
|
+
bumps → update versions → commit
|
|
668
|
+
|
|
669
|
+
### .cursor/plans/OPTIMISE.md
|
|
670
|
+
|
|
671
|
+
Create a plan document that documents the process for converting high token
|
|
672
|
+
count documentation files into AI Agent-friendly low token versions without
|
|
673
|
+
losing any essential details. This plan will be used by AI-powered IDEs (like
|
|
674
|
+
Cursor) to optimize docs, not by the CLI tool itself.
|
|
675
|
+
|
|
676
|
+
The plan should:
|
|
677
|
+
|
|
678
|
+
- Include core principles: terse but precise, tables over prose, bullet points
|
|
679
|
+
for lists, minimal code examples, structured sections, reference-style
|
|
680
|
+
formatting
|
|
681
|
+
- Document optimization techniques: text reduction strategies, structural
|
|
682
|
+
optimizations (prose to tables, lists to tables, API documentation to tables,
|
|
683
|
+
property lists to tables), content organization patterns
|
|
684
|
+
- Cover converting verbose documentation patterns: API Parameters/Returns
|
|
685
|
+
sections to tables, property documentation lists to tables, interface
|
|
686
|
+
explanations to inline comments in code blocks
|
|
687
|
+
- Provide a step-by-step conversion process: analysis, structure planning,
|
|
688
|
+
content transformation, validation
|
|
689
|
+
- Include formatting standards, quality checklist, common pitfalls to avoid, and
|
|
690
|
+
success metrics
|
|
691
|
+
- Focus on generic, reusable advice applicable to any high-token documentation
|
|
692
|
+
file
|
|
693
|
+
|
|
694
|
+
## Implementation Notes
|
|
695
|
+
|
|
696
|
+
1. Filename generation: Convert to uppercase, remove spaces and dots. Version
|
|
697
|
+
numbers like "XPath 3.1" become "XPATH31.md". Remove redundant words like
|
|
698
|
+
"plugin" when they appear between other words (e.g., "prettier-plugin-apex" →
|
|
699
|
+
"PRETTIERAPEX.md", "eslint-plugin-jsdoc" → "ESLINTJSDOC.md"). All docs live
|
|
700
|
+
in the `docs/` folder.
|
|
701
|
+
|
|
702
|
+
## Deliverables
|
|
703
|
+
|
|
704
|
+
1. Repository scaffolding with documentation, licensing, security, and GitHub
|
|
705
|
+
workflow files
|
|
706
|
+
2. A stable set of docs in `docs/` following this plan
|
|
707
|
+
3. Versioning system for all docs (including existing docs in `docs/` directory)
|