convoke-agents 3.1.0 → 3.2.1
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/CHANGELOG.md +31 -0
- package/README.md +37 -10
- package/_bmad/bme/_artifacts/config.yaml +15 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/SKILL.md +6 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/steps/step-01-scope.md +138 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/steps/step-02-dryrun.md +199 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/steps/step-03-resolve.md +174 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/steps/step-04-execute.md +213 -0
- package/_bmad/bme/_artifacts/workflows/bmad-migrate-artifacts/workflow.md +85 -0
- package/_bmad/bme/_artifacts/workflows/bmad-portfolio-status/SKILL.md +6 -0
- package/_bmad/bme/_artifacts/workflows/bmad-portfolio-status/steps/step-01-scan.md +131 -0
- package/_bmad/bme/_artifacts/workflows/bmad-portfolio-status/steps/step-02-explore.md +131 -0
- package/_bmad/bme/_artifacts/workflows/bmad-portfolio-status/steps/step-03-recommend.md +149 -0
- package/_bmad/bme/_artifacts/workflows/bmad-portfolio-status/workflow.md +78 -0
- package/_bmad/bme/_portability/skills/bmad-export-skill/SKILL.md +6 -0
- package/_bmad/bme/_portability/skills/bmad-export-skill/workflow.md +74 -0
- package/_bmad/bme/_portability/skills/bmad-generate-catalog/SKILL.md +6 -0
- package/_bmad/bme/_portability/skills/bmad-generate-catalog/workflow.md +42 -0
- package/_bmad/bme/_portability/skills/bmad-seed-catalog/SKILL.md +6 -0
- package/_bmad/bme/_portability/skills/bmad-seed-catalog/workflow.md +61 -0
- package/_bmad/bme/_portability/skills/bmad-validate-exports/SKILL.md +6 -0
- package/_bmad/bme/_portability/skills/bmad-validate-exports/workflow.md +43 -0
- package/_bmad/bme/_team-factory/agents/team-factory.md +128 -0
- package/_bmad/bme/_team-factory/config.yaml +13 -0
- package/_bmad/bme/_team-factory/lib/cascade-logic.js +184 -0
- package/_bmad/bme/_team-factory/lib/collision-detector.js +228 -0
- package/_bmad/bme/_team-factory/lib/manifest-tracker.js +214 -0
- package/_bmad/bme/_team-factory/lib/spec-differ.js +176 -0
- package/_bmad/bme/_team-factory/lib/spec-parser.js +201 -0
- package/_bmad/bme/_team-factory/lib/spec-writer.js +128 -0
- package/_bmad/bme/_team-factory/lib/types/factory-types.js +193 -0
- package/_bmad/bme/_team-factory/lib/utils/csv-utils.js +62 -0
- package/_bmad/bme/_team-factory/lib/utils/naming-utils.js +45 -0
- package/_bmad/bme/_team-factory/lib/validators/end-to-end-validator.js +898 -0
- package/_bmad/bme/_team-factory/lib/writers/activation-validator.js +175 -0
- package/_bmad/bme/_team-factory/lib/writers/config-appender.js +192 -0
- package/_bmad/bme/_team-factory/lib/writers/config-creator.js +215 -0
- package/_bmad/bme/_team-factory/lib/writers/csv-appender.js +118 -0
- package/_bmad/bme/_team-factory/lib/writers/csv-creator.js +190 -0
- package/_bmad/bme/_team-factory/lib/writers/registry-appender.js +372 -0
- package/_bmad/bme/_team-factory/lib/writers/registry-writer.js +409 -0
- package/_bmad/bme/_team-factory/module-help.csv +3 -0
- package/_bmad/bme/_team-factory/schemas/schema-independent.json +147 -0
- package/_bmad/bme/_team-factory/schemas/schema-sequential.json +242 -0
- package/_bmad/bme/_team-factory/templates/team-spec-template.yaml +86 -0
- package/_bmad/bme/_team-factory/workflows/add-team/step-01-scope.md +105 -0
- package/_bmad/bme/_team-factory/workflows/add-team/step-02-connect.md +110 -0
- package/_bmad/bme/_team-factory/workflows/add-team/step-03-review.md +116 -0
- package/_bmad/bme/_team-factory/workflows/add-team/step-04-generate.md +160 -0
- package/_bmad/bme/_team-factory/workflows/add-team/step-05-validate.md +146 -0
- package/_bmad/bme/_team-factory/workflows/step-00-route.md +76 -0
- package/_bmad/bme/_vortex/config.yaml +4 -4
- package/package.json +13 -7
- package/scripts/convoke-doctor.js +172 -1
- package/scripts/install-gyre-agents.js +0 -0
- package/scripts/lib/artifact-utils.js +521 -13
- package/scripts/lib/portfolio/portfolio-engine.js +301 -34
- package/scripts/lib/portfolio/rules/artifact-chain-rule.js +33 -3
- package/scripts/lib/portfolio/rules/conflict-resolver.js +22 -0
- package/scripts/migrate-artifacts.js +69 -10
- package/scripts/portability/catalog-generator.js +353 -0
- package/scripts/portability/classify-skills.js +646 -0
- package/scripts/portability/convoke-export.js +522 -0
- package/scripts/portability/export-engine.js +1156 -0
- package/scripts/portability/generate-adapters.js +79 -0
- package/scripts/portability/manifest-csv.js +147 -0
- package/scripts/portability/seed-catalog-repo.js +427 -0
- package/scripts/portability/templates/canonical-example.md +102 -0
- package/scripts/portability/templates/canonical-format.md +218 -0
- package/scripts/portability/templates/readme-template.md +72 -0
- package/scripts/portability/test-constants.js +42 -0
- package/scripts/portability/validate-classification.js +529 -0
- package/scripts/portability/validate-exports.js +348 -0
- package/scripts/update/lib/agent-registry.js +35 -0
- package/scripts/update/lib/config-merger.js +140 -10
- package/scripts/update/lib/refresh-installation.js +293 -8
- package/scripts/update/lib/utils.js +27 -1
- package/scripts/update/lib/validator.js +114 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* RFC 4180-aware CSV row parser for team factory validation.
|
|
5
|
+
* Handles quoted fields containing commas and escaped quotes ("").
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Parse a single CSV row into an array of field values.
|
|
10
|
+
* Handles double-quoted fields per RFC 4180:
|
|
11
|
+
* - Fields containing commas, quotes, or newlines are enclosed in double quotes
|
|
12
|
+
* - Double quotes inside quoted fields are escaped as ""
|
|
13
|
+
*
|
|
14
|
+
* @param {string} line - A single CSV row string
|
|
15
|
+
* @returns {string[]} Array of field values
|
|
16
|
+
*/
|
|
17
|
+
function parseCsvRow(line) {
|
|
18
|
+
const fields = [];
|
|
19
|
+
let current = '';
|
|
20
|
+
let inQuotes = false;
|
|
21
|
+
let i = 0;
|
|
22
|
+
|
|
23
|
+
while (i < line.length) {
|
|
24
|
+
const ch = line[i];
|
|
25
|
+
|
|
26
|
+
if (inQuotes) {
|
|
27
|
+
if (ch === '"') {
|
|
28
|
+
// Check for escaped quote ""
|
|
29
|
+
if (i + 1 < line.length && line[i + 1] === '"') {
|
|
30
|
+
current += '"';
|
|
31
|
+
i += 2;
|
|
32
|
+
} else {
|
|
33
|
+
// End of quoted field
|
|
34
|
+
inQuotes = false;
|
|
35
|
+
i++;
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
current += ch;
|
|
39
|
+
i++;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
if (ch === '"') {
|
|
43
|
+
inQuotes = true;
|
|
44
|
+
i++;
|
|
45
|
+
} else if (ch === ',') {
|
|
46
|
+
fields.push(current);
|
|
47
|
+
current = '';
|
|
48
|
+
i++;
|
|
49
|
+
} else {
|
|
50
|
+
current += ch;
|
|
51
|
+
i++;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Push the last field
|
|
57
|
+
fields.push(current);
|
|
58
|
+
|
|
59
|
+
return fields;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = { parseCsvRow };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared naming utilities for team factory modules.
|
|
5
|
+
* Canonical source for toKebab() and deriveWorkflowName() — no duplication.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Convert a string to kebab-case.
|
|
10
|
+
* @param {string} str
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
function toKebab(str) {
|
|
14
|
+
if (!str) return '';
|
|
15
|
+
return str
|
|
16
|
+
.toLowerCase()
|
|
17
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
18
|
+
.replace(/^-+|-+$/g, '');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Derive a workflow name for a single agent from spec data.
|
|
23
|
+
* Uses workflow_names map if present, otherwise derives from first capability.
|
|
24
|
+
* Falls back to role > agent.id when capabilities are absent.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} agent - Agent spec object with id, role, capabilities
|
|
27
|
+
* @param {Object} [specData] - Full spec data (checked for workflow_names map)
|
|
28
|
+
* @returns {string} kebab-case workflow name
|
|
29
|
+
*/
|
|
30
|
+
function deriveWorkflowName(agent, specData) {
|
|
31
|
+
if (specData && specData.workflow_names && specData.workflow_names[agent.id]) {
|
|
32
|
+
return specData.workflow_names[agent.id];
|
|
33
|
+
}
|
|
34
|
+
if (agent.capabilities && agent.capabilities.length > 0) {
|
|
35
|
+
const cap = agent.capabilities[0];
|
|
36
|
+
const wordCount = cap.trim().split(/\s+/).length;
|
|
37
|
+
if (wordCount > 4 && agent.role) {
|
|
38
|
+
return toKebab(agent.role);
|
|
39
|
+
}
|
|
40
|
+
return toKebab(cap);
|
|
41
|
+
}
|
|
42
|
+
return toKebab(agent.role || agent.id);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = { toKebab, deriveWorkflowName };
|