ma-agents 3.9.0 → 3.11.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/README.md +9 -0
- package/bin/cli.js +36 -36
- package/lib/bmad-cache/cache-manifest.json +8 -8
- package/lib/bmad-cache/cis/_git_preserved/index +0 -0
- package/lib/bmad-cache/cis/_git_preserved/logs/HEAD +1 -1
- package/lib/bmad-cache/cis/_git_preserved/logs/refs/heads/main +1 -1
- package/lib/bmad-cache/cis/_git_preserved/logs/refs/remotes/origin/HEAD +1 -1
- package/lib/bmad-cache/cis/_git_preserved/objects/pack/pack-42ffc048f54e58ce94c6331bc6be97ebbb7936f2.idx +0 -0
- package/lib/bmad-cache/cis/_git_preserved/objects/pack/{pack-cad8ff313ea5db860ddcc7780f03917dcba1da8d.pack → pack-42ffc048f54e58ce94c6331bc6be97ebbb7936f2.pack} +0 -0
- package/lib/bmad-cache/cis/_git_preserved/objects/pack/pack-42ffc048f54e58ce94c6331bc6be97ebbb7936f2.rev +0 -0
- package/lib/bmad-cache/cis/_git_preserved/packed-refs +1 -1
- package/lib/bmad-cache/cis/_git_preserved/refs/heads/main +1 -1
- package/lib/bmad-cache/cis/_git_preserved/shallow +1 -1
- package/lib/bmad-cache/cis/src/module-help.csv +5 -5
- package/lib/bmad-cache/gds/_git_preserved/index +0 -0
- package/lib/bmad-cache/gds/_git_preserved/logs/HEAD +1 -1
- package/lib/bmad-cache/gds/_git_preserved/logs/refs/heads/main +1 -1
- package/lib/bmad-cache/gds/_git_preserved/logs/refs/remotes/origin/HEAD +1 -1
- package/lib/bmad-cache/gds/_git_preserved/objects/pack/pack-9427a146a90c00bb542cba038874bf9671ba4dc0.idx +0 -0
- package/lib/bmad-cache/gds/_git_preserved/objects/pack/{pack-c1322f7c8531a89dc4f3f34c4955d194f286c1e6.pack → pack-9427a146a90c00bb542cba038874bf9671ba4dc0.pack} +0 -0
- package/lib/bmad-cache/gds/_git_preserved/objects/pack/pack-9427a146a90c00bb542cba038874bf9671ba4dc0.rev +0 -0
- package/lib/bmad-cache/gds/_git_preserved/packed-refs +1 -1
- package/lib/bmad-cache/gds/_git_preserved/refs/heads/main +1 -1
- package/lib/bmad-cache/gds/_git_preserved/shallow +1 -1
- package/lib/bmad-cache/gds/src/module-help.csv +34 -34
- package/lib/bmad-cache/tea/.claude-plugin/marketplace.json +1 -1
- package/lib/bmad-cache/tea/.github/workflows/publish.yaml +168 -0
- package/lib/bmad-cache/tea/README.md +67 -57
- package/lib/bmad-cache/tea/_git_preserved/index +0 -0
- package/lib/bmad-cache/tea/_git_preserved/objects/pack/pack-f0df537f2649464ff6c5aee241165eb9c8664227.idx +0 -0
- package/lib/bmad-cache/tea/_git_preserved/objects/pack/{pack-9b16db8eb5022c18cef1f0a27d63b6e0f4bc2b2a.pack → pack-f0df537f2649464ff6c5aee241165eb9c8664227.pack} +0 -0
- package/lib/bmad-cache/tea/_git_preserved/objects/pack/pack-f0df537f2649464ff6c5aee241165eb9c8664227.rev +0 -0
- package/lib/bmad-cache/tea/_git_preserved/packed-refs +1 -1
- package/lib/bmad-cache/tea/_git_preserved/refs/heads/main +1 -1
- package/lib/bmad-cache/tea/_git_preserved/shallow +1 -1
- package/lib/bmad-cache/tea/package-lock.json +2 -2
- package/lib/bmad-cache/tea/package.json +5 -6
- package/lib/bmad-cache/tea/src/agents/bmad-tea/resources/knowledge/contract-testing.md +2 -3
- package/lib/bmad-cache/tea/src/agents/bmad-tea/resources/knowledge/pact-consumer-framework-setup.md +42 -95
- package/lib/bmad-cache/tea/src/agents/bmad-tea/resources/knowledge/pactjs-utils-consumer-helpers.md +5 -6
- package/lib/bmad-cache/tea/src/agents/bmad-tea/resources/knowledge/pactjs-utils-provider-verifier.md +1 -1
- package/lib/bmad-cache/tea/src/agents/bmad-tea/resources/tea-index.csv +1 -1
- package/lib/bmad-cache/tea/src/module-help.csv +9 -9
- package/lib/bmad-extension/.claude-plugin/marketplace.json.template +2 -2
- package/lib/bmad-extension/skills/add-sprint/SKILL.md +1 -1
- package/lib/bmad-extension/skills/add-to-sprint/SKILL.md +1 -1
- package/lib/bmad-extension/skills/bmad-dev-story/workflow.md +1 -1
- package/lib/bmad-extension/skills/bmad-sprint-planning/workflow.md +1 -1
- package/lib/bmad-extension/skills/bmad-sprint-status/workflow.md +1 -1
- package/lib/bmad-extension/skills/cleanup-done/SKILL.md +1 -1
- package/lib/bmad-extension/skills/close-sprint/SKILL.md +1 -1
- package/lib/bmad-extension/skills/generate-backlog/SKILL.md +1 -1
- package/lib/bmad-extension/skills/modify-sprint/SKILL.md +1 -1
- package/lib/bmad-extension/skills/module.yaml +1 -1
- package/lib/bmad-extension/skills/prioritize-backlog/SKILL.md +1 -1
- package/lib/bmad-extension/skills/remove-from-sprint/SKILL.md +1 -1
- package/lib/bmad-extension/skills/sprint-status-view/SKILL.md +1 -1
- package/lib/bmad-extension/workflows/add-sprint/workflow.md +39 -0
- package/lib/bmad-extension/workflows/add-to-sprint/workflow.md +39 -0
- package/lib/bmad-extension/workflows/modify-sprint/workflow.md +39 -0
- package/lib/bmad-extension/workflows/sprint-status-view/workflow.md +39 -0
- package/lib/bmad-extension-plugin/.claude-plugin/marketplace.json +2 -2
- package/lib/bmad-extension-plugin/skills/add-sprint/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/add-to-sprint/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/bmad-dev-story/workflow.md +1 -1
- package/lib/bmad-extension-plugin/skills/bmad-sprint-planning/workflow.md +1 -1
- package/lib/bmad-extension-plugin/skills/bmad-sprint-status/workflow.md +1 -1
- package/lib/bmad-extension-plugin/skills/cleanup-done/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/close-sprint/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/generate-backlog/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/modify-sprint/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/module.yaml +1 -1
- package/lib/bmad-extension-plugin/skills/prioritize-backlog/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/remove-from-sprint/SKILL.md +1 -1
- package/lib/bmad-extension-plugin/skills/sprint-status-view/SKILL.md +1 -1
- package/lib/bmad.js +73 -1
- package/package.json +4 -4
- package/lib/bmad-cache/cis/_git_preserved/objects/pack/pack-cad8ff313ea5db860ddcc7780f03917dcba1da8d.idx +0 -0
- package/lib/bmad-cache/cis/_git_preserved/objects/pack/pack-cad8ff313ea5db860ddcc7780f03917dcba1da8d.rev +0 -0
- package/lib/bmad-cache/gds/_git_preserved/objects/pack/pack-c1322f7c8531a89dc4f3f34c4955d194f286c1e6.idx +0 -0
- package/lib/bmad-cache/gds/_git_preserved/objects/pack/pack-c1322f7c8531a89dc4f3f34c4955d194f286c1e6.rev +0 -0
- package/lib/bmad-cache/tea/.github/workflows/manual-release.yaml +0 -216
- package/lib/bmad-cache/tea/_git_preserved/objects/pack/pack-9b16db8eb5022c18cef1f0a27d63b6e0f4bc2b2a.idx +0 -0
- package/lib/bmad-cache/tea/_git_preserved/objects/pack/pack-9b16db8eb5022c18cef1f0a27d63b6e0f4bc2b2a.rev +0 -0
package/lib/bmad.js
CHANGED
|
@@ -752,6 +752,7 @@ async function installBmad(modules = ['bmm', 'bmb'], tools = [], projectRoot = p
|
|
|
752
752
|
const profile = require('./profile').getProfile(projectRoot);
|
|
753
753
|
await applyOnPremPhasePrefixToDeployedSkills(projectRoot, profile);
|
|
754
754
|
await deployMethodology(projectRoot, force);
|
|
755
|
+
await deployClineWorkflows(projectRoot, tools);
|
|
755
756
|
postStepsSucceeded = true;
|
|
756
757
|
return true;
|
|
757
758
|
} catch (error) {
|
|
@@ -868,6 +869,7 @@ async function runMigration(modules, tools, projectRoot, force, { userName, comm
|
|
|
868
869
|
await applyOnPremPhasePrefixToDeployedSkills(projectRoot, profile);
|
|
869
870
|
|
|
870
871
|
await deployMethodology(projectRoot, force);
|
|
872
|
+
await deployClineWorkflows(projectRoot, tools);
|
|
871
873
|
|
|
872
874
|
// All migration steps succeeded — safe to clean up the stage now.
|
|
873
875
|
// Cleaning up earlier would remove diagnostics if any of steps 3-4 or
|
|
@@ -948,6 +950,7 @@ async function updateBmad(modules = ['bmm', 'bmb'], tools = [], projectRoot = pr
|
|
|
948
950
|
const profile = require('./profile').getProfile(projectRoot);
|
|
949
951
|
await applyOnPremPhasePrefixToDeployedSkills(projectRoot, profile);
|
|
950
952
|
await deployMethodology(projectRoot, force);
|
|
953
|
+
await deployClineWorkflows(projectRoot, tools);
|
|
951
954
|
postStepsSucceeded = true;
|
|
952
955
|
return true;
|
|
953
956
|
} catch (error) {
|
|
@@ -1369,6 +1372,74 @@ async function deployMethodology(projectRoot = process.cwd(), force = false) {
|
|
|
1369
1372
|
console.log(chalk.gray(' Tip: Use /open-presentation to open the slides (install via npx ma-agents install open-presentation)'));
|
|
1370
1373
|
}
|
|
1371
1374
|
|
|
1375
|
+
/**
|
|
1376
|
+
* Generate Cline workflow wrappers for all BMAD skills installed to .cline/skills/.
|
|
1377
|
+
* Creates .clinerules/workflows/<skill-name>.md for each installed skill so they
|
|
1378
|
+
* can be invoked via / commands in Cline chat.
|
|
1379
|
+
* No-op when 'cline' is not in the selected tools list.
|
|
1380
|
+
*/
|
|
1381
|
+
async function deployClineWorkflows(projectRoot, tools = []) {
|
|
1382
|
+
if (!tools.includes('cline')) return;
|
|
1383
|
+
|
|
1384
|
+
const clineSkillsDir = path.join(projectRoot, '.cline', 'skills');
|
|
1385
|
+
if (!(await fs.pathExists(clineSkillsDir))) return;
|
|
1386
|
+
|
|
1387
|
+
const workflowsDir = path.join(projectRoot, '.clinerules', 'workflows');
|
|
1388
|
+
await fs.ensureDir(workflowsDir);
|
|
1389
|
+
|
|
1390
|
+
const entries = await fs.readdir(clineSkillsDir, { withFileTypes: true });
|
|
1391
|
+
const skillDirs = entries.filter(e => e.isDirectory());
|
|
1392
|
+
|
|
1393
|
+
let generated = 0;
|
|
1394
|
+
for (const entry of skillDirs) {
|
|
1395
|
+
const skillName = entry.name;
|
|
1396
|
+
const skillDir = path.join(clineSkillsDir, skillName);
|
|
1397
|
+
const skillMdPath = path.join(skillDir, 'SKILL.md');
|
|
1398
|
+
const workflowMdPath = path.join(skillDir, 'workflow.md');
|
|
1399
|
+
|
|
1400
|
+
if (!(await fs.pathExists(skillMdPath))) continue;
|
|
1401
|
+
|
|
1402
|
+
const skillMdContent = await fs.readFile(skillMdPath, 'utf8');
|
|
1403
|
+
let displayName = skillName.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
|
|
1404
|
+
let description = '';
|
|
1405
|
+
|
|
1406
|
+
const fmMatch = skillMdContent.match(/^---\n([\s\S]*?)\n---/);
|
|
1407
|
+
if (fmMatch) {
|
|
1408
|
+
const fm = fmMatch[1];
|
|
1409
|
+
const nameMatch = fm.match(/^name:\s*(.+)$/m);
|
|
1410
|
+
const descMatch = fm.match(/^description:\s*(.+)$/m);
|
|
1411
|
+
if (nameMatch) displayName = nameMatch[1].trim();
|
|
1412
|
+
if (descMatch) description = descMatch[1].trim().replace(/^['"]|['"]$/g, '');
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
const hasWorkflow = await fs.pathExists(workflowMdPath);
|
|
1416
|
+
const lines = [`# ${displayName}`, ''];
|
|
1417
|
+
if (description) lines.push(description, '');
|
|
1418
|
+
|
|
1419
|
+
if (hasWorkflow) {
|
|
1420
|
+
lines.push(
|
|
1421
|
+
'## Step 1: Read and follow the BMAD skill workflow',
|
|
1422
|
+
`Read the file \`.cline/skills/${skillName}/workflow.md\` and follow all instructions within it exactly.`,
|
|
1423
|
+
''
|
|
1424
|
+
);
|
|
1425
|
+
} else {
|
|
1426
|
+
lines.push(
|
|
1427
|
+
'## Step 1: Read and follow the BMAD skill instructions',
|
|
1428
|
+
`Read the file \`.cline/skills/${skillName}/SKILL.md\`. Ignore the YAML frontmatter block (the \`---\` delimited section at the top of the file). Follow all instructions in the body of that file exactly.`,
|
|
1429
|
+
''
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
await fs.writeFile(path.join(workflowsDir, `${skillName}.md`), lines.join('\n'), 'utf8');
|
|
1434
|
+
generated++;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
if (generated > 0) {
|
|
1438
|
+
console.log(chalk.green(` ✓ Generated ${generated} Cline workflow wrappers in .clinerules/workflows/`));
|
|
1439
|
+
console.log(chalk.gray(' Tip: In Cline, type / to browse and invoke BMAD skills'));
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1372
1443
|
async function prePopulateBmadCache(force = false) {
|
|
1373
1444
|
const cacheSource = path.join(__dirname, 'bmad-cache');
|
|
1374
1445
|
if (!(await fs.pathExists(cacheSource))) {
|
|
@@ -1527,7 +1598,7 @@ function ensureCanonicalConfigLocation(projectRoot) {
|
|
|
1527
1598
|
|
|
1528
1599
|
// ── Migration constants ─────────────────────────────────────────────────────
|
|
1529
1600
|
|
|
1530
|
-
const BMAD_TARGET_VERSION = '6.
|
|
1601
|
+
const BMAD_TARGET_VERSION = '6.6.0';
|
|
1531
1602
|
const BMAD_MIGRATION_THRESHOLD = '6.2.0'; // versions below this need migration
|
|
1532
1603
|
const BACKUP_DIR_NAME = '.backup-pre-migration';
|
|
1533
1604
|
|
|
@@ -2487,6 +2558,7 @@ module.exports = {
|
|
|
2487
2558
|
updateBmad,
|
|
2488
2559
|
prePopulateBmadCache,
|
|
2489
2560
|
deployMethodology,
|
|
2561
|
+
deployClineWorkflows,
|
|
2490
2562
|
// Story 22.7 — canonical config (_bmad/bmm/config.yaml) helpers
|
|
2491
2563
|
readCanonicalBmadConfig,
|
|
2492
2564
|
ensureCanonicalConfigLocation,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ma-agents",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "NPX tool to install skills for AI coding agents (Claude Code, Gemini, Copilot, Kilocode, Cline, Cursor, Roo Code)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "node bin/cli.js",
|
|
11
|
-
"test": "node test/yes-flag.test.js && node test/skill-authoring.test.js && node test/skill-validation.test.js && node test/skill-mandatory.test.js && node test/skill-customize-agent.test.js && node test/create-agent.test.js && node test/generate-project-context.test.js && node test/build-bmad-args.test.js && node test/bmad-version-bump.test.js && node test/extension-module-restructure.test.js && node test/convert-agents-to-skills.test.js && node test/migration.test.js && node test/migration-validation.test.js && node test/story-15-5-workflow-skills.test.js && node test/repo-layout.test.js && node test/config-storage.test.js && node test/cross-repo-validation.test.js && node test/config-lost-on-update.test.js && node test/portable-paths.test.js && node test/cicd-remote-mode.test.js && node test/config-layout.test.js && node test/roo-code-agent.test.js && node test/roo-code-injection.test.js && node test/profile.test.js && node test/instruction-block.test.js && node test/instruction-injection.test.js && node test/agents-md.test.js && node test/onprem-injection.test.js && node test/onprem-layer.test.js && node test/roomodes.test.js && node test/clinerules.test.js && node test/reconfigure.test.js && node test/experimental-warning.test.js && node test/bmad-persona-phase-prefix.test.js && node test/f1a-on-prem-prefix-post-install.test.js && node test/retired-skills-migration.test.js && node test/rename-migration.test.js && node test/uninstall.test.js && node test/offline-recompile.test.js && node test/plugin-manifests.test.js && node test/build-plugin.test.js && node test/config-path-migration.test.js && node test/gitignore-plugin-stage.test.js && node test/customizations-translation.test.js && node test/routing-parity.test.js && node test/bmad-extension.test.js && node test/integration-verification.test.js && node test/agent-scope.test.js && node test/obsolete-tool-dirs.test.js",
|
|
11
|
+
"test": "node test/yes-flag.test.js && node test/skill-authoring.test.js && node test/skill-validation.test.js && node test/skill-mandatory.test.js && node test/skill-customize-agent.test.js && node test/create-agent.test.js && node test/generate-project-context.test.js && node test/build-bmad-args.test.js && node test/bmad-version-bump.test.js && node test/extension-module-restructure.test.js && node test/convert-agents-to-skills.test.js && node test/migration.test.js && node test/migration-validation.test.js && node test/story-15-5-workflow-skills.test.js && node test/repo-layout.test.js && node test/config-storage.test.js && node test/cross-repo-validation.test.js && node test/config-lost-on-update.test.js && node test/portable-paths.test.js && node test/cicd-remote-mode.test.js && node test/config-layout.test.js && node test/roo-code-agent.test.js && node test/roo-code-injection.test.js && node test/profile.test.js && node test/instruction-block.test.js && node test/instruction-injection.test.js && node test/agents-md.test.js && node test/onprem-injection.test.js && node test/onprem-layer.test.js && node test/roomodes.test.js && node test/clinerules.test.js && node test/reconfigure.test.js && node test/experimental-warning.test.js && node test/bmad-persona-phase-prefix.test.js && node test/f1a-on-prem-prefix-post-install.test.js && node test/retired-skills-migration.test.js && node test/rename-migration.test.js && node test/uninstall.test.js && node test/offline-recompile.test.js && node test/plugin-manifests.test.js && node test/build-plugin.test.js && node test/config-path-migration.test.js && node test/gitignore-plugin-stage.test.js && node test/customizations-translation.test.js && node test/routing-parity.test.js && node test/bmad-extension.test.js && node test/integration-verification.test.js && node test/agent-scope.test.js && node test/obsolete-tool-dirs.test.js && node test/bmad-empty-tools-guard.test.js",
|
|
12
12
|
"build:bmad-cache": "node scripts/build-bmad-cache.js",
|
|
13
13
|
"build:plugin": "node scripts/build-plugin.js",
|
|
14
14
|
"prepare": "node scripts/build-plugin.js"
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"author": "",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"bmad-method": "6.
|
|
33
|
-
"prompts": "^2.4.2",
|
|
32
|
+
"bmad-method": "6.6.0",
|
|
34
33
|
"chalk": "^4.1.2",
|
|
35
34
|
"fs-extra": "^11.1.1",
|
|
36
35
|
"js-yaml": "^4.1.1",
|
|
36
|
+
"prompts": "^2.4.2",
|
|
37
37
|
"yaml": "^2.8.2"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
name: Manual Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
version_bump:
|
|
7
|
-
description: Version bump type
|
|
8
|
-
required: true
|
|
9
|
-
default: beta
|
|
10
|
-
type: choice
|
|
11
|
-
options:
|
|
12
|
-
- beta
|
|
13
|
-
- alpha
|
|
14
|
-
- patch
|
|
15
|
-
- minor
|
|
16
|
-
- major
|
|
17
|
-
|
|
18
|
-
permissions:
|
|
19
|
-
contents: write
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
release:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout
|
|
26
|
-
uses: actions/checkout@v4
|
|
27
|
-
with:
|
|
28
|
-
fetch-depth: 0
|
|
29
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
-
|
|
31
|
-
- name: Setup Node.js
|
|
32
|
-
uses: actions/setup-node@v4
|
|
33
|
-
with:
|
|
34
|
-
node-version-file: ".nvmrc"
|
|
35
|
-
cache: npm
|
|
36
|
-
registry-url: "https://registry.npmjs.org"
|
|
37
|
-
|
|
38
|
-
- name: Install dependencies
|
|
39
|
-
run: npm ci
|
|
40
|
-
|
|
41
|
-
- name: Verify npm credentials
|
|
42
|
-
env:
|
|
43
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
44
|
-
run: |
|
|
45
|
-
if [ -z "$NODE_AUTH_TOKEN" ]; then
|
|
46
|
-
echo "NPM_TOKEN secret is not configured." >&2
|
|
47
|
-
exit 1
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
- name: Run tests and validation
|
|
51
|
-
run: npm test
|
|
52
|
-
|
|
53
|
-
- name: Configure Git
|
|
54
|
-
run: |
|
|
55
|
-
git config user.name "github-actions[bot]"
|
|
56
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
57
|
-
|
|
58
|
-
- name: Bump version
|
|
59
|
-
run: |
|
|
60
|
-
case "${{ github.event.inputs.version_bump }}" in
|
|
61
|
-
alpha|beta) npm version prerelease --no-git-tag-version --preid=${{ github.event.inputs.version_bump }} ;;
|
|
62
|
-
*) npm version ${{ github.event.inputs.version_bump }} --no-git-tag-version ;;
|
|
63
|
-
esac
|
|
64
|
-
|
|
65
|
-
- name: Sync marketplace version
|
|
66
|
-
run: |
|
|
67
|
-
node <<'NODE'
|
|
68
|
-
const fs = require('node:fs');
|
|
69
|
-
|
|
70
|
-
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
71
|
-
const marketplacePath = '.claude-plugin/marketplace.json';
|
|
72
|
-
const marketplace = JSON.parse(fs.readFileSync(marketplacePath, 'utf8'));
|
|
73
|
-
const plugin = (marketplace.plugins || []).find((entry) => entry && entry.name === packageJson.name);
|
|
74
|
-
|
|
75
|
-
if (!plugin) {
|
|
76
|
-
throw new Error(`Marketplace entry not found for ${packageJson.name}`);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
plugin.version = packageJson.version;
|
|
80
|
-
fs.writeFileSync(marketplacePath, `${JSON.stringify(marketplace, null, 2)}\n`);
|
|
81
|
-
NODE
|
|
82
|
-
|
|
83
|
-
- name: Validate release metadata
|
|
84
|
-
run: npm run test:release-metadata
|
|
85
|
-
|
|
86
|
-
- name: Get new version and release metadata
|
|
87
|
-
id: version
|
|
88
|
-
run: |
|
|
89
|
-
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
90
|
-
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
91
|
-
echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')" >> $GITHUB_OUTPUT
|
|
92
|
-
case "$NEW_VERSION" in
|
|
93
|
-
*-alpha.*) echo "npm_tag=alpha" >> $GITHUB_OUTPUT ;;
|
|
94
|
-
*-beta.*) echo "npm_tag=beta" >> $GITHUB_OUTPUT ;;
|
|
95
|
-
*) echo "npm_tag=latest" >> $GITHUB_OUTPUT ;;
|
|
96
|
-
esac
|
|
97
|
-
|
|
98
|
-
- name: Commit version bump
|
|
99
|
-
run: |
|
|
100
|
-
git add package.json package-lock.json .claude-plugin/marketplace.json
|
|
101
|
-
git commit -m "release: bump to v${{ steps.version.outputs.new_version }}"
|
|
102
|
-
|
|
103
|
-
- name: Create and push tag
|
|
104
|
-
run: |
|
|
105
|
-
# Check if tag already exists
|
|
106
|
-
if git rev-parse "v${{ steps.version.outputs.new_version }}" >/dev/null 2>&1; then
|
|
107
|
-
echo "Tag v${{ steps.version.outputs.new_version }} already exists, skipping tag creation"
|
|
108
|
-
else
|
|
109
|
-
git tag -a "v${{ steps.version.outputs.new_version }}" -m "Release v${{ steps.version.outputs.new_version }}"
|
|
110
|
-
git push origin "v${{ steps.version.outputs.new_version }}"
|
|
111
|
-
fi
|
|
112
|
-
|
|
113
|
-
- name: Publish to npm
|
|
114
|
-
env:
|
|
115
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
116
|
-
run: |
|
|
117
|
-
if [ "${{ steps.version.outputs.npm_tag }}" = "latest" ]; then
|
|
118
|
-
npm publish
|
|
119
|
-
else
|
|
120
|
-
npm publish --tag "${{ steps.version.outputs.npm_tag }}"
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
- name: Generate release notes
|
|
124
|
-
id: release_notes
|
|
125
|
-
run: |
|
|
126
|
-
# Get commits since last tag (or all commits if no tags exist)
|
|
127
|
-
if [ "${{ steps.version.outputs.previous_tag }}" = "v0.0.0" ]; then
|
|
128
|
-
COMMITS=$(git log --pretty=format:"- %s" --reverse)
|
|
129
|
-
else
|
|
130
|
-
COMMITS=$(git log ${{ steps.version.outputs.previous_tag }}..HEAD --pretty=format:"- %s" --reverse)
|
|
131
|
-
fi
|
|
132
|
-
|
|
133
|
-
# Categorize commits
|
|
134
|
-
FEATURES=$(echo "$COMMITS" | grep -E "^- (feat|Feature)" || true)
|
|
135
|
-
FIXES=$(echo "$COMMITS" | grep -E "^- (fix|Fix)" || true)
|
|
136
|
-
CHORES=$(echo "$COMMITS" | grep -E "^- (chore|Chore)" || true)
|
|
137
|
-
OTHERS=$(echo "$COMMITS" | grep -v -E "^- (feat|Feature|fix|Fix|chore|Chore|release:|Release:)" || true)
|
|
138
|
-
|
|
139
|
-
# Build release notes
|
|
140
|
-
cat > release_notes.md << 'EOF'
|
|
141
|
-
## 🚀 What's New in v${{ steps.version.outputs.new_version }}
|
|
142
|
-
|
|
143
|
-
EOF
|
|
144
|
-
|
|
145
|
-
if [ ! -z "$FEATURES" ]; then
|
|
146
|
-
echo "### ✨ New Features" >> release_notes.md
|
|
147
|
-
echo "$FEATURES" >> release_notes.md
|
|
148
|
-
echo "" >> release_notes.md
|
|
149
|
-
fi
|
|
150
|
-
|
|
151
|
-
if [ ! -z "$FIXES" ]; then
|
|
152
|
-
echo "### 🐛 Bug Fixes" >> release_notes.md
|
|
153
|
-
echo "$FIXES" >> release_notes.md
|
|
154
|
-
echo "" >> release_notes.md
|
|
155
|
-
fi
|
|
156
|
-
|
|
157
|
-
if [ ! -z "$OTHERS" ]; then
|
|
158
|
-
echo "### 📦 Other Changes" >> release_notes.md
|
|
159
|
-
echo "$OTHERS" >> release_notes.md
|
|
160
|
-
echo "" >> release_notes.md
|
|
161
|
-
fi
|
|
162
|
-
|
|
163
|
-
if [ ! -z "$CHORES" ]; then
|
|
164
|
-
echo "### 🔧 Maintenance" >> release_notes.md
|
|
165
|
-
echo "$CHORES" >> release_notes.md
|
|
166
|
-
echo "" >> release_notes.md
|
|
167
|
-
fi
|
|
168
|
-
|
|
169
|
-
cat >> release_notes.md << 'EOF'
|
|
170
|
-
|
|
171
|
-
## 📦 Installation
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
npx bmad-method install
|
|
175
|
-
# Select "Test Architect" from module menu
|
|
176
|
-
```
|
|
177
|
-
EOF
|
|
178
|
-
|
|
179
|
-
# Add changelog link only if there was a previous tag
|
|
180
|
-
if [ "${{ steps.version.outputs.previous_tag }}" != "v0.0.0" ]; then
|
|
181
|
-
echo "" >> release_notes.md
|
|
182
|
-
echo "**Full Changelog**: https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/compare/${{ steps.version.outputs.previous_tag }}...v${{ steps.version.outputs.new_version }}" >> release_notes.md
|
|
183
|
-
fi
|
|
184
|
-
|
|
185
|
-
# Output for GitHub Actions
|
|
186
|
-
echo "RELEASE_NOTES<<EOF" >> $GITHUB_OUTPUT
|
|
187
|
-
cat release_notes.md >> $GITHUB_OUTPUT
|
|
188
|
-
echo "EOF" >> $GITHUB_OUTPUT
|
|
189
|
-
|
|
190
|
-
- name: Push changes to release branch
|
|
191
|
-
run: |
|
|
192
|
-
if git push origin HEAD:${GITHUB_REF_NAME} 2>/dev/null; then
|
|
193
|
-
echo "✅ Successfully pushed to ${GITHUB_REF_NAME} branch"
|
|
194
|
-
else
|
|
195
|
-
echo "⚠️ Could not push to ${GITHUB_REF_NAME} (protected branch). This is expected."
|
|
196
|
-
echo "📝 Version bump and tag were created successfully."
|
|
197
|
-
fi
|
|
198
|
-
|
|
199
|
-
- name: Create GitHub Release
|
|
200
|
-
uses: softprops/action-gh-release@v2
|
|
201
|
-
with:
|
|
202
|
-
tag_name: v${{ steps.version.outputs.new_version }}
|
|
203
|
-
name: "Test Architect v${{ steps.version.outputs.new_version }}"
|
|
204
|
-
body: |
|
|
205
|
-
${{ steps.release_notes.outputs.RELEASE_NOTES }}
|
|
206
|
-
draft: false
|
|
207
|
-
prerelease: ${{ contains(steps.version.outputs.new_version, 'alpha') || contains(steps.version.outputs.new_version, 'beta') }}
|
|
208
|
-
|
|
209
|
-
- name: Summary
|
|
210
|
-
run: |
|
|
211
|
-
echo "## 🎉 Successfully released v${{ steps.version.outputs.new_version }}!" >> $GITHUB_STEP_SUMMARY
|
|
212
|
-
echo "" >> $GITHUB_STEP_SUMMARY
|
|
213
|
-
echo "### 📦 Distribution" >> $GITHUB_STEP_SUMMARY
|
|
214
|
-
echo "- **NPM Package**: https://www.npmjs.com/package/bmad-method-test-architecture-enterprise" >> $GITHUB_STEP_SUMMARY
|
|
215
|
-
echo "- **NPM Dist-tag**: \`${{ steps.version.outputs.npm_tag }}\`" >> $GITHUB_STEP_SUMMARY
|
|
216
|
-
echo "- **GitHub Release**: https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise/releases/tag/v${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
|
|
Binary file
|