ma-agents 2.17.0 → 2.18.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/lib/bmad.js CHANGED
@@ -74,6 +74,7 @@ async function applyCustomizations(projectRoot = process.cwd(), modules = ['bmm'
74
74
  };
75
75
 
76
76
  // 1. Apply YAML customizations (filtered by selected agents)
77
+ // These must be in place BEFORE recompile so BMAD can use them during compilation
77
78
  if (fs.existsSync(sourceDir)) {
78
79
  await fs.ensureDir(configTargetDir);
79
80
  const files = await fs.readdir(sourceDir);
@@ -89,7 +90,8 @@ async function applyCustomizations(projectRoot = process.cwd(), modules = ['bmm'
89
90
  }
90
91
  }
91
92
 
92
- // 2. Apply detailed agent templates (.md files, filtered by selected agents)
93
+ // 2. Apply detailed agent templates to custom dir (.md files, filtered by selected agents)
94
+ // These go to _bmad/custom/agents/ for BMAD's custom agent resolution
93
95
  if (fs.existsSync(sourceDir)) {
94
96
  await fs.ensureDir(agentTargetDir);
95
97
  const files = await fs.readdir(sourceDir);
@@ -104,21 +106,9 @@ async function applyCustomizations(projectRoot = process.cwd(), modules = ['bmm'
104
106
  }
105
107
  }
106
108
 
107
- // 3. Apply workflows
108
- if (fs.existsSync(workflowSourceDir)) {
109
- await fs.ensureDir(workflowTargetDir);
110
- await fs.copy(workflowSourceDir, workflowTargetDir);
111
- console.log(chalk.cyan(` + Applied BMAD workflows`));
112
- }
113
-
114
- // 4. Apply MIL-STD-498 templates
115
- if (fs.existsSync(templateSourceDir)) {
116
- await fs.ensureDir(templateTargetDir);
117
- await fs.copy(templateSourceDir, templateTargetDir);
118
- console.log(chalk.cyan(` + Applied MIL-STD-498 templates`));
119
- }
120
-
121
- // Recompile agents to apply changes
109
+ // Recompile agents to apply YAML customizations
110
+ // IMPORTANT: Steps 3-5 must run AFTER recompile because the recompile regenerates
111
+ // the _bmad/bmm/ tree and would wipe any files placed there beforehand.
122
112
  let command = 'npx bmad-method install --yes';
123
113
  if (modules && modules.length > 0) {
124
114
  command += ` --modules ${modules.join(',')}`;
@@ -135,7 +125,39 @@ async function applyCustomizations(projectRoot = process.cwd(), modules = ['bmm'
135
125
  console.error(chalk.red(` BMAD recompile failed: ${error.message}`));
136
126
  }
137
127
 
138
- // 5. Register custom workflows in BMAD CSV registries (after recompile)
128
+ // 3. Apply workflows (AFTER recompile so they persist)
129
+ if (fs.existsSync(workflowSourceDir)) {
130
+ await fs.ensureDir(workflowTargetDir);
131
+ await fs.copy(workflowSourceDir, workflowTargetDir);
132
+ console.log(chalk.cyan(` + Applied BMAD workflows`));
133
+ }
134
+
135
+ // 4. Apply MIL-STD-498 templates (AFTER recompile so they persist)
136
+ if (fs.existsSync(templateSourceDir)) {
137
+ await fs.ensureDir(templateTargetDir);
138
+ await fs.copy(templateSourceDir, templateTargetDir);
139
+ console.log(chalk.cyan(` + Applied MIL-STD-498 templates`));
140
+ }
141
+
142
+ // 5. Copy agent templates to compiled location (AFTER recompile)
143
+ // BMAD recompile doesn't generate custom agents (mil498, cyber) in _bmad/bmm/agents/.
144
+ // Without this, updateAgentInstructions() creates the file with only the MA-AGENTS block.
145
+ if (fs.existsSync(sourceDir)) {
146
+ const compiledAgentDir = path.join(projectRoot, BMAD_DIR, 'bmm', 'agents');
147
+ await fs.ensureDir(compiledAgentDir);
148
+ const files = await fs.readdir(sourceDir);
149
+ for (const file of files) {
150
+ if (file.endsWith('.md')) {
151
+ const matchingAgentId = Object.entries(agentMdMap).find(([, mdFile]) => mdFile === file)?.[0];
152
+ if (!matchingAgentId || selectedAgentIds.length === 0 || selectedAgentIds.includes(matchingAgentId)) {
153
+ await fs.copy(path.join(sourceDir, file), path.join(compiledAgentDir, file));
154
+ console.log(chalk.cyan(` + Applied compiled agent: ${file}`));
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ // 6. Register custom workflows in BMAD CSV registries (after recompile)
139
161
  if (selectedAgentIds.length === 0 || selectedAgentIds.includes('bmm-mil498')) {
140
162
  await registerMilWorkflows(projectRoot);
141
163
  }
@@ -0,0 +1,163 @@
1
+ # 1. Scope.
2
+
3
+ This section shall be divided into the following paragraphs.
4
+
5
+ ## 1.1 Identification.
6
+
7
+ This paragraph shall contain a full identification of the system and the software to which this document applies, including, as applicable, identification number(s), title(s), abbreviation(s), version number(s), and release number(s).
8
+
9
+ ## 1.2 System overview.
10
+
11
+ This paragraph shall briefly state the purpose of the system and the software to which this document applies. It shall describe the general nature of the system and software; summarize the history of system development, operation, and maintenance; identify the project sponsor, acquirer, user, developer, and support agencies; identify current and planned operating sites; and list other relevant documents.
12
+
13
+ ## 1.3 Document overview.
14
+
15
+ This paragraph shall summarize the purpose and contents of this document and shall describe any security or privacy considerations associated with its use.
16
+
17
+ # 2. Referenced documents.
18
+
19
+ This section shall list the number, title, revision, and date of all documents referenced in this document. This section shall also identify the source for all documents not available through normal Government stocking activities.
20
+
21
+ # 3. CSCI-wide design decisions.
22
+
23
+ This section shall be divided into paragraphs as needed to present CSCI-wide design decisions, that is, decisions about the CSCI's behavioral design (how it will behave, from a user's point of view, in meeting its requirements, ignoring internal implementation) and other decisions affecting the selection and design of the software components (e.g., Computer Software Components (CSCs)) that make up the CSCI. If all such decisions are explicit in the CSCI requirements or are deferred to the design of the CSCI's software components, this section shall so state. Design decisions that respond to requirements designated critical, such as those for safety, security, or privacy, shall be placed in separate subparagraphs. If a design decision depends upon CSCI states or modes, this dependency shall be indicated. Design conventions needed to understand the design shall be presented or referenced. Examples of CSCI-wide design decisions are the following:
24
+
25
+ a. Design decisions regarding inputs the CSCI will accept and outputs it will produce, including interfaces with other systems, HWCIs, CSCIs, and users (4.3.x of this DID identifies topics to be considered in this description). If part or all of this information is given in Interface Design Descriptions (IDDs), they may be referenced.
26
+
27
+ b. Design decisions on CSCI behavior in response to each input or condition, including actions the CSCI will perform, response times and other performance characteristics, description of physical systems modeled, selected equations/algorithms/rules, and handling of unallowed inputs or conditions.
28
+
29
+ c. Design decisions on how databases/data files will appear to the user (4.3.x of this DID identifies topics to be considered in this description). If part or all of this information is given in Database Design Descriptions (DBDDs), they may be referenced.
30
+
31
+ d. Selected approach to meeting safety, security, and privacy requirements.
32
+
33
+ e. Other CSCI-wide design decisions made in response to requirements, such as selected approach to providing required flexibility, availability, and maintainability.
34
+
35
+ # 4. CSCI architectural design.
36
+
37
+ This section shall be divided into the following paragraphs to describe the CSCI architectural design. If part or all of the design depends upon CSCI states or modes, this dependency shall be indicated. If design information falls into more than one paragraph, it may be presented once and referenced from the other paragraphs. Design conventions needed to understand the design shall be presented or referenced.
38
+
39
+ ## 4.1 CSCI components.
40
+
41
+ This paragraph shall:
42
+
43
+ a. Identify the software components of the CSCI (Computer Software Components (CSCs) or other decomposition entities). Each component shall be assigned a project-unique identifier. Note: A database may be treated as a CSC or as part of a CSC.
44
+
45
+ b. Show the static (such as "consists of") relationship(s) of the components. Multiple relationships may be presented, depending on the selected design methodology.
46
+
47
+ c. State the purpose of each component and identify the CSCI requirements and CSCI-wide design decisions allocated to it. (Alternatively, the allocation of requirements may be provided in 6.a.)
48
+
49
+ d. Identify each component's development status/type, if known (such as new development, existing component to be reused as is, existing design to be reused as is, existing design or component to be reengineered, component to be developed for reuse, component planned for Build N, etc.) For existing design or components, the description shall provide identifying information, such as name, version, documentation references, location, etc.
50
+
51
+ e. Describe the resource utilization of the CSCI, that is, the allocation of computer hardware resources (such as processor capacity, memory capacity, input/output device capacity, auxiliary storage capacity, and communications/network equipment capacity) to the CSCI's software components. The description shall state the conditions under which the resource utilization is to be measured.
52
+
53
+ f. Describe the CSCI's program library, that is, the contents (computer files, data files, program files, etc.) and any applicable characteristics of the program library used in developing, testing, and integrating the software components and in generating the executable software.
54
+
55
+ ## 4.2 Concept of execution.
56
+
57
+ This paragraph shall describe the concept of execution among the software components. It shall include diagrams and descriptions showing the dynamic relationship of the components, that is, how they will interact during CSCI operation, including, as applicable, flow of execution control, data flow, dynamically controlled sequencing, state transition diagrams, timing diagrams, priorities among components, handling of interrupts, timing/sequencing relationships, exception handling, concurrent execution, dynamic allocation/deallocation, dynamic creation/deletion of objects, processes, tasks, and other aspects of dynamic behavior.
58
+
59
+ ## 4.3 Interface design.
60
+
61
+ This paragraph shall be divided into the following subparagraphs to describe the interface characteristics of the CSCI's software components. It shall include both interfaces among the components and their interfaces with external entities such as other systems, HWCIs, CSCIs, and users. Note: There is no requirement for these interfaces to be completely designed at this level; this paragraph is provided to allow the recording of interface design decisions made as part of CSCI architectural design. If part or all of this information is contained in Interface Design Descriptions (IDDs) or elsewhere, these sources may be referenced.
62
+
63
+ ### 4.3.1 Interface identification and diagrams.
64
+
65
+ This paragraph shall state the project-unique identifier assigned to each interface and shall identify the interfacing entities (systems, configuration items, users, etc.) by name, number, version, and documentation references, as applicable. The identification shall state which entities have fixed interface characteristics (and therefore impose interface requirements on interfacing entities) and which are being developed or modified (thus having interface requirements imposed on them). One or more interface diagrams shall be provided, as appropriate, to depict the interfaces.
66
+
67
+ ### 4.3.x (Project-unique identifier of interface).
68
+
69
+ This paragraph (beginning with 4.3.2) shall identify an interface by project-unique identifier, shall briefly identify the interfacing entities, and shall be divided into subparagraphs as needed to describe the interface characteristics of one or both of the interfacing entities. If a given interfacing entity is not covered by this SDD (for example, an external system) but its interface characteristics need to be mentioned to describe interfacing entities that are, these characteristics shall be stated as assumptions or as "When [the entity not covered] does this, [the entity that is covered] will ...." This paragraph may reference other documents (such as data dictionaries, standards for protocols, and standards for user interfaces) in place of stating the information here. The design description shall include the following, as applicable, presented in any order suited to the information to be provided, and shall note any differences in these characteristics from the point of view of the interfacing entities (such as different expectations about the size, frequency, or other characteristics of data elements):
70
+
71
+ a. Priority assigned to the interface by the interfacing entity(ies)
72
+
73
+ b. Type of interface (such as real-time data transfer, storage-and-retrieval of data, etc.) to be implemented
74
+
75
+ c. Characteristics of individual data elements that the interfacing entity(ies) will provide, store, send, access, receive, etc., such as:
76
+
77
+ 1. Names/identifiers
78
+ a. Project-unique identifier
79
+ b. Non-technical (natural-language) name
80
+ c. DoD standard data element name
81
+ d. Technical name (e.g., variable or field name in code or database)
82
+ e. Abbreviation or synonymous names
83
+ 2. Data type (alphanumeric, integer, etc.)
84
+ 3. Size and format (such as length and punctuation of a character string)
85
+ 4. Units of measurement (such as meters, dollars, nanoseconds)
86
+ 5. Range or enumeration of possible values (such as 0-99)
87
+ 6. Accuracy (how correct) and precision (number of significant digits)
88
+ 7. Priority, timing, frequency, volume, sequencing, and other constraints, such as whether the data element may be updated and whether business rules apply
89
+ 8. Security and privacy constraints
90
+ 9. Sources (setting/sending entities) and recipients (using/receiving entities)
91
+
92
+ d. Characteristics of data element assemblies (records, messages, files, arrays, displays, reports, etc.) that the interfacing entity(ies) will provide, store, send, access, receive, etc., such as:
93
+
94
+ 1. Names/identifiers
95
+ a. Project-unique identifier to be used for traceability
96
+ b. Non-technical (natural language) name
97
+ c. Technical name (e.g., record or data structure name in code or database)
98
+ d. Abbreviations or synonymous names
99
+ 2. Data elements in the assembly and their structure (number, order, grouping)
100
+ 3. Medium (such as disk) and structure of data elements/assemblies on the medium
101
+ 4. Visual and auditory characteristics of displays and other outputs (such as colors, layouts, fonts, icons and other display elements, beeps, lights)
102
+ 5. Relationships among assemblies, such as sorting/access characteristics
103
+ 6. Priority, timing, frequency, volume, sequencing, and other constraints, such as whether the assembly may be updated and whether business rules apply
104
+ 7. Security and privacy constraints
105
+ 8. Sources (setting/sending entities) and recipients (using/receiving entities)
106
+
107
+ e. Characteristics of communication methods that the interfacing entity(ies) will use for the interface, such as:
108
+
109
+ 1. Project-unique identifier(s)
110
+ 2. Communication links/bands/frequencies/media and their characteristics
111
+ 3. Message formatting
112
+ 4. Flow control (such as sequence numbering and buffer allocation)
113
+ 5. Data transfer rate, whether periodic/aperiodic, and interval between transfers
114
+ 6. Routing, addressing, and naming conventions
115
+ 7. Transmission services, including priority and grade
116
+ 8. Safety/security/privacy considerations, such as encryption, user authentication, compartmentalization, and auditing
117
+
118
+ f. Characteristics of protocols that the interfacing entity(ies) will use for the interface, such as:
119
+
120
+ 1. Project-unique identifier(s)
121
+ 2. Priority/layer of the protocol
122
+ 3. Packeting, including fragmentation and reassembly, routing, and addressing
123
+ 4. Legality checks, error control, and recovery procedures
124
+ 5. Synchronization, including connection establishment, maintenance, termination
125
+ 6. Status, identification, and any other reporting features
126
+
127
+ g. Other characteristics, such as physical compatibility of the interfacing entity(ies) (dimensions, tolerances, loads, voltages, plug compatibility, etc.)
128
+
129
+ # 5. CSCI detailed design.
130
+
131
+ This section shall be divided into the following paragraphs to describe each software component of the CSCI. If part or all of the design depends upon CSCI states or modes, this dependency shall be indicated. If design information falls into more than one paragraph, it may be presented once and referenced from the other paragraphs. Design conventions needed to understand the design shall be presented or referenced.
132
+
133
+ ## 5.x (Project-unique identifier of a software component, or designator for a group of software components).
134
+
135
+ This paragraph shall identify a software component by project-unique identifier, state its purpose, and describe its design. If a software component contains other components, this paragraph shall identify them and describe the static (such as "consists of") relationships among them. The design of each software component shall describe, as applicable:
136
+
137
+ a. The unit design decisions, including the algorithms to be used, the basis for the decisions (such as requirements, CSCI-wide design decisions, design conventions, etc.), and the alternatives considered and rejected, with rationale.
138
+
139
+ b. Any constraints, limitations, or unusual features in the design of the software component.
140
+
141
+ c. The programming language to be used and rationale for its use if other than the specified CSCI language.
142
+
143
+ d. If the design is not expressed in a programming language, the procedure commands, design notations, or other means used to describe the design; for example, flowcharts, pseudocode, decision tables, or a combination of these.
144
+
145
+ e. If the software component contains a database, data elements, record layouts, and file structures (such as files, data structures, objects, and tables) to be used in the design, along with their relationships.
146
+
147
+ f. If the software component contains or is affected by constraints, describe any restrictions or limitations on the software component (such as restrictions or limitations on hardware requirements, accuracy, speed, frequency, or reliability).
148
+
149
+ # 6. Requirements traceability.
150
+
151
+ This paragraph shall contain:
152
+
153
+ a. Traceability from each software component identified in this SDD to the CSCI requirements allocated to it. (Alternatively, this traceability may be provided in 4.1.)
154
+
155
+ b. Traceability from each CSCI requirement to the software components to which it is allocated.
156
+
157
+ # 7. Notes.
158
+
159
+ This section shall contain any general information that aids in understanding this document (e.g., background information, glossary, rationale). This section shall contain an alphabetical listing of all acronyms, abbreviations, and their meanings as used in this document and a list of any terms and definitions needed to understand this document.
160
+
161
+ # A. Appendixes.
162
+
163
+ Appendixes may be used to provide information published separately for convenience in document maintenance (e.g., charts, classified data). As applicable, each appendix shall be referenced in the main body of the document where the data would normally have been provided. Appendixes may be bound as separate documents for ease in handling. Appendixes shall be lettered alphabetically (A, B, etc.).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-agents",
3
- "version": "2.17.0",
3
+ "version": "2.18.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": {