ma-agents 3.13.2 → 3.14.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.
Files changed (70) hide show
  1. package/lib/agents.js +7 -0
  2. package/lib/bmad-cache/bmb/.claude-plugin/marketplace.json +3 -3
  3. package/lib/bmad-cache/bmb/_git_preserved/index +0 -0
  4. package/lib/bmad-cache/bmb/_git_preserved/objects/pack/pack-b388526edf307cf56f8e65673466cff074105abf.idx +0 -0
  5. package/lib/bmad-cache/bmb/_git_preserved/objects/pack/{pack-8f8b045fef5af6911495cf3b2a89f1ed75e120f7.pack → pack-b388526edf307cf56f8e65673466cff074105abf.pack} +0 -0
  6. package/lib/bmad-cache/bmb/_git_preserved/objects/pack/pack-b388526edf307cf56f8e65673466cff074105abf.rev +0 -0
  7. package/lib/bmad-cache/bmb/_git_preserved/packed-refs +1 -1
  8. package/lib/bmad-cache/bmb/_git_preserved/refs/heads/main +1 -1
  9. package/lib/bmad-cache/bmb/_git_preserved/shallow +1 -1
  10. package/lib/bmad-cache/bmb/package-lock.json +2 -2
  11. package/lib/bmad-cache/bmb/package.json +1 -1
  12. package/lib/bmad-cache/bmb/samples/bmad-agent-code-coach/scripts/wake.py +78 -0
  13. package/lib/bmad-cache/bmb/samples/bmad-agent-creative-muse/scripts/wake.py +78 -0
  14. package/lib/bmad-cache/bmb/samples/bmad-agent-sentinel/scripts/wake.py +78 -0
  15. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/assets/customize-template.toml +3 -0
  16. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/assets/init-sanctum-template.py +11 -5
  17. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/assets/report-shell.html +1073 -0
  18. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/assets/wake-template.py +78 -0
  19. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/customize.toml +48 -0
  20. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/count_tokens.py +78 -0
  21. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/prepass.py +258 -0
  22. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/process-template.py +20 -0
  23. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/render_report.py +387 -0
  24. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/assets/adapter-claude-code.json +9 -0
  25. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/aggregate_benchmark.py +236 -0
  26. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/memlog.py +197 -0
  27. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/run_evals.py +513 -390
  28. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/run_triggers.py +347 -251
  29. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/tests/test_env_isolation.py +79 -0
  30. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/tests/test_trigger_detection.py +123 -0
  31. package/lib/bmad-cache/bmb/skills/bmad-module-builder/scripts/tests/test-validate-module.py +82 -4
  32. package/lib/bmad-cache/bmb/skills/bmad-module-builder/scripts/validate-module.py +55 -11
  33. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/assets/customize-template.toml +3 -5
  34. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/assets/report-shell.html +860 -0
  35. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/customize.toml +59 -0
  36. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/count_tokens.py +77 -0
  37. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/init_skill.py +132 -0
  38. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/prepass-prompt-metrics.py +186 -221
  39. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/quick_validate.py +117 -0
  40. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/render_report.py +387 -0
  41. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/tests/test_canon_sync.py +46 -0
  42. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/tests/test_count_tokens.py +180 -0
  43. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/tests/test_render_report.py +171 -0
  44. package/lib/bmad-cache/cache-manifest.json +4 -4
  45. package/lib/bmad-extension/.claude-plugin/marketplace.json.template +1 -1
  46. package/lib/bmad-extension-plugin/.claude-plugin/marketplace.json +2 -2
  47. package/lib/bmad.js +6 -1
  48. package/lib/templates/instruction-block-git.template.md +25 -25
  49. package/lib/templates/instruction-block-onprem.template.md +86 -86
  50. package/lib/templates/instruction-block-universal.template.md +29 -29
  51. package/package.json +3 -3
  52. package/lib/.bmad-extension-plugin.build-22612-1782454014750/.claude-plugin/marketplace.json +0 -109
  53. package/lib/.bmad-extension-plugin.build-22612-1782454014750/skills/module-help.csv +0 -62
  54. package/lib/.bmad-extension-plugin.build-22612-1782454014750/skills/module.yaml +0 -20
  55. package/lib/bmad-cache/bmb/_git_preserved/objects/pack/pack-8f8b045fef5af6911495cf3b2a89f1ed75e120f7.idx +0 -0
  56. package/lib/bmad-cache/bmb/_git_preserved/objects/pack/pack-8f8b045fef5af6911495cf3b2a89f1ed75e120f7.rev +0 -0
  57. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/references/sample-init-sanctum.py +0 -274
  58. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/generate-html-report.py +0 -534
  59. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/prepass-execution-deps.py +0 -337
  60. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/prepass-prompt-metrics.py +0 -425
  61. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/prepass-sanctum-architecture.py +0 -385
  62. package/lib/bmad-cache/bmb/skills/bmad-agent-builder/scripts/prepass-structure-capabilities.py +0 -482
  63. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/assets/Dockerfile +0 -29
  64. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/docker_setup.py +0 -115
  65. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/generate_report.py +0 -184
  66. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/pty_runner.py +0 -171
  67. package/lib/bmad-cache/bmb/skills/bmad-eval-runner/scripts/utils.py +0 -260
  68. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/extract-report-json.py +0 -287
  69. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/generate-html-report.py +0 -588
  70. package/lib/bmad-cache/bmb/skills/bmad-workflow-builder/scripts/prepass-execution-deps.py +0 -288
@@ -0,0 +1,171 @@
1
+ #!/usr/bin/env python3
2
+ """Tests for scripts/render_report.py — the deterministic report renderer.
3
+
4
+ Covers: valid island injection, refusal on malformed JSON, refusal on the
5
+ placeholder subject, the --md archival rendering, and that both shipped
6
+ shells carry a parseable placeholder island.
7
+ Run with: python3 -m pytest test_render_report.py
8
+ (or plain `python3 test_render_report.py` for a lightweight self-check).
9
+ """
10
+ import json
11
+ import re
12
+ import subprocess
13
+ import sys
14
+ import tempfile
15
+ from pathlib import Path
16
+
17
+ SKILLS_DIR = Path(__file__).resolve().parents[3]
18
+ SCRIPT = SKILLS_DIR / "bmad-workflow-builder" / "scripts" / "render_report.py"
19
+ SHELLS = [
20
+ SKILLS_DIR / "bmad-workflow-builder" / "assets" / "report-shell.html",
21
+ SKILLS_DIR / "bmad-agent-builder" / "assets" / "report-shell.html",
22
+ ]
23
+ ISLAND_RE = re.compile(
24
+ r'<script[^>]*\bid="report-data"[^>]*>(.*?)</script>', re.DOTALL
25
+ )
26
+
27
+ VALID_DATA = {
28
+ "schema_version": 2,
29
+ "subject": "skills/example-skill",
30
+ "generated": "2026-06-10",
31
+ "verdict": "One ceremony section; otherwise sound.",
32
+ "grade": "good",
33
+ "summary": "Solid structure and clean wiring. The main opportunity is one over-scripted reference.",
34
+ "standards": {
35
+ "canon": "/abs/skills/bmad-workflow-builder/references/prompt-quality-canon.md",
36
+ "principles": "/abs/skills/bmad-workflow-builder/references/skill-quality-principles.md",
37
+ "scripts": "/abs/skills/bmad-workflow-builder/references/script-standards.md",
38
+ },
39
+ "themes": [
40
+ {
41
+ "title": "Scripted sequences where goals suffice",
42
+ "root_cause": "Steps are numbered without true ordering dependencies.",
43
+ "finding_ids": ["leanness-1"],
44
+ "action": "Replace ordered lists with goal sentences.",
45
+ }
46
+ ],
47
+ "strengths": ["Frontmatter and routing map are exemplary."],
48
+ "recommendations": [
49
+ {"rank": 1, "action": "De-script the finalize section.", "resolves": ["leanness-1"]}
50
+ ],
51
+ "findings": [
52
+ {
53
+ "id": "leanness-1",
54
+ "lens": "leanness",
55
+ "severity": "high",
56
+ "title": "Numbered finalize steps are decoration",
57
+ "location": "references/build-process.md:finalize",
58
+ "evidence": "No step depends on a prior step's output.",
59
+ "recommendation": "Replace with a single goal sentence.",
60
+ }
61
+ ],
62
+ }
63
+
64
+
65
+ def run_render(args):
66
+ return subprocess.run(
67
+ [sys.executable, str(SCRIPT), *[str(a) for a in args]],
68
+ capture_output=True,
69
+ text=True,
70
+ )
71
+
72
+
73
+ def test_valid_island_injection():
74
+ with tempfile.TemporaryDirectory() as tmp:
75
+ tmp = Path(tmp)
76
+ findings = tmp / "findings.json"
77
+ out = tmp / "report.html"
78
+ findings.write_text(json.dumps(VALID_DATA), encoding="utf-8")
79
+
80
+ result = run_render([findings, "--shell", SHELLS[0], "-o", out])
81
+ assert result.returncode == 0, result.stderr
82
+ html = out.read_text(encoding="utf-8")
83
+
84
+ match = ISLAND_RE.search(html)
85
+ assert match, "rendered HTML has no report-data island"
86
+ island = json.loads(match.group(1))
87
+ assert island["subject"] == "skills/example-skill"
88
+ assert island["findings"][0]["id"] == "leanness-1"
89
+ assert island["standards"]["canon"].endswith("prompt-quality-canon.md")
90
+ assert "__PLACEHOLDER__" not in match.group(1)
91
+
92
+ stdout = json.loads(result.stdout)
93
+ assert stdout["counts"] == {"critical": 0, "high": 1, "medium": 0, "low": 0}
94
+ assert stdout["grade"] == "good"
95
+
96
+
97
+ def test_refuses_bad_json():
98
+ with tempfile.TemporaryDirectory() as tmp:
99
+ tmp = Path(tmp)
100
+ findings = tmp / "findings.json"
101
+ out = tmp / "report.html"
102
+ findings.write_text("{ this is not json", encoding="utf-8")
103
+
104
+ result = run_render([findings, "--shell", SHELLS[0], "-o", out])
105
+ assert result.returncode != 0
106
+ assert "not valid JSON" in result.stderr
107
+ assert not out.exists(), "refused render must not write output"
108
+
109
+
110
+ def test_refuses_placeholder_subject():
111
+ with tempfile.TemporaryDirectory() as tmp:
112
+ tmp = Path(tmp)
113
+ findings = tmp / "findings.json"
114
+ out = tmp / "report.html"
115
+ data = dict(VALID_DATA, subject="__PLACEHOLDER__")
116
+ findings.write_text(json.dumps(data), encoding="utf-8")
117
+
118
+ result = run_render([findings, "--shell", SHELLS[0], "-o", out])
119
+ assert result.returncode != 0
120
+ assert "placeholder" in result.stderr.lower()
121
+ assert not out.exists(), "refused render must not write output"
122
+
123
+
124
+ def test_md_output():
125
+ with tempfile.TemporaryDirectory() as tmp:
126
+ tmp = Path(tmp)
127
+ findings = tmp / "findings.json"
128
+ out = tmp / "report.html"
129
+ md = tmp / "report.md"
130
+ findings.write_text(json.dumps(VALID_DATA), encoding="utf-8")
131
+
132
+ result = run_render([findings, "--shell", SHELLS[0], "-o", out, "--md", md])
133
+ assert result.returncode == 0, result.stderr
134
+ text = md.read_text(encoding="utf-8")
135
+ assert "# Analysis Report: skills/example-skill" in text
136
+ assert "**Grade: Good**" in text
137
+ assert "## Themes" in text
138
+ assert "Scripted sequences where goals suffice" in text
139
+ assert "## Strengths" in text
140
+ assert "## Recommendations" in text
141
+ assert "### High (1)" in text
142
+ assert "leanness-1" in text
143
+
144
+
145
+ def test_shipped_shells_carry_placeholder_island():
146
+ for shell in SHELLS:
147
+ match = ISLAND_RE.search(shell.read_text(encoding="utf-8"))
148
+ assert match, f"{shell} has no report-data island"
149
+ island = json.loads(match.group(1))
150
+ assert island["subject"] == "__PLACEHOLDER__", (
151
+ f"{shell} ships a non-placeholder island; a failed injection "
152
+ "would show its contents as real findings"
153
+ )
154
+ assert island["findings"] == []
155
+
156
+
157
+ def test_render_script_copies_identical():
158
+ other = SKILLS_DIR / "bmad-agent-builder" / "scripts" / "render_report.py"
159
+ assert SCRIPT.read_bytes() == other.read_bytes(), (
160
+ "render_report.py copies have drifted between the two builder skills"
161
+ )
162
+
163
+
164
+ if __name__ == "__main__":
165
+ test_valid_island_injection()
166
+ test_refuses_bad_json()
167
+ test_refuses_placeholder_subject()
168
+ test_md_output()
169
+ test_shipped_shells_carry_placeholder_island()
170
+ test_render_script_copies_identical()
171
+ print("ok: render_report tests passed")
@@ -1,6 +1,6 @@
1
1
  {
2
- "generated": "2026-06-13T15:11:45.601Z",
3
- "bmadMethodVersion": "6.8.0",
2
+ "generated": "2026-06-27T14:28:18.113Z",
3
+ "bmadMethodVersion": "6.9.0",
4
4
  "registrySchema": "package-root-v68",
5
5
  "modules": {
6
6
  "tea": {
@@ -12,8 +12,8 @@
12
12
  "bmb": {
13
13
  "url": "https://github.com/bmad-code-org/bmad-builder",
14
14
  "branch": "main",
15
- "commitSha": "7cfa7711778f04c5df56f7ae895fabc942fd920c",
16
- "clonedAt": "2026-06-13T15:11:41.069Z"
15
+ "commitSha": "e6935f2776c34ffd9b18f4ef1e334584ef10a50f",
16
+ "clonedAt": "2026-06-27T14:28:16.693Z"
17
17
  },
18
18
  "cis": {
19
19
  "url": "https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite",
@@ -39,7 +39,7 @@
39
39
  "roo-code",
40
40
  "kilocode"
41
41
  ],
42
- "bmad_min_version": "6.8.0",
42
+ "bmad_min_version": "6.9.0",
43
43
  "plugins": [
44
44
  {
45
45
  "name": "ma-skills",
@@ -31,13 +31,13 @@
31
31
  "roo-code",
32
32
  "kilocode"
33
33
  ],
34
- "bmad_min_version": "6.8.0",
34
+ "bmad_min_version": "6.9.0",
35
35
  "plugins": [
36
36
  {
37
37
  "name": "ma-skills",
38
38
  "source": "./",
39
39
  "description": "ma-agents extension module providing enterprise SDLC personas and operational workflow skills.",
40
- "version": "3.13.2",
40
+ "version": "3.14.0",
41
41
  "author": {
42
42
  "name": "Alon Mayaffit"
43
43
  },
package/lib/bmad.js CHANGED
@@ -2127,7 +2127,7 @@ function ensureCanonicalConfigLocation(projectRoot) {
2127
2127
 
2128
2128
  // ── Migration constants ─────────────────────────────────────────────────────
2129
2129
 
2130
- const BMAD_TARGET_VERSION = '6.8.0';
2130
+ const BMAD_TARGET_VERSION = '6.9.0';
2131
2131
  const BMAD_MIGRATION_THRESHOLD = '6.2.0'; // versions below this need migration
2132
2132
  const BACKUP_DIR_NAME = '.backup-pre-migration';
2133
2133
 
@@ -3145,6 +3145,11 @@ module.exports = {
3145
3145
  looksLikeEbusyFailure,
3146
3146
  inspectBmadCache,
3147
3147
  classifyRecompileFailure,
3148
+ // Shared subprocess primitive (exported for testing — Story 28.2 / FR212:
3149
+ // the install/update/migration success-or-failure decision rides on whether
3150
+ // this throws on a non-zero exit, NOT on parsing installer stdout, so the
3151
+ // v6.9.0 warn-only `uv` banner cannot affect it).
3152
+ runCommand,
3148
3153
  // Module selection — replaces hardcoded ['bmm'] in the CLI install path
3149
3154
  BMAD_MODULE_DESCRIPTIONS,
3150
3155
  getInstallableBmadModules,
@@ -1,25 +1,25 @@
1
- ## Git Workflow (ALL file-changing tasks)
2
-
3
- These rules apply to EVERY task that modifies a tracked file. There is no
4
- "small fix exemption" — a one-line edit follows the same workflow as a feature.
5
-
6
- - **Worktree first.** Before changing any file, create a fresh isolated worktree
7
- on a new feature branch: `git worktree add ../<project>-<branch> -b <branch>`.
8
- The scripted form is `skills/git-workflow-skill/scripts/start-feature.sh`. All
9
- file-writing happens inside that worktree — never in the main working tree.
10
- - **Never commit directly to the trunk.** Do NOT commit to `main`, `dev`,
11
- `master`, or whatever the trunk branch is. Commits land only on your feature
12
- branch inside the worktree.
13
- - **Conventional Commits.** Every commit message uses a Conventional Commits
14
- prefix. The allowed prefixes are: `feat`, `fix`, `chore`, `docs`, `refactor`,
15
- `test`, `ci`.
16
- - **PR is the only path into the trunk.** Integrate exclusively by opening a pull
17
- request with `gh pr create`. Never merge directly and never auto-merge a PR
18
- without explicit human approval.
19
- - **Self-review before opening the PR.** Run the `code-review` skill on your own
20
- changes and address its findings before you open the PR.
21
- - **Clean up after merge.** Once the PR is merged, remove the worktree with
22
- `git worktree remove` and delete the feature branch.
23
-
24
- Full procedure: see `skills/git-workflow-skill/SKILL.md`, and the helper scripts
25
- `scripts/start-feature.sh` / `scripts/finish-feature.sh`.
1
+ ## Git Workflow (ALL file-changing tasks)
2
+
3
+ These rules apply to EVERY task that modifies a tracked file. There is no
4
+ "small fix exemption" — a one-line edit follows the same workflow as a feature.
5
+
6
+ - **Worktree first.** Before changing any file, create a fresh isolated worktree
7
+ on a new feature branch: `git worktree add ../<project>-<branch> -b <branch>`.
8
+ The scripted form is `skills/git-workflow-skill/scripts/start-feature.sh`. All
9
+ file-writing happens inside that worktree — never in the main working tree.
10
+ - **Never commit directly to the trunk.** Do NOT commit to `main`, `dev`,
11
+ `master`, or whatever the trunk branch is. Commits land only on your feature
12
+ branch inside the worktree.
13
+ - **Conventional Commits.** Every commit message uses a Conventional Commits
14
+ prefix. The allowed prefixes are: `feat`, `fix`, `chore`, `docs`, `refactor`,
15
+ `test`, `ci`.
16
+ - **PR is the only path into the trunk.** Integrate exclusively by opening a pull
17
+ request with `gh pr create`. Never merge directly and never auto-merge a PR
18
+ without explicit human approval.
19
+ - **Self-review before opening the PR.** Run the `code-review` skill on your own
20
+ changes and address its findings before you open the PR.
21
+ - **Clean up after merge.** Once the PR is merged, remove the worktree with
22
+ `git worktree remove` and delete the feature branch.
23
+
24
+ Full procedure: see `skills/git-workflow-skill/SKILL.md`, and the helper scripts
25
+ `scripts/start-feature.sh` / `scripts/finish-feature.sh`.
@@ -1,86 +1,86 @@
1
- ## On-Prem / Local-LLM Guardrails
2
-
3
- These rules apply ONLY when this project is installed with `profile: on-prem`.
4
- They are appended to the universal block by the composer in `lib/installer.js`.
5
- Local LLMs (Nemotron, Qwen, DeepSeek, Llama-3, etc. served via vLLM, Ollama, or
6
- TGI) fail in patterns cloud LLMs rarely exhibit — the rules below pin those
7
- failure modes down explicitly. Keep these rules verbatim in every response
8
- context where tool use is possible.
9
-
10
- ### Reasoning mode: `/no_think` on planning-phase prompts
11
-
12
- Local reasoning-capable models (Nemotron-variants and similar) default to
13
- chain-of-thought reasoning that bloats planning-phase prompts with internal
14
- deliberation the operator does not need to read. Prepend the literal token
15
- `/no_think` as the first line of any planning-phase system prompt or user turn
16
- you compose. The token is consumed by the serving layer and suppresses the
17
- model's reasoning trace on that turn.
18
-
19
- - Planning-phase turns (PM, Architect, Tech Lead): begin the turn with
20
- `/no_think` on its own line. Reasoning-mode OFF.
21
- - Implementation-phase turns (Dev): omit `/no_think`. Reasoning-mode ON is
22
- desirable for stepwise code synthesis and debugging.
23
- - Review / QA turns: omit `/no_think` when the review benefits from explicit
24
- reasoning (root-cause analysis). Include `/no_think` for mechanical checks
25
- (lint, style, formatting).
26
-
27
- If the downstream serving layer does not recognize `/no_think`, it is a no-op
28
- text token — safe to include unconditionally on planning turns.
29
-
30
- ### No writes to `~/.claude/` or any user home directory
31
-
32
- Local LLMs frequently hallucinate paths under `~/.claude/`, `~/.cache/`,
33
- `~/Library/`, or `%APPDATA%` — imitating patterns learned from Claude Code and
34
- Cursor training data. These paths are OUTSIDE the project and cross-contaminate
35
- other projects on the same machine.
36
-
37
- - NEVER create, write, or modify files under `~/.claude/`, `~/.cache/`,
38
- `~/Library/`, `~/AppData/`, `%APPDATA%`, or any path that resolves outside
39
- the current project directory.
40
- - All project artifacts — code, configuration, logs, scratch notes, and agent
41
- state — MUST land under the current working directory (the project root) or
42
- an explicitly-named subdirectory thereof.
43
- - When a tool call appears to target a home-directory path, refuse the write
44
- and respond in text explaining the violation. Ask the user for an explicit
45
- in-project path before proceeding.
46
-
47
- ### No `str_replace_editor` or Claude Code-specific tools
48
-
49
- Local LLMs hallucinate Anthropic-proprietary tools — most commonly
50
- `str_replace_editor`, `text_editor_20241022`, and `computer_use_preview` — that
51
- do NOT exist outside the Anthropic API. Calling them against a local-LLM
52
- serving layer produces a tool-not-found error or, worse, a silent no-op.
53
-
54
- - Do NOT emit tool calls named `str_replace_editor`, `text_editor_*`,
55
- `computer_use_*`, or any other tool whose name includes `str_replace_editor`
56
- or matches Anthropic-specific tool schemas.
57
- - Use only tools enumerated in the active tool manifest (`MANIFEST.yaml`) or
58
- the IDE's native tool surface (Roo Code, Cline, OpenCode native tools).
59
- - When you want to edit a file, use the native file-write tool of the active
60
- agent — not `str_replace_editor`. If unsure what tool is available, list
61
- available tools or ask the user before emitting a tool call.
62
-
63
- ### Per-phase reasoning and sampling guidance
64
-
65
- Local LLMs require tighter sampling control than cloud LLMs. Use these defaults
66
- unless the serving layer overrides them.
67
-
68
- - **Planning phase (PM, Architect, Tech Lead):**
69
- - Reasoning: OFF (`/no_think` prepended).
70
- - Temperature: low (0.0 – 0.3). Planning artifacts should be deterministic
71
- and reproducible.
72
- - Top-p: 0.9 or unset. Top-k: unset.
73
- - Max tokens: generous (8k+) — planning documents are long.
74
- - **Implementation phase (Dev):**
75
- - Reasoning: ON (omit `/no_think`).
76
- - Temperature: moderate (0.3 – 0.6). Code synthesis benefits from controlled
77
- exploration but not creative rewriting.
78
- - Top-p: 0.95 or unset. Top-k: unset.
79
- - Max tokens: generous (8k+) — full-file rewrites are common.
80
- - **Review / QA phase:**
81
- - Reasoning: ON for root-cause analysis; OFF for mechanical checks.
82
- - Temperature: low (0.0 – 0.2). Reviews should be deterministic.
83
-
84
- If the serving layer applies its own sampler defaults, the per-phase guidance
85
- above is advisory — but the phase boundary and `/no_think` placement are
86
- load-bearing and MUST be honored on every turn.
1
+ ## On-Prem / Local-LLM Guardrails
2
+
3
+ These rules apply ONLY when this project is installed with `profile: on-prem`.
4
+ They are appended to the universal block by the composer in `lib/installer.js`.
5
+ Local LLMs (Nemotron, Qwen, DeepSeek, Llama-3, etc. served via vLLM, Ollama, or
6
+ TGI) fail in patterns cloud LLMs rarely exhibit — the rules below pin those
7
+ failure modes down explicitly. Keep these rules verbatim in every response
8
+ context where tool use is possible.
9
+
10
+ ### Reasoning mode: `/no_think` on planning-phase prompts
11
+
12
+ Local reasoning-capable models (Nemotron-variants and similar) default to
13
+ chain-of-thought reasoning that bloats planning-phase prompts with internal
14
+ deliberation the operator does not need to read. Prepend the literal token
15
+ `/no_think` as the first line of any planning-phase system prompt or user turn
16
+ you compose. The token is consumed by the serving layer and suppresses the
17
+ model's reasoning trace on that turn.
18
+
19
+ - Planning-phase turns (PM, Architect, Tech Lead): begin the turn with
20
+ `/no_think` on its own line. Reasoning-mode OFF.
21
+ - Implementation-phase turns (Dev): omit `/no_think`. Reasoning-mode ON is
22
+ desirable for stepwise code synthesis and debugging.
23
+ - Review / QA turns: omit `/no_think` when the review benefits from explicit
24
+ reasoning (root-cause analysis). Include `/no_think` for mechanical checks
25
+ (lint, style, formatting).
26
+
27
+ If the downstream serving layer does not recognize `/no_think`, it is a no-op
28
+ text token — safe to include unconditionally on planning turns.
29
+
30
+ ### No writes to `~/.claude/` or any user home directory
31
+
32
+ Local LLMs frequently hallucinate paths under `~/.claude/`, `~/.cache/`,
33
+ `~/Library/`, or `%APPDATA%` — imitating patterns learned from Claude Code and
34
+ Cursor training data. These paths are OUTSIDE the project and cross-contaminate
35
+ other projects on the same machine.
36
+
37
+ - NEVER create, write, or modify files under `~/.claude/`, `~/.cache/`,
38
+ `~/Library/`, `~/AppData/`, `%APPDATA%`, or any path that resolves outside
39
+ the current project directory.
40
+ - All project artifacts — code, configuration, logs, scratch notes, and agent
41
+ state — MUST land under the current working directory (the project root) or
42
+ an explicitly-named subdirectory thereof.
43
+ - When a tool call appears to target a home-directory path, refuse the write
44
+ and respond in text explaining the violation. Ask the user for an explicit
45
+ in-project path before proceeding.
46
+
47
+ ### No `str_replace_editor` or Claude Code-specific tools
48
+
49
+ Local LLMs hallucinate Anthropic-proprietary tools — most commonly
50
+ `str_replace_editor`, `text_editor_20241022`, and `computer_use_preview` — that
51
+ do NOT exist outside the Anthropic API. Calling them against a local-LLM
52
+ serving layer produces a tool-not-found error or, worse, a silent no-op.
53
+
54
+ - Do NOT emit tool calls named `str_replace_editor`, `text_editor_*`,
55
+ `computer_use_*`, or any other tool whose name includes `str_replace_editor`
56
+ or matches Anthropic-specific tool schemas.
57
+ - Use only tools enumerated in the active tool manifest (`MANIFEST.yaml`) or
58
+ the IDE's native tool surface (Roo Code, Cline, OpenCode native tools).
59
+ - When you want to edit a file, use the native file-write tool of the active
60
+ agent — not `str_replace_editor`. If unsure what tool is available, list
61
+ available tools or ask the user before emitting a tool call.
62
+
63
+ ### Per-phase reasoning and sampling guidance
64
+
65
+ Local LLMs require tighter sampling control than cloud LLMs. Use these defaults
66
+ unless the serving layer overrides them.
67
+
68
+ - **Planning phase (PM, Architect, Tech Lead):**
69
+ - Reasoning: OFF (`/no_think` prepended).
70
+ - Temperature: low (0.0 – 0.3). Planning artifacts should be deterministic
71
+ and reproducible.
72
+ - Top-p: 0.9 or unset. Top-k: unset.
73
+ - Max tokens: generous (8k+) — planning documents are long.
74
+ - **Implementation phase (Dev):**
75
+ - Reasoning: ON (omit `/no_think`).
76
+ - Temperature: moderate (0.3 – 0.6). Code synthesis benefits from controlled
77
+ exploration but not creative rewriting.
78
+ - Top-p: 0.95 or unset. Top-k: unset.
79
+ - Max tokens: generous (8k+) — full-file rewrites are common.
80
+ - **Review / QA phase:**
81
+ - Reasoning: ON for root-cause analysis; OFF for mechanical checks.
82
+ - Temperature: low (0.0 – 0.2). Reviews should be deterministic.
83
+
84
+ If the serving layer applies its own sampler defaults, the per-phase guidance
85
+ above is advisory — but the phase boundary and `/no_think` placement are
86
+ load-bearing and MUST be honored on every turn.
@@ -1,29 +1,29 @@
1
- # AI Agent Skills - Planning Instruction
2
-
3
- You have access to a library of skills in your skills directory. Before starting any task:
4
-
5
- 1. Read the skill manifest at {{MANIFEST_PATH}}
6
- 2. Based on the task description, select which skills are relevant
7
- 3. Read only the selected skill files
8
- 4. Then proceed with the task
9
-
10
- Always load skills marked with always_load: true.
11
- Do not load skills that are not relevant to the current task.
12
-
13
- ## Respond in TEXT vs. create FILES
14
-
15
- Choose your response medium deliberately. Defaulting to file creation when the user asked a question is a common failure mode — especially for coding agents running in web UIs.
16
-
17
- - **Create or modify FILES when the user's request contains file-action keywords:** `create`, `write`, `generate`, `build`, `implement` (and obvious synonyms such as `add`, `produce`, `refactor`, `fix`, `update <file>`). These signal a concrete artifact is expected.
18
- - **Respond in TEXT when the request contains text-response keywords:** `what do you think`, `how should we`, `discuss`, `opinion` (and obvious synonyms such as `explain`, `why`, `should I`, `compare`, `recommend`). These signal that a conversation is expected, not a deliverable.
19
- - **If unsure, respond in TEXT.** A text answer can always be followed by file creation on confirmation; an unwanted file cannot be cleanly undone.
20
- - **Never create `response.md`, `output.md`, or any similarly named scratch file as a reply.** A reply belongs in the chat transcript, not on disk.
21
- - **Confirm file paths before writing.** When you are about to create or modify a file whose path the user has not explicitly named, state the intended path in text and wait for confirmation, unless the path is unambiguous from the task context.
22
-
23
- ## BMAD phase discipline
24
-
25
- BMAD-METHOD organizes work into declared phases (analysis, planning, architecture, story-creation, implementation, review). Respect the currently declared phase.
26
-
27
- - **Do not skip ahead to implementation during planning.** If the project is in a planning phase — or the user has asked for requirements, architecture, or a story — produce planning artifacts, not code.
28
- - **Do not retroactively plan after you have already coded.** If implementation has already started, flag the gap instead of fabricating back-dated planning documents.
29
- - The declared phase is established by the active skill, the story status, or an explicit statement from the user. When none of these is available, ask before assuming.
1
+ # AI Agent Skills - Planning Instruction
2
+
3
+ You have access to a library of skills in your skills directory. Before starting any task:
4
+
5
+ 1. Read the skill manifest at {{MANIFEST_PATH}}
6
+ 2. Based on the task description, select which skills are relevant
7
+ 3. Read only the selected skill files
8
+ 4. Then proceed with the task
9
+
10
+ Always load skills marked with always_load: true.
11
+ Do not load skills that are not relevant to the current task.
12
+
13
+ ## Respond in TEXT vs. create FILES
14
+
15
+ Choose your response medium deliberately. Defaulting to file creation when the user asked a question is a common failure mode — especially for coding agents running in web UIs.
16
+
17
+ - **Create or modify FILES when the user's request contains file-action keywords:** `create`, `write`, `generate`, `build`, `implement` (and obvious synonyms such as `add`, `produce`, `refactor`, `fix`, `update <file>`). These signal a concrete artifact is expected.
18
+ - **Respond in TEXT when the request contains text-response keywords:** `what do you think`, `how should we`, `discuss`, `opinion` (and obvious synonyms such as `explain`, `why`, `should I`, `compare`, `recommend`). These signal that a conversation is expected, not a deliverable.
19
+ - **If unsure, respond in TEXT.** A text answer can always be followed by file creation on confirmation; an unwanted file cannot be cleanly undone.
20
+ - **Never create `response.md`, `output.md`, or any similarly named scratch file as a reply.** A reply belongs in the chat transcript, not on disk.
21
+ - **Confirm file paths before writing.** When you are about to create or modify a file whose path the user has not explicitly named, state the intended path in text and wait for confirmation, unless the path is unambiguous from the task context.
22
+
23
+ ## BMAD phase discipline
24
+
25
+ BMAD-METHOD organizes work into declared phases (analysis, planning, architecture, story-creation, implementation, review). Respect the currently declared phase.
26
+
27
+ - **Do not skip ahead to implementation during planning.** If the project is in a planning phase — or the user has asked for requirements, architecture, or a story — produce planning artifacts, not code.
28
+ - **Do not retroactively plan after you have already coded.** If implementation has already started, flag the gap instead of fabricating back-dated planning documents.
29
+ - The declared phase is established by the active skill, the story status, or an explicit statement from the user. When none of these is available, ask before assuming.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-agents",
3
- "version": "3.13.2",
3
+ "version": "3.14.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/build-bmad-cache-reader.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/instruction-block-git.test.js && node test/onprem-injection.test.js && node test/onprem-layer.test.js && node test/copilot-instructions-path.test.js && node test/roomodes.test.js && node test/clinerules.test.js && node test/cline-workflow-reconciliation.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 && node test/v68-pluginresolver-enumeration-passthrough.test.js && node test/agents.test.js && node test/installer.test.js && node test/bmad.test.js && node test/cli.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/build-bmad-cache-reader.test.js && node test/bmad-version-bump.test.js && node test/uv-transition-resilience.test.js && node test/passthrough-reconciliation-6-9-0.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/instruction-block-git.test.js && node test/onprem-injection.test.js && node test/onprem-layer.test.js && node test/copilot-instructions-path.test.js && node test/roomodes.test.js && node test/clinerules.test.js && node test/cline-workflow-reconciliation.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 && node test/v68-pluginresolver-enumeration-passthrough.test.js && node test/agents.test.js && node test/installer.test.js && node test/bmad.test.js && node test/cli.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",
@@ -30,7 +30,7 @@
30
30
  "author": "",
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "bmad-method": "6.8.0",
33
+ "bmad-method": "6.9.0",
34
34
  "chalk": "^4.1.2",
35
35
  "fs-extra": "^11.1.1",
36
36
  "js-yaml": "^4.1.1",