ma-agents 2.0.0 → 2.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-agents",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "NPX tool to install skills for AI coding agents (Claude Code, Gemini, Copilot, Kilocode, Cline, Cursor)",
5
5
  "main": "index.js",
6
6
  "bin": {
package/skills/README.md CHANGED
@@ -302,6 +302,18 @@ Enforces target-based, property-oriented CMake patterns (CMake 3.0+ philosophy).
302
302
 
303
303
  ---
304
304
 
305
+ ### 14. Code Documentation Best Practices
306
+ **Directory:** `code-documentation/`
307
+
308
+ Enforces standardized file headers and method documentation across C++, C#, JS, and TS.
309
+
310
+ **Key Features:**
311
+ - ✅ **Standardized Headers**: Mandatory purpose, author, and version metadata.
312
+ - ✅ **Language Standards**: Supporting Doxygen (C++), XML (C#), and JSDoc (JS/TS).
313
+ - ✅ **Semantic Richness**: Mandates documenting `@param`, `@returns`, and `@throws`.
314
+
315
+ ---
316
+
305
317
  ## Requirements
306
318
 
307
319
  ### All Skills
@@ -0,0 +1,51 @@
1
+ # Code Documentation Best Practices
2
+
3
+ This skill enforces high-quality, standardized documentation for source code files and methods. It ensures consistent metadata and clear explanations of intent across different programming languages.
4
+
5
+ ## Policies
6
+
7
+ ### 1. Mandatory File Headers
8
+ * **Rule**: Every source file must begin with a standardized header block.
9
+ * **Contents**:
10
+ - **Purpose**: A brief description of what the file contains/solves.
11
+ - **Author/Project**: Project name or author information.
12
+ - **Metadata**: Date created/modified and version if applicable.
13
+
14
+ ### 2. Mandatory Method Documentation
15
+ * **Rule**: Every public or non-trivial internal function/method must have a documentation block immediately preceding it.
16
+ * **Standards**:
17
+ - **C++**: Use Doxygen style (`/** ... */`).
18
+ - **C#**: Use XML Documentation style (`/// <summary> ...`).
19
+ - **JS/TS**: Use JSDoc style (`/** ... */`).
20
+ * **Required Fields**:
21
+ - **Summary**: Concise description of what the method does.
22
+ - **Parameters**: Name and purpose of each argument.
23
+ - **Return Value**: Description of the output.
24
+ - **Exceptions/Errors**: Document significant error states or exceptions thrown.
25
+
26
+ ### 3. Focus on "Why" and "What"
27
+ * **Rule**: Do not document trivial code (e.g., `i++ // increment i`).
28
+ * **Action**: Document the **intent** and **usage constraints**. If the code is complex, explain the high-level logic rather than line-by-line mechanics.
29
+
30
+ ### 4. Semantic Linking
31
+ * **Rule**: Use language-specific linking features (e.g., `@see`, `{@link}`, `<see cref=.../>`) to refer to related types or methods.
32
+
33
+ ## Language Specifics
34
+
35
+ | Language | Format | Key Tags |
36
+ | :--- | :--- | :--- |
37
+ | **C++** | Doxygen | `\brief`, `\param`, `\return`, `\throw` |
38
+ | **C#** | XML Doc | `<summary>`, `<param>`, `<returns>`, `<exception>` |
39
+ | **JS/TS** | JSDoc | `@description`, `@param`, `@returns`, `@throws` |
40
+
41
+ ---
42
+
43
+ ## Example (Generic Pattern)
44
+
45
+ ```text
46
+ [File Header]
47
+ [Imports]
48
+
49
+ [Component Documentation]
50
+ [Implementation]
51
+ ```
@@ -0,0 +1,29 @@
1
+ # C++ Documentation (Doxygen Style)
2
+
3
+ ### File Header
4
+ ```cpp
5
+ /**
6
+ * @file DataProcessor.hpp
7
+ * @brief Handles high-performance transformation of raw sensor data.
8
+ * @author Antigravity / ma-agents
9
+ * @date 2026-02-22
10
+ * @version 1.0.0
11
+ */
12
+ ```
13
+
14
+ ### Method Documentation
15
+ ```cpp
16
+ /**
17
+ * @brief Calculates the moving average of a dataset.
18
+ *
19
+ * This method uses a sliding window algorithm to smooth out volatility
20
+ * in sensor inputs.
21
+ *
22
+ * @param data A span of float values to process.
23
+ * @param windowSize The size of the averaging window (must be > 0).
24
+ * @return The calculated moving average as a float.
25
+ * @throw std::invalid_argument If data is empty or windowSize is invalid.
26
+ * @see SignalFilter
27
+ */
28
+ float calculateMovingAverage(gsl::span<const float> data, size_t windowSize);
29
+ ```
@@ -0,0 +1,28 @@
1
+ # C# Documentation (XML Style)
2
+
3
+ ### File Header
4
+ ```csharp
5
+ /*
6
+ * File: AuthenticationService.cs
7
+ * Purpose: Manages user login, token validation, and multi-factor authentication.
8
+ * Author: Antigravity / ma-agents
9
+ * Date: 2026-02-22
10
+ */
11
+ ```
12
+
13
+ ### Method Documentation
14
+ ```csharp
15
+ /// <summary>
16
+ /// Validates a user's credentials against the secure identity store.
17
+ /// </summary>
18
+ /// <param name="username">The unique identifier for the user.</param>
19
+ /// <param name="password">The plain-text password (will be hashed internally).</param>
20
+ /// <returns>
21
+ /// An <see cref="AuthResult"/> indicating success or failure with a details message.
22
+ /// </returns>
23
+ /// <exception cref="SecurityException">Thrown if the account is locked.</exception>
24
+ public async Task<AuthResult> LoginAsync(string username, string password)
25
+ {
26
+ // ...
27
+ }
28
+ ```
@@ -0,0 +1,28 @@
1
+ # JavaScript & TypeScript Documentation (JSDoc Style)
2
+
3
+ ### File Header
4
+ ```typescript
5
+ /**
6
+ * @file api-client.ts
7
+ * @description Centralized HTTP client with automatic retry and error handling.
8
+ * @author Antigravity / ma-agents
9
+ * @version 1.2.0
10
+ */
11
+ ```
12
+
13
+ ### Method Documentation
14
+ ```typescript
15
+ /**
16
+ * Fetches data from a specific endpoint with optional caching.
17
+ *
18
+ * @template T The expected type of the response data.
19
+ * @param {string} url The target URL (must be absolute).
20
+ * @param {RequestOptions} [options] Optional configuration for headers and timeouts.
21
+ * @returns {Promise<T>} A promise that resolves to the parsed JSON response.
22
+ * @throws {NetworkError} If the server is unreachable.
23
+ * @throws {ValidationError} If the response schema does not match T.
24
+ */
25
+ async function fetchData<T>(url: string, options?: RequestOptions): Promise<T> {
26
+ // ...
27
+ }
28
+ ```
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "Code Documentation Best Practices",
3
+ "description": "Standardize file headers and method documentation across C++, C#, JS, and TS.",
4
+ "version": "1.0.0",
5
+ "author": "Antigravity",
6
+ "tags": [
7
+ "documentation",
8
+ "best-practices",
9
+ "cpp",
10
+ "csharp",
11
+ "javascript",
12
+ "typescript",
13
+ "doxygen",
14
+ "jsdoc"
15
+ ],
16
+ "applies_when": [
17
+ "creating or modifying source code files",
18
+ "defining new functions, methods, or classes",
19
+ "refactoring code logic",
20
+ "documenting APIs"
21
+ ],
22
+ "always_load": true
23
+ }