ma-agents 3.4.8 → 3.4.9

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 (95) hide show
  1. package/.opencode/skills/.ma-agents.json +167 -48
  2. package/.opencode/skills/MANIFEST.yaml +128 -0
  3. package/.opencode/skills/ai-audit-trail/SKILL.md +23 -0
  4. package/.opencode/skills/auto-bug-detection/SKILL.md +169 -0
  5. package/.opencode/skills/cmake-best-practices/SKILL.md +64 -0
  6. package/.opencode/skills/cmake-best-practices/examples/cmake.md +59 -0
  7. package/.opencode/skills/code-documentation/SKILL.md +57 -0
  8. package/.opencode/skills/code-documentation/examples/cpp.md +29 -0
  9. package/.opencode/skills/code-documentation/examples/csharp.md +28 -0
  10. package/.opencode/skills/code-documentation/examples/javascript_typescript.md +28 -0
  11. package/.opencode/skills/code-documentation/examples/python.md +57 -0
  12. package/.opencode/skills/code-review/SKILL.md +43 -0
  13. package/.opencode/skills/commit-message/SKILL.md +79 -0
  14. package/.opencode/skills/cpp-best-practices/SKILL.md +234 -0
  15. package/.opencode/skills/cpp-best-practices/examples/modern-idioms.md +189 -0
  16. package/.opencode/skills/cpp-best-practices/examples/naming-and-organization.md +102 -0
  17. package/.opencode/skills/cpp-concurrency-safety/SKILL.md +60 -0
  18. package/.opencode/skills/cpp-concurrency-safety/examples/concurrency.md +73 -0
  19. package/.opencode/skills/cpp-const-correctness/SKILL.md +63 -0
  20. package/.opencode/skills/cpp-const-correctness/examples/const_correctness.md +54 -0
  21. package/.opencode/skills/cpp-memory-handling/SKILL.md +42 -0
  22. package/.opencode/skills/cpp-memory-handling/examples/modern-cpp.md +49 -0
  23. package/.opencode/skills/cpp-memory-handling/examples/smart-pointers.md +46 -0
  24. package/.opencode/skills/cpp-modern-composition/SKILL.md +64 -0
  25. package/.opencode/skills/cpp-modern-composition/examples/composition.md +51 -0
  26. package/.opencode/skills/cpp-robust-interfaces/SKILL.md +55 -0
  27. package/.opencode/skills/cpp-robust-interfaces/examples/interfaces.md +56 -0
  28. package/.opencode/skills/create-hardened-docker-skill/SKILL.md +637 -0
  29. package/.opencode/skills/create-hardened-docker-skill/scripts/create-all.sh +489 -0
  30. package/.opencode/skills/csharp-best-practices/SKILL.md +278 -0
  31. package/.opencode/skills/docker-hardening-verification/SKILL.md +28 -0
  32. package/.opencode/skills/docker-hardening-verification/scripts/verify-hardening.sh +39 -0
  33. package/.opencode/skills/docker-image-signing/SKILL.md +28 -0
  34. package/.opencode/skills/docker-image-signing/scripts/sign-image.sh +33 -0
  35. package/.opencode/skills/document-revision-history/SKILL.md +104 -0
  36. package/.roo/skills/.ma-agents.json +167 -48
  37. package/.roo/skills/MANIFEST.yaml +128 -0
  38. package/.roo/skills/ai-audit-trail/SKILL.md +23 -0
  39. package/.roo/skills/auto-bug-detection/SKILL.md +169 -0
  40. package/.roo/skills/cmake-best-practices/SKILL.md +64 -0
  41. package/.roo/skills/cmake-best-practices/examples/cmake.md +59 -0
  42. package/.roo/skills/code-documentation/SKILL.md +57 -0
  43. package/.roo/skills/code-documentation/examples/cpp.md +29 -0
  44. package/.roo/skills/code-documentation/examples/csharp.md +28 -0
  45. package/.roo/skills/code-documentation/examples/javascript_typescript.md +28 -0
  46. package/.roo/skills/code-documentation/examples/python.md +57 -0
  47. package/.roo/skills/code-review/SKILL.md +43 -0
  48. package/.roo/skills/commit-message/SKILL.md +79 -0
  49. package/.roo/skills/cpp-best-practices/SKILL.md +234 -0
  50. package/.roo/skills/cpp-best-practices/examples/modern-idioms.md +189 -0
  51. package/.roo/skills/cpp-best-practices/examples/naming-and-organization.md +102 -0
  52. package/.roo/skills/cpp-concurrency-safety/SKILL.md +60 -0
  53. package/.roo/skills/cpp-concurrency-safety/examples/concurrency.md +73 -0
  54. package/.roo/skills/cpp-const-correctness/SKILL.md +63 -0
  55. package/.roo/skills/cpp-const-correctness/examples/const_correctness.md +54 -0
  56. package/.roo/skills/cpp-memory-handling/SKILL.md +42 -0
  57. package/.roo/skills/cpp-memory-handling/examples/modern-cpp.md +49 -0
  58. package/.roo/skills/cpp-memory-handling/examples/smart-pointers.md +46 -0
  59. package/.roo/skills/cpp-modern-composition/SKILL.md +64 -0
  60. package/.roo/skills/cpp-modern-composition/examples/composition.md +51 -0
  61. package/.roo/skills/cpp-robust-interfaces/SKILL.md +55 -0
  62. package/.roo/skills/cpp-robust-interfaces/examples/interfaces.md +56 -0
  63. package/.roo/skills/create-hardened-docker-skill/SKILL.md +637 -0
  64. package/.roo/skills/create-hardened-docker-skill/scripts/create-all.sh +489 -0
  65. package/.roo/skills/csharp-best-practices/SKILL.md +278 -0
  66. package/.roo/skills/docker-hardening-verification/SKILL.md +28 -0
  67. package/.roo/skills/docker-hardening-verification/scripts/verify-hardening.sh +39 -0
  68. package/.roo/skills/docker-image-signing/SKILL.md +28 -0
  69. package/.roo/skills/docker-image-signing/scripts/sign-image.sh +33 -0
  70. package/.roo/skills/document-revision-history/SKILL.md +104 -0
  71. package/bin/cli.js +5 -4
  72. package/lib/agents.js +16 -1
  73. package/lib/bmad-extension/module-help.csv +4 -21
  74. package/lib/bmad-extension/skills/add-sprint/SKILL.md +40 -126
  75. package/lib/bmad-extension/skills/add-to-sprint/SKILL.md +142 -116
  76. package/lib/bmad-extension/skills/create-bug-story/SKILL.md +7 -75
  77. package/lib/bmad-extension/skills/modify-sprint/SKILL.md +0 -63
  78. package/lib/bmad-extension/skills/sprint-status-view/SKILL.md +138 -199
  79. package/lib/bmad-extension/workflows/add-sprint/workflow.md +39 -129
  80. package/lib/bmad-extension/workflows/add-to-sprint/workflow.md +205 -3
  81. package/lib/bmad-extension/workflows/modify-sprint/workflow.md +0 -5
  82. package/lib/bmad-extension/workflows/sprint-status-view/workflow.md +192 -3
  83. package/package.json +1 -1
  84. package/lib/bmad-extension/skills/cleanup-done/.gitkeep +0 -0
  85. package/lib/bmad-extension/skills/cleanup-done/SKILL.md +0 -159
  86. package/lib/bmad-extension/skills/cleanup-done/bmad-skill-manifest.yaml +0 -3
  87. package/lib/bmad-extension/skills/generate-backlog/.gitkeep +0 -0
  88. package/lib/bmad-extension/skills/generate-backlog/SKILL.md +0 -183
  89. package/lib/bmad-extension/skills/generate-backlog/bmad-skill-manifest.yaml +0 -3
  90. package/lib/bmad-extension/skills/prioritize-backlog/.gitkeep +0 -0
  91. package/lib/bmad-extension/skills/prioritize-backlog/SKILL.md +0 -195
  92. package/lib/bmad-extension/skills/prioritize-backlog/bmad-skill-manifest.yaml +0 -3
  93. package/lib/bmad-extension/skills/remove-from-sprint/.gitkeep +0 -0
  94. package/lib/bmad-extension/skills/remove-from-sprint/SKILL.md +0 -163
  95. package/lib/bmad-extension/skills/remove-from-sprint/bmad-skill-manifest.yaml +0 -3
@@ -0,0 +1,278 @@
1
+ ---
2
+ name: C# Best Practices
3
+ description: Comprehensive C# coding standards covering modern C# (C# 10-12), async/await, LINQ, dependency injection basics, nullable reference types, and testing conventions.
4
+ ---
5
+ # C# Best Practices
6
+
7
+ Coding standards for modern C# (C# 10+) across .NET 6 through .NET 8+. This skill covers language-level patterns. Framework-specific patterns (ASP.NET Core middleware, EF Core, Blazor) belong in future skills.
8
+
9
+ ## 1. Naming Conventions
10
+
11
+ **Rule:** Use consistent naming to maximize code readability and tooling support.
12
+
13
+ | Element | Convention | Example |
14
+ |---------|-----------|---------|
15
+ | Namespace | PascalCase, match folder | `MyApp.Services` |
16
+ | Class / Struct / Record | PascalCase | `CustomerService` |
17
+ | Interface | `I` + PascalCase | `ICustomerService` |
18
+ | Method | PascalCase | `GetCustomerAsync` |
19
+ | Property | PascalCase | `FirstName` |
20
+ | Local variable | camelCase | `customerCount` |
21
+ | Parameter | camelCase | `customerId` |
22
+ | Private field | `_` + camelCase | `_logger` |
23
+ | Constant | PascalCase | `MaxRetryCount` |
24
+ | Enum type | PascalCase singular | `OrderStatus` |
25
+ | Enum member | PascalCase | `OrderStatus.Pending` |
26
+ | Async method | suffix `Async` | `SaveAsync` |
27
+
28
+ ## 2. Code Organization
29
+
30
+ **Rule:** One type per file; namespace matches folder path.
31
+
32
+ - File-scoped namespace declaration (C# 10+): `namespace MyApp.Services;` — no extra indentation level.
33
+ - Organize types in the order: constants, fields, constructors, properties, methods (public first, then private).
34
+ - Use `global using` directives in a dedicated `GlobalUsings.cs` file to eliminate repetitive `using` statements project-wide.
35
+ - Prefer `record` types for immutable data containers; use `record struct` for small value-type data.
36
+
37
+ ## 3. Nullable Reference Types
38
+
39
+ **Rule:** Enable NRT project-wide and treat warnings as errors.
40
+
41
+ ```xml
42
+ <Nullable>enable</Nullable>
43
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
44
+ ```
45
+
46
+ - Never use `!` (null-forgiving) to silence warnings without a documented reason.
47
+ - Use `string?` for intentionally nullable references; non-nullable types must be initialized before use.
48
+ - Initialize fields in the constructor or use `required` members (C# 11+) to enforce initialization at the call site.
49
+
50
+ ```csharp
51
+ public class Order
52
+ {
53
+ public required string CustomerId { get; init; }
54
+ public string? Notes { get; init; }
55
+ }
56
+ ```
57
+
58
+ ## 4. Modern C# Language Features
59
+
60
+ ### 4.1 Primary Constructors (C# 12)
61
+
62
+ Use primary constructors for classes and structs that primarily capture injected dependencies.
63
+
64
+ ```csharp
65
+ public class OrderService(IOrderRepository repository, ILogger<OrderService> logger)
66
+ {
67
+ public async Task<Order?> GetAsync(int id, CancellationToken ct)
68
+ {
69
+ logger.LogInformation("Getting order {Id}", id);
70
+ return await repository.FindAsync(id, ct);
71
+ }
72
+ }
73
+ ```
74
+
75
+ ### 4.2 Collection Expressions (C# 12)
76
+
77
+ Prefer collection expressions over explicit constructors for collection initialization.
78
+
79
+ ```csharp
80
+ // Preferred
81
+ int[] ids = [1, 2, 3];
82
+ List<string> names = ["Alice", "Bob"];
83
+
84
+ // Also valid for spread
85
+ int[] combined = [..ids, 4, 5];
86
+ ```
87
+
88
+ ### 4.3 Raw String Literals (C# 11)
89
+
90
+ Use raw string literals for JSON, SQL, or multi-line strings to avoid escaping.
91
+
92
+ ```csharp
93
+ var json = """
94
+ {
95
+ "name": "Alice",
96
+ "age": 30
97
+ }
98
+ """;
99
+ ```
100
+
101
+ ### 4.4 Pattern Matching
102
+
103
+ Use pattern matching to simplify type checks and conditional logic.
104
+
105
+ ```csharp
106
+ // Type patterns
107
+ string Describe(object obj) => obj switch
108
+ {
109
+ int n when n > 0 => "positive integer",
110
+ int n => "non-positive integer",
111
+ string s => $"string: {s}",
112
+ null => "null",
113
+ _ => "other"
114
+ };
115
+
116
+ // List patterns (C# 11)
117
+ bool IsFirstTwo(int[] arr) => arr is [var first, var second, ..];
118
+ ```
119
+
120
+ ### 4.5 Records and Record Structs
121
+
122
+ Use `record` for immutable reference-type DTOs and value objects. Use `readonly record struct` for small immutable value types that benefit from stack allocation.
123
+
124
+ ```csharp
125
+ // Reference-type record (class semantics, heap allocated)
126
+ public record Address(string Street, string City, string PostalCode);
127
+
128
+ // with-expressions for non-destructive mutation
129
+ var updated = original with { City = "New York" };
130
+
131
+ // Value-type record (struct semantics, stack allocated)
132
+ public readonly record struct Point(double X, double Y);
133
+
134
+ // Mutable record struct — only when mutation is explicitly needed
135
+ public record struct Range(int Start, int End);
136
+ ```
137
+
138
+ Choose `readonly record struct` over `record` when: the data is small (2-4 fields), frequently allocated in hot paths, and value semantics (equality by value, copied on assignment) are correct.
139
+
140
+ ### 4.6 File-Scoped Types (C# 11)
141
+
142
+ Use the `file` access modifier to restrict a type's visibility to the single file where it is declared. This is useful for implementation detail types that should not leak into other files.
143
+
144
+ ```csharp
145
+ // Only visible within this .cs file — cannot be used from any other file
146
+ file class OrderValidator
147
+ {
148
+ public bool IsValid(Order order) => order.CustomerId is not null;
149
+ }
150
+
151
+ // Also applies to records, structs, interfaces, delegates
152
+ file record struct ValidationResult(bool IsValid, string? Error);
153
+ ```
154
+
155
+ Use `file`-scoped types for: helper classes private to a single implementation file, source generators' internal scaffolding, and avoiding name collisions across files without polluting `internal` scope.
156
+
157
+ ## 5. Async/Await
158
+
159
+ **Rule:** Use async all the way up the call stack; never block on async code.
160
+
161
+ - Prefer `async Task` / `async Task<T>` over returning naked `Task`.
162
+ - Never use `async void` except for event handlers; use `async Task` instead.
163
+ - Always propagate `CancellationToken` from public API boundaries down to I/O calls.
164
+ - Prefer `ConfigureAwait(false)` in library code where the calling context does not matter.
165
+ - Use `ValueTask<T>` when a method frequently returns a synchronous result (hot-path optimization); default to `Task<T>` for simplicity.
166
+
167
+ ```csharp
168
+ // Correct — async all the way, CancellationToken propagated, ConfigureAwait in library code
169
+ public async Task<Order?> FindOrderAsync(int id, CancellationToken ct = default)
170
+ {
171
+ return await _repository.GetByIdAsync(id, ct).ConfigureAwait(false);
172
+ }
173
+
174
+ // Correct — multiple I/O operations with cancellation
175
+ public async Task<IReadOnlyList<Order>> GetActiveOrdersAsync(CancellationToken ct = default)
176
+ {
177
+ var orders = await _repository.ListAsync(ct).ConfigureAwait(false);
178
+ return orders.Where(o => o.IsActive).ToList();
179
+ }
180
+
181
+ // Wrong — blocks the thread pool, risks deadlock
182
+ public Order? FindOrder(int id) => FindOrderAsync(id).Result;
183
+ ```
184
+
185
+ ## 6. LINQ
186
+
187
+ **Rule:** Prefer method syntax; be aware of deferred execution.
188
+
189
+ - Use method syntax (`Where`, `Select`, `FirstOrDefault`) over query syntax for consistency with the rest of the codebase.
190
+ - LINQ queries execute lazily — materialize with `.ToList()`, `.ToArray()`, or `.ToDictionary()` when the result will be enumerated more than once or when you need a stable snapshot.
191
+ - Avoid LINQ inside tight loops on large collections; profile before assuming LINQ is a bottleneck.
192
+ - For in-memory filtering on large datasets, consider `AsSpan()` or `ArrayPool<T>` instead of repeated LINQ queries.
193
+
194
+ ```csharp
195
+ // Materialize when enumerating multiple times
196
+ var activeOrders = orders.Where(o => o.IsActive).ToList();
197
+
198
+ // Avoid multiple enumeration of IEnumerable
199
+ foreach (var order in activeOrders) { /* ... */ }
200
+ int count = activeOrders.Count;
201
+ ```
202
+
203
+ ## 7. Error Handling
204
+
205
+ **Rule:** Use structured exception handling; reserve exceptions for truly exceptional conditions.
206
+
207
+ - Define a domain exception hierarchy derived from a base exception: `AppException : Exception`.
208
+ - Use the Result pattern for expected failure cases (validation, not-found) where exceptions are expensive overhead.
209
+ - For HTTP APIs, structure error responses using ProblemDetails (RFC 9457) — the language-level concern is ensuring your exceptions carry enough data to produce one; the middleware that converts them belongs in a future `csharp-aspnet-patterns` skill.
210
+ - Never swallow exceptions silently; always log or rethrow.
211
+
212
+ ```csharp
213
+ // Result pattern for expected failures
214
+ public record Result<T>(T? Value, string? Error)
215
+ {
216
+ public bool IsSuccess => Error is null;
217
+ public static Result<T> Ok(T value) => new(value, null);
218
+ public static Result<T> Fail(string error) => new(default, error);
219
+ }
220
+
221
+ // Exception hierarchy
222
+ public class AppException(string message) : Exception(message);
223
+ public class NotFoundException(string entity, object id)
224
+ : AppException($"{entity} with id '{id}' was not found.");
225
+ ```
226
+
227
+ ## 8. Dependency Injection
228
+
229
+ **Rule:** Favor constructor injection; choose service lifetimes deliberately.
230
+
231
+ - Constructor injection is the standard pattern — inject only what the type needs.
232
+ - **Singleton:** One instance for the application lifetime. Use for stateless services and configuration.
233
+ - **Scoped:** One instance per request (web) or operation scope. Use for database contexts and unit-of-work patterns.
234
+ - **Transient:** New instance per resolution. Use for lightweight, stateless utilities.
235
+ - Never inject a Scoped or Transient service into a Singleton — this causes captive dependency bugs.
236
+
237
+ ```csharp
238
+ // Registration via IServiceCollection (Microsoft.Extensions.DependencyInjection)
239
+ // Works in console apps, workers, ASP.NET Core, and any .NET host
240
+ IServiceCollection services = new ServiceCollection();
241
+ services.AddSingleton<IConfigService, ConfigService>();
242
+ services.AddScoped<IOrderService, OrderService>();
243
+ services.AddTransient<IEmailFormatter, EmailFormatter>();
244
+ ```
245
+
246
+ ## 9. Testing
247
+
248
+ **Rule:** Follow Arrange-Act-Assert; use framework-agnostic patterns.
249
+
250
+ - Name tests: `MethodName_StateUnderTest_ExpectedBehavior`.
251
+ - Arrange all preconditions, act on the system under test, assert the single observable outcome.
252
+ - Major test frameworks: xUnit (most popular for .NET), NUnit, MSTest — choose based on team preference.
253
+ - Popular assertion libraries: FluentAssertions, Shouldly. Popular mock libraries: NSubstitute, Moq.
254
+ - Avoid test logic that depends on execution order; each test must be independent.
255
+
256
+ ```csharp
257
+ // xUnit example (patterns apply to NUnit/MSTest)
258
+ public class OrderServiceTests
259
+ {
260
+ [Fact]
261
+ public async Task GetAsync_ExistingId_ReturnsOrder()
262
+ {
263
+ // Arrange
264
+ var repository = Substitute.For<IOrderRepository>();
265
+ var logger = Substitute.For<ILogger<OrderService>>();
266
+ repository.FindAsync(1, Arg.Any<CancellationToken>())
267
+ .Returns(new Order { Id = 1 });
268
+ var sut = new OrderService(repository, logger);
269
+
270
+ // Act
271
+ var result = await sut.GetAsync(1, CancellationToken.None);
272
+
273
+ // Assert
274
+ result.Should().NotBeNull();
275
+ result!.Id.Should().Be(1);
276
+ }
277
+ }
278
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Docker Hardening Verification
3
+ description: Audits Docker images for security best practices, least privilege, and OpenShift compliance.
4
+ ---
5
+ # Docker Hardening Verification
6
+
7
+ ## Purpose
8
+ Audit Docker images to ensure they follow security best practices, specifically focusing on non-root execution and least privilege principles required for hardened clusters like OpenShift.
9
+
10
+ ## Instructions
11
+ 1. **Inspect Image**: Use `docker inspect` or `podman inspect` to check metadata.
12
+ 2. **Verify User**:
13
+ - Ensure `USER` is defined and is NOT `root` or `0`.
14
+ - Recommended: Use a high-numbered UID (e.g., `1001`).
15
+ 3. **Check Permissions**:
16
+ - Ensure sensitive directories are not world-writable.
17
+ - Check for `setuid`/`setgid` bits on binaries.
18
+ 4. **OpenShift Compliance**:
19
+ - Verify that the image doesn't require specific UIDs if it's meant to run with an arbitrary assigned UID (OpenShift's default).
20
+ - Check if the `/etc/passwd` entry handles arbitrary UIDs (e.g., by using `nss_wrapper` or similar).
21
+
22
+ ## Rules
23
+ - Fail the audit if `USER root` is detected.
24
+ - Flag a warning if many unnecessary packages/tools are present.
25
+ - Ensure only necessary ports are exposed.
26
+
27
+ ## Usage
28
+ Run `scripts/verify-hardening.sh <image_name>`
@@ -0,0 +1,39 @@
1
+ #!/bin/bash
2
+ # verify-hardening.sh - Part of ma-agents docker-hardening-verification skill
3
+
4
+ IMAGE=$1
5
+
6
+ if [ -z "$IMAGE" ]; then
7
+ echo "Usage: $0 <image_name>"
8
+ exit 1
9
+ fi
10
+
11
+ echo "Auditing image: $IMAGE"
12
+
13
+ # 1. Check User
14
+ USER_VAL=$(docker inspect --format='{{.Config.User}}' "$IMAGE")
15
+
16
+ if [ -z "$USER_VAL" ] || [ "$USER_VAL" == "root" ] || [ "$USER_VAL" == "0" ]; then
17
+ echo "[FAIL] Image runs as root! Definining a non-root USER is mandatory for hardened clusters."
18
+ else
19
+ echo "[PASS] Image runs as user: $USER_VAL"
20
+ fi
21
+
22
+ # 2. Check for sensitive capabilities (simplified check)
23
+ CAPS=$(docker inspect --format='{{.Config.CapAdd}}' "$IMAGE")
24
+ if [ "$CAPS" != "<nil>" ] && [ -n "$CAPS" ]; then
25
+ echo "[WARNING] Image has explicitly added capabilities: $CAPS"
26
+ fi
27
+
28
+ # 3. Check for exposed ports
29
+ PORTS=$(docker inspect --format='{{range $p, $conf := .Config.ExposedPorts}}{{$p}} {{end}}' "$IMAGE")
30
+ echo "[INFO] Exposed ports: ${PORTS:-none}"
31
+
32
+ # 4. OpenShift specific check (arbitrary UID support)
33
+ # This is a heuristic check looking for common entrypoint patterns
34
+ ENTRYPOINT=$(docker inspect --format='{{.Config.Entrypoint}}' "$IMAGE")
35
+ if [[ "$ENTRYPOINT" == *"bash"* ]]; then
36
+ echo "[INFO] Entrypoint uses bash, manual check for UID mapping recommended."
37
+ fi
38
+
39
+ echo "Summary: Audit complete for $IMAGE"
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Docker Image Signing
3
+ description: Automates the signing of Docker images using certificates and Cosign/Notary.
4
+ ---
5
+ # Docker Image Signing
6
+
7
+ ## Purpose
8
+ Ensure the integrity and authenticity of Docker images by signing them with a cryptographic key/certificate. This prevents unauthorized image substitution and ensures only trusted images are deployed.
9
+
10
+ ## Instructions
11
+ 1. **Tool Selection**: Use `cosign` (recommended) or `notary`.
12
+ 2. **Environment Check**: Verify that the signing tool and Docker/Podman are installed.
13
+ 3. **Signing Process**:
14
+ - Load the provided certificate/key.
15
+ - Run the signing command against the target image (using its SHA256 digest for immutability).
16
+ 4. **Verification**: Always run a verification check immediately after signing.
17
+
18
+ ## Rules
19
+ - NEVER sign images by tag alone; use the immutable digest (e.g., `image@sha256:...`).
20
+ - Private keys must be handled as secrets and never stored in the clear.
21
+ - Ensure the certificate provided is valid and not expired.
22
+
23
+ ## Usage
24
+ Run the provided script in `scripts/sign-image.sh` with:
25
+ - `IMAGE`: The image reference with digest.
26
+ - `CERT`: Path to the certificate file.
27
+ - `KEY`: Path to the private key file.
28
+ - `PASSPHRASE`: (Optional) Key passphrase.
@@ -0,0 +1,33 @@
1
+ #!/bin/bash
2
+ # sign-image.sh - Part of ma-agents docker-image-signing skill
3
+
4
+ IMAGE=$1
5
+ CERT=$2
6
+ KEY=$3
7
+ PASSPHRASE=$4
8
+
9
+ if [ -z "$IMAGE" ] || [ -z "$CERT" ] || [ -z "$KEY" ]; then
10
+ echo "Usage: $0 <image_digest> <cert_file> <key_file> [passphrase]"
11
+ exit 1
12
+ fi
13
+
14
+ echo "Signing image: $IMAGE"
15
+
16
+ # Check for cosign
17
+ if command -v cosign &> /dev/null; then
18
+ echo "Using Cosign for signing..."
19
+ if [ -n "$PASSPHRASE" ]; then
20
+ export COSIGN_PASSWORD=$PASSPHRASE
21
+ fi
22
+ cosign sign --key "$KEY" --cert "$CERT" "$IMAGE"
23
+ else
24
+ echo "Error: cosign not found. Please install cosign to use this skill."
25
+ exit 1
26
+ fi
27
+
28
+ if [ $? -eq 0 ]; then
29
+ echo "Successfully signed $IMAGE"
30
+ else
31
+ echo "Failed to sign $IMAGE"
32
+ exit 1
33
+ fi
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: Document Revision History
3
+ description: Manages a revision history table at the beginning of generated documents, tracking changes per version.
4
+ ---
5
+ # Document Revision History
6
+
7
+ Manage a revision history table at the beginning of every generated or updated document. This ensures traceability of changes across document versions.
8
+
9
+ ## Policy
10
+
11
+ ### 1. Revision History Table Required
12
+
13
+ Every document generated or updated by the agent MUST include a **Revision History** table immediately after the document title (before the Table of Contents or Section 1).
14
+
15
+ ### 2. Table Format
16
+
17
+ Use the following markdown table format:
18
+
19
+ ```markdown
20
+ | Version | Date | Author | Changes |
21
+ |---------|------|--------|---------|
22
+ | 1.0 | 2026-03-02 | Agent (Claude) | Initial document generation |
23
+ ```
24
+
25
+ ### 3. Column Definitions
26
+
27
+ | Column | Description |
28
+ |--------|-------------|
29
+ | **Version** | Document version number (e.g., 1.0, 1.1, 2.0). Use semantic versioning: major version for structural changes, minor for content updates |
30
+ | **Date** | Date of the change in `YYYY-MM-DD` format |
31
+ | **Author** | Who made the change — use `Agent (<model>)` for AI-generated content, or the user's name for user-directed changes |
32
+ | **Changes** | Brief summary of ALL changes made in this version. One line per version — consolidate multiple changes into a single descriptive entry |
33
+
34
+ ### 4. Rules for New Documents
35
+
36
+ When **generating a new document** for the first time:
37
+ - Add the revision history table immediately after the document title
38
+ - Set version to `1.0`
39
+ - Set date to today's date
40
+ - Set author to `Agent (<model>)` where `<model>` is the AI model name
41
+ - Set changes to `Initial document generation`
42
+
43
+ ### 5. Rules for Updated Documents
44
+
45
+ When **updating an existing document**:
46
+ - Read the existing revision history table
47
+ - Determine the new version number:
48
+ - **Minor increment** (e.g., 1.0 → 1.1): Content updates, corrections, additions to existing sections
49
+ - **Major increment** (e.g., 1.1 → 2.0): Structural changes, section reorganization, significant rewrites
50
+ - Add a **single new row** summarizing ALL changes made in this update session
51
+ - Do NOT create multiple rows for changes made in the same session — consolidate them into one line
52
+ - Preserve all previous revision history entries
53
+
54
+ ### 6. Changes Column Guidelines
55
+
56
+ Write concise but descriptive change summaries:
57
+
58
+ **Good examples:**
59
+ - `Added Sections 7-8 (impacts, analysis), expanded interface requirements to cover categories a-g`
60
+ - `Updated capability requirements based on user feedback, added 3 new interfaces`
61
+ - `Fixed traceability matrix, corrected section numbering`
62
+
63
+ **Bad examples:**
64
+ - `Updated document` (too vague)
65
+ - `Changed section 3.2.1 requirement SRS-CAP-001 description from X to Y, then changed 3.2.2...` (too granular — summarize)
66
+
67
+ ### 7. Placement
68
+
69
+ The revision history table MUST appear in this order within the document:
70
+
71
+ ```markdown
72
+ # Document Title
73
+
74
+ | Version | Date | Author | Changes |
75
+ |---------|------|--------|---------|
76
+ | 1.0 | 2026-03-02 | Agent (Claude) | Initial document generation |
77
+
78
+ > MIL-STD-498 or other document metadata...
79
+
80
+ ## Table of Contents (if applicable)
81
+
82
+ ## 1. Scope
83
+ ...
84
+ ```
85
+
86
+ ### 8. Multi-Author Sessions
87
+
88
+ If the user provides their name or the changes are user-directed corrections:
89
+ - Use the user's name as author
90
+ - If both the agent and user contribute in the same session, use `{user_name} / Agent (<model>)`
91
+
92
+ ## Example
93
+
94
+ A document updated twice would have:
95
+
96
+ ```markdown
97
+ # Software Requirements Specification (SRS)
98
+
99
+ | Version | Date | Author | Changes |
100
+ |---------|------|--------|---------|
101
+ | 1.0 | 2026-03-01 | Agent (Claude) | Initial document generation from SSDD and PRD artifacts |
102
+ | 1.1 | 2026-03-02 | Joseph / Agent (Claude) | Added 4 interface requirements per user feedback, corrected capability traceability to SSDD |
103
+ | 2.0 | 2026-03-15 | Agent (Claude) | Major rewrite: restructured CSCI decomposition after SSDD v2.0, updated all requirement IDs |
104
+ ```
package/bin/cli.js CHANGED
@@ -7,6 +7,7 @@ const fs = require('fs');
7
7
  const { execFileSync } = require('child_process');
8
8
  const { installSkill, uninstallSkill, getStatus, listSkills, listAgents, updateProjectContextRepoLayout } = require('../lib/installer');
9
9
  const bmad = require('../lib/bmad');
10
+ const { getBmadPlatformCode } = require('../lib/agents');
10
11
  const { handleCreateSkill, handleValidateSkill, handleSetMandatory, handleCustomizeAgent, handleCreateAgent } = require('../lib/skill-authoring');
11
12
 
12
13
  const PKG = require('../package.json');
@@ -884,7 +885,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
884
885
  if (!bmadInstalled) {
885
886
  if (yesFlag) {
886
887
  console.log(chalk.cyan('\n Installing BMAD-METHOD...'));
887
- const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id));
888
+ const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id)).map(id => getBmadPlatformCode(id));
888
889
  const success = await bmad.installBmad(['bmm'], bmadTools);
889
890
  if (success) {
890
891
  console.log(chalk.green(' BMAD-METHOD installed successfully!'));
@@ -901,7 +902,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
901
902
 
902
903
  if (installBmad) {
903
904
  console.log(chalk.cyan('\n Installing BMAD-METHOD...'));
904
- const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id));
905
+ const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id)).map(id => getBmadPlatformCode(id));
905
906
  const success = await bmad.installBmad(['bmm'], bmadTools);
906
907
  if (success) {
907
908
  console.log(chalk.green(' BMAD-METHOD installed successfully!'));
@@ -913,7 +914,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
913
914
  } else {
914
915
  if (yesFlag) {
915
916
  console.log(chalk.cyan('\n Updating BMAD-METHOD...'));
916
- const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id));
917
+ const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id)).map(id => getBmadPlatformCode(id));
917
918
  const success = await bmad.updateBmad(['bmm'], bmadTools);
918
919
  if (success) {
919
920
  console.log(chalk.green(' BMAD-METHOD updated successfully!'));
@@ -930,7 +931,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
930
931
 
931
932
  if (updateBmad) {
932
933
  console.log(chalk.cyan('\n Updating BMAD-METHOD...'));
933
- const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id));
934
+ const bmadTools = selectedAgentIds.filter(id => bmadToolsFilter.includes(id)).map(id => getBmadPlatformCode(id));
934
935
  const success = await bmad.updateBmad(['bmm'], bmadTools);
935
936
  if (success) {
936
937
  console.log(chalk.green(' BMAD-METHOD updated successfully!'));
package/lib/agents.js CHANGED
@@ -81,6 +81,7 @@ const agents = [
81
81
  },
82
82
  fileExtension: '.md',
83
83
  template: 'generic',
84
+ bmadPlatformCode: 'github-copilot',
84
85
  instructionFiles: ['.github/copilot/copilot.md'],
85
86
  injectionStrategy: { position: 'top', skipPatterns: ['---'] }
86
87
  },
@@ -104,6 +105,7 @@ const agents = [
104
105
  },
105
106
  fileExtension: '.md',
106
107
  template: 'generic',
108
+ bmadPlatformCode: 'kilo',
107
109
  instructionFiles: ['.kilocode/kilocode.md'],
108
110
  injectionStrategy: { position: 'top', skipPatterns: ['---'] }
109
111
  },
@@ -155,6 +157,7 @@ const agents = [
155
157
  },
156
158
  fileExtension: '.md',
157
159
  template: 'generic',
160
+ bmadPlatformCode: 'roo',
158
161
  instructionFiles: ['.roo/rules/00-ma-agents.md'],
159
162
  injectionStrategy: { position: 'top', skipPatterns: ['---'] }
160
163
  },
@@ -311,8 +314,20 @@ function getAgentsByCategory(category) {
311
314
  return agents.filter(a => a.category === category);
312
315
  }
313
316
 
317
+ /**
318
+ * Returns the bmad-method platform code for a given ma-agents agent ID.
319
+ * Some agents use a different code in bmad-method's platform-codes.yaml
320
+ * (e.g. ma-agents 'roo-code' → bmad-method 'roo').
321
+ * Falls back to the agent ID itself if no override is defined.
322
+ */
323
+ function getBmadPlatformCode(agentId) {
324
+ const agent = getAgent(agentId);
325
+ return (agent && agent.bmadPlatformCode) ? agent.bmadPlatformCode : agentId;
326
+ }
327
+
314
328
  module.exports = {
315
329
  getAgent,
316
330
  getAllAgents,
317
- getAgentsByCategory
331
+ getAgentsByCategory,
332
+ getBmadPlatformCode
318
333
  };
@@ -29,26 +29,9 @@ ma-skills,4-implementation,Vault Secrets,cyber-vault-secrets,,skill:cyber-vault-
29
29
  ma-skills,4-implementation,Verify Docker Users,cyber-verify-docker-users,,skill:cyber-verify-docker-users,bmad-cyber-verify-docker-users,false,bmm-cyber,,"Verify Docker image user configurations and hardening compliance.",output_folder,"verification report",
30
30
  ma-skills,4-implementation,Verify Image Signature,cyber-verify-image-signature,,skill:cyber-verify-image-signature,bmad-cyber-verify-image-signature,false,bmm-cyber,,"Verify Docker image signatures for supply chain integrity.",output_folder,"verification report",
31
31
  ma-skills,4-implementation,Vulnerability Scan,cyber-vulnerability-scan,,skill:cyber-vulnerability-scan,bmad-cyber-vulnerability-scan,false,bmm-cyber,,"Orchestrate vulnerability scanning across project components.",output_folder,"scan report",
32
- ma-skills,4-implementation,Create Bug Story,create-bug-story,,skill:create-bug-story,create-bug-story,false,bmm-dev,,"Create a structured bug story with severity and type classification, add to backlog.yaml.",_bmad-output/implementation-artifacts,"bug story",
33
- ma-skills,4-implementation,Add Sprint,add-sprint,,skill:add-sprint,add-sprint,false,bmm-sm,,"Create a new sprint entity with capacity limits and optional ISO dates (YAML schema).",_bmad-output/implementation-artifacts/sprints,"sprint entity",
32
+ ma-skills,4-implementation,Create Bug Story,create-bug-story,,skill:create-bug-story,create-bug-story,false,bmm-dev,,"Create a structured bug story from a detected defect and add to backlog.",_bmad-output/implementation-artifacts,"bug story",
33
+ ma-skills,4-implementation,Add Sprint,add-sprint,,skill:add-sprint,add-sprint,false,bmm-sm,,"Create a new sprint with capacity limits and optional start/end context.",_bmad-output/implementation-artifacts,"sprint plan",
34
34
  ma-skills,4-implementation,Modify Sprint,modify-sprint,,skill:modify-sprint,modify-sprint,false,bmm-sm,,"Modify existing sprint — add/remove items, change capacity, update metadata.",_bmad-output/implementation-artifacts,"sprint plan",
35
- ma-skills,4-implementation,Add to Sprint,add-to-sprint,,skill:add-to-sprint,add-to-sprint,false,bmm-sm,,"Assign backlog items to a sprint from flat prioritized backlog.",_bmad-output/implementation-artifacts,"sprint plan",
35
+ ma-skills,4-implementation,Add to Sprint,add-to-sprint,,skill:add-to-sprint,add-to-sprint,false,bmm-sm,,"Assign backlog items (stories + bugs) to a sprint using multi-criteria prioritization.",_bmad-output/implementation-artifacts,"sprint plan",
36
36
  ma-skills,4-implementation,Project Context Expansion,project-context-expansion,,skill:project-context-expansion,project-context-expansion,false,bmm-sm,,"Post-retrospective companion to update project-context.md with new rules.",_bmad-output,"project context",
37
- ma-skills,4-implementation,Sprint Status View,sprint-status-view,,skill:sprint-status-view,sprint-status-view,false,bmm-sm,,"View sprint status with capacity, items, and backlog. Regenerates sprint-status.yaml.",_bmad-output/implementation-artifacts,"status display",
38
- ma-skills,4-implementation,Generate Backlog,generate-backlog,,skill:generate-backlog,generate-backlog,false,bmm-sm,,"Generate or refresh flat backlog from epics and bug stories.",_bmad-output/implementation-artifacts,"backlog",
39
- ma-skills,4-implementation,Remove from Sprint,remove-from-sprint,,skill:remove-from-sprint,remove-from-sprint,false,bmm-sm,,"Remove items from a sprint and return to unassigned backlog.",_bmad-output/implementation-artifacts,"sprint plan",
40
- ma-skills,4-implementation,Cleanup Done,cleanup-done,,skill:cleanup-done,cleanup-done,false,bmm-sm,,"Archive done items — move files to done/ and remove from sprint/backlog.",_bmad-output/implementation-artifacts,"archived items",
41
- ma-skills,4-implementation,Prioritize Backlog,prioritize-backlog,,skill:prioritize-backlog,prioritize-backlog,false,bmm-sm,,"Reprioritize backlog using multiple criteria — severity, value, dependencies.",_bmad-output/implementation-artifacts,"backlog",
42
- ma-skills,anytime,ML Agent (Demerzel),bmad-ma-agent-ml,,skill:bmad-ma-agent-ml,bmad-ma-agent-ml,false,bmm-demerzel,,"Machine Learning Scientist specializing in falsifiable hypothesis validation and failure-cost analysis.",output_folder,"agent customization",
43
- ma-skills,1-research,ML Ideation & PRD,ml-ideation,,skill:ml-ideation,ml-ideation,false,bmm-demerzel,,"Frame ML research problem, define requirements, and produce Research Thesis and PRD.",_bmad-output/planning-artifacts,"ML documents",
44
- ma-skills,1-research,ML EDA & Research,ml-eda,,skill:ml-eda,ml-eda,false,bmm-demerzel,,"Perform exploratory data analysis, establish baselines, and produce EDA report.",_bmad-output/planning-artifacts,"EDA report",
45
- ma-skills,1-research,ML Architecture Design,ml-architecture,,skill:ml-architecture,ml-architecture,false,bmm-demerzel,,"Design model architecture, stack, and experiment tracking strategy.",_bmad-output/planning-artifacts,"arch design",
46
- ma-skills,4-implementation,ML Detailed Design,ml-detailed-design,,skill:ml-detailed-design,ml-detailed-design,false,bmm-demerzel,,"Break down infrastructure and experiment tasks from architecture.",_bmad-output/planning-artifacts,"task breakdown",
47
- ma-skills,4-implementation,ML TechSpec (Contract),ml-techspec,,skill:ml-techspec,ml-techspec,false,bmm-demerzel,,"Lock experiment parameters and performance tiers before training.",_bmad-output/planning-artifacts,"techspec contract",
48
- ma-skills,4-implementation,ML Infra & Sync,ml-infra,,skill:ml-infra,ml-infra,false,bmm-demerzel,,"Build ML infrastructure, manage dependencies, and run smoke tests.",_bmad-output/implementation-artifacts,"infra status",
49
- ma-skills,4-implementation,ML Experiment,ml-experiment,,skill:ml-experiment,ml-experiment,false,bmm-demerzel,,"Execute training experiments against locked TechSpec and log metrics.",_bmad-output/implementation-artifacts,"experiments log",
50
- ma-skills,4-implementation,ML Results Analysis,ml-analysis,,skill:ml-analysis,ml-analysis,false,bmm-demerzel,,"Evaluate experiment outcomes against TechSpec success tiers.",_bmad-output/implementation-artifacts,"analysis report",
51
- ma-skills,4-implementation,ML HPO (Tuning),ml-hparam,,skill:ml-hparam,ml-hparam,false,bmm-demerzel,,"Perform automated hyperparameter optimization (conditional).",_bmad-output/implementation-artifacts,"tuning results",
52
- ma-skills,4-implementation,ML Iterative Revision,ml-revision,,skill:ml-revision,ml-revision,false,bmm-demerzel,,"Amend hypothesis and requirements based on experiment findings.",_bmad-output/planning-artifacts,"amended docs",
53
- ma-skills,anytime,ML Advise & Search,ml-advise,,skill:ml-advise,ml-advise,false,bmm-demerzel,,"Search past experiments and surface findings or failure warnings.",_bmad-output,"findings report",
54
- ma-skills,anytime,ML Retrospective,ml-retrospective,,skill:ml-retrospective,ml-retrospective,false,bmm-demerzel,,"Capture session learnings and update project context.",_bmad-output,"session learnings",
37
+ ma-skills,4-implementation,Sprint Status View,sprint-status-view,,skill:sprint-status-view,sprint-status-view,false,bmm-sm,,"View sprint progress with assigned items and remaining capacity.",_bmad-output/implementation-artifacts,"status display",