bmad-overlay 0.1.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -0
  3. package/PUBLISH.md +82 -0
  4. package/QUICKSTART.md +69 -0
  5. package/README.md +84 -0
  6. package/agents/orchestrator.md +94 -0
  7. package/config/agent-map.yaml +40 -0
  8. package/customizations/bmm-dev.customize.yaml +25 -0
  9. package/customizations/bmm-pm.customize.yaml +24 -0
  10. package/customizations/bmm-qa.customize.yaml +23 -0
  11. package/install/INSTALL.md +151 -0
  12. package/install/check-package.mjs +21 -0
  13. package/install/install-overlay.mjs +279 -0
  14. package/install/install-overlay.sh +14 -0
  15. package/install/merge-bmad-customizations.mjs +179 -0
  16. package/package.json +32 -0
  17. package/policies/routing-policy.md +60 -0
  18. package/runtime/README.md +112 -0
  19. package/runtime/STAGE_RUNNER.md +53 -0
  20. package/runtime/codex-orchestrator.js +922 -0
  21. package/runtime/codex-stage-runner.js +747 -0
  22. package/skills/README.md +38 -0
  23. package/skills/orchestrator-advance-stage/SKILL.md +55 -0
  24. package/skills/orchestrator-advance-stage/bmad-skill-manifest.yaml +1 -0
  25. package/skills/orchestrator-advance-stage/workflow.md +47 -0
  26. package/skills/orchestrator-block-stage/SKILL.md +44 -0
  27. package/skills/orchestrator-block-stage/bmad-skill-manifest.yaml +1 -0
  28. package/skills/orchestrator-block-stage/workflow.md +44 -0
  29. package/skills/orchestrator-close-run/SKILL.md +59 -0
  30. package/skills/orchestrator-close-run/bmad-skill-manifest.yaml +1 -0
  31. package/skills/orchestrator-close-run/workflow.md +47 -0
  32. package/skills/orchestrator-execute-active-stage/SKILL.md +50 -0
  33. package/skills/orchestrator-execute-active-stage/bmad-skill-manifest.yaml +1 -0
  34. package/skills/orchestrator-execute-active-stage/workflow.md +42 -0
  35. package/skills/orchestrator-launch-council/SKILL.md +53 -0
  36. package/skills/orchestrator-launch-council/bmad-skill-manifest.yaml +1 -0
  37. package/skills/orchestrator-launch-council/workflow.md +43 -0
  38. package/skills/orchestrator-resume-stage/SKILL.md +47 -0
  39. package/skills/orchestrator-resume-stage/bmad-skill-manifest.yaml +1 -0
  40. package/skills/orchestrator-resume-stage/workflow.md +45 -0
  41. package/skills/orchestrator-start-run/SKILL.md +62 -0
  42. package/skills/orchestrator-start-run/bmad-skill-manifest.yaml +1 -0
  43. package/skills/orchestrator-start-run/workflow.md +47 -0
  44. package/templates/CLAUDE.md +51 -0
  45. package/templates/analysis-synthesis.md +25 -0
  46. package/templates/analyst-seat-output.yaml +7 -0
  47. package/templates/architecture-handoff.yaml +8 -0
  48. package/templates/architecture-seat-output.yaml +7 -0
  49. package/templates/architecture-synthesis.md +23 -0
  50. package/templates/current-stage.yaml +26 -0
  51. package/templates/delivery-seat-output.yaml +7 -0
  52. package/templates/delivery-synthesis.md +27 -0
  53. package/templates/docs-index.md +19 -0
  54. package/templates/docs-studio-layout.md +88 -0
  55. package/templates/feature-index.md +21 -0
  56. package/templates/intake-request.yaml +12 -0
  57. package/templates/pm-handoff.yaml +11 -0
  58. package/templates/pm-seat-output.yaml +7 -0
  59. package/templates/pm-synthesis.md +25 -0
  60. package/templates/qa-review-findings.yaml +7 -0
  61. package/templates/qa-review-handoff.yaml +10 -0
  62. package/templates/qa-review-seat-output.yaml +7 -0
  63. package/templates/qa-review-summary.md +21 -0
  64. package/templates/run-manifest.md +46 -0
  65. package/templates/stage-handoff.yaml +8 -0
  66. package/workflows/councils/analyst-council.md +229 -0
  67. package/workflows/councils/architecture-council.md +240 -0
  68. package/workflows/councils/delivery-council.md +379 -0
  69. package/workflows/councils/orchestrator-governance.md +474 -0
  70. package/workflows/councils/pm-council.md +241 -0
  71. package/workflows/councils/qa-review-council.md +241 -0
  72. package/workflows/new-saas.md +51 -0
  73. package/workflows/orchestrated-saas-studio.md +155 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1
4
+
5
+ Documentation cleanup and packaging polish.
6
+
7
+ Included:
8
+
9
+ - simplified user-facing README
10
+ - npm-first installation docs
11
+ - anonymized publishable path examples
12
+
13
+ ## 0.1.0
14
+
15
+ Initial portable release candidate.
16
+
17
+ Included:
18
+
19
+ - multi-mode installer
20
+ - BMAD customization merge
21
+ - runtime controller
22
+ - stage runner
23
+ - explicit BMAD agent mapping
24
+ - Codex / Claude Code executor support with fallback
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PUBLISH.md ADDED
@@ -0,0 +1,82 @@
1
+ # Publishing `bmad-overlay`
2
+
3
+ ## Goal
4
+
5
+ Maintain and validate the published npm package for `bmad-overlay`.
6
+
7
+ Public command:
8
+
9
+ ```bash
10
+ npx bmad-overlay --target /path/to/project --mode full --merge-bmad true
11
+ ```
12
+
13
+ ## Package State
14
+
15
+ npm package:
16
+
17
+ - `https://www.npmjs.com/package/bmad-overlay`
18
+
19
+ Current package file:
20
+
21
+ - `overlay/package.json`
22
+
23
+ Published package name:
24
+
25
+ - `bmad-overlay`
26
+
27
+ Current bin entries:
28
+
29
+ - `bmad-overlay`
30
+ - `bmad-overlay-merge-bmad`
31
+
32
+ ## Publish Checklist
33
+
34
+ 1. Verify installer behavior on a clean target project.
35
+ 2. Verify `--mode codex`, `--mode claude-code`, `--mode bmad`, and `--mode full`.
36
+ 3. Verify `--merge-bmad true`.
37
+ 4. Verify generated wrapper scripts.
38
+ 5. Verify `overlay-applied/agent-map.yaml`.
39
+ 6. Verify no project-local absolute paths are embedded.
40
+ 8. Run `npm run pack:check`.
41
+
42
+ ## Suggested Publish Flow
43
+
44
+ From `overlay/`:
45
+
46
+ ```bash
47
+ npm run pack:check
48
+ npm pack
49
+ npm publish --access public
50
+ ```
51
+
52
+ ## Public Release Scope
53
+
54
+ The public release should promise:
55
+
56
+ - portable overlay install
57
+ - explicit setup modes
58
+ - BMAD customization merge
59
+ - runtime and stage runner included
60
+
61
+ It should not promise:
62
+
63
+ - fully networked worker execution in every environment
64
+ - zero-config BMAD merge for arbitrary customized files
65
+ - provider-specific quality parity between Codex and Claude Code
66
+
67
+ ## Post-Publish Validation
68
+
69
+ Run on a clean directory:
70
+
71
+ ```bash
72
+ npx bmad-overlay --target ./test-project --mode full --merge-bmad true
73
+ ```
74
+
75
+ Then verify:
76
+
77
+ - `overlay/`
78
+ - `docs/`
79
+ - `scripts/overlay-*.sh`
80
+ - `.overlay/setup.json`
81
+ - `overlay-applied/`
82
+ - `_bmad/_config/agents/*.customize.yaml` if merge enabled
package/QUICKSTART.md ADDED
@@ -0,0 +1,69 @@
1
+ # Quickstart
2
+
3
+ ## Install Into A Project
4
+
5
+ Recommended npm install:
6
+
7
+ ```bash
8
+ npx bmad-overlay --target /path/to/project --mode full --merge-bmad true
9
+ ```
10
+
11
+ Package:
12
+
13
+ - `https://www.npmjs.com/package/bmad-overlay`
14
+
15
+ Local install from this repo:
16
+
17
+ ```bash
18
+ node overlay/install/install-overlay.mjs --target /path/to/project --mode full --merge-bmad true
19
+ ```
20
+
21
+ Shell wrapper:
22
+
23
+ ```bash
24
+ ./overlay/install/install-overlay.sh /path/to/project full true
25
+ ```
26
+
27
+ ## Modes
28
+
29
+ - `codex`: runtime plus Codex-facing setup
30
+ - `claude-code`: runtime plus Claude Code-facing setup
31
+ - `bmad`: BMAD customization and mapping setup
32
+ - `full`: all of the above
33
+
34
+ ## Run The Overlay
35
+
36
+ From the target project:
37
+
38
+ ```bash
39
+ scripts/overlay-run-auto.sh "Create a SaaS for appointment booking"
40
+ ```
41
+
42
+ Provider-specific:
43
+
44
+ ```bash
45
+ scripts/overlay-run-codex.sh "Create a SaaS for appointment booking"
46
+ scripts/overlay-run-claude.sh "Create a SaaS for appointment booking"
47
+ ```
48
+
49
+ ## Check State
50
+
51
+ ```bash
52
+ scripts/overlay-status.sh
53
+ ```
54
+
55
+ Primary state files:
56
+
57
+ - `docs/studio/current-stage.yaml`
58
+ - `docs/studio/run-manifest.md`
59
+
60
+ ## BMAD Step
61
+
62
+ If BMAD is present and merge is enabled:
63
+
64
+ 1. Review merged files in `_bmad/_config/agents/`
65
+ 2. Re-run:
66
+
67
+ ```bash
68
+ npx bmad-method install
69
+ ```
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # bmad-overlay
2
+
3
+ `bmad-overlay` installe une surcouche d'orchestration BMAD dans un projet existant.
4
+
5
+ L'objectif est simple:
6
+
7
+ - preparer le projet
8
+ - ajouter les fichiers et scripts utiles
9
+ - utiliser un point d'entree unique pour piloter le workflow
10
+
11
+ Package npm:
12
+
13
+ - `https://www.npmjs.com/package/bmad-overlay`
14
+
15
+ ## Prerequis
16
+
17
+ - un projet cible
18
+ - BMAD deja installe si tu veux activer le merge BMAD
19
+
20
+ ## Installation
21
+
22
+ Commande recommandee:
23
+
24
+ ```bash
25
+ npx bmad-overlay --target /path/to/project --mode full --merge-bmad true
26
+ ```
27
+
28
+ Exemple:
29
+
30
+ ```bash
31
+ npx bmad-overlay --target ./my-project --mode full --merge-bmad true
32
+ ```
33
+
34
+ ## Modes
35
+
36
+ - `codex`: prepare le projet pour un usage Codex
37
+ - `claude-code`: prepare le projet pour un usage Claude Code
38
+ - `bmad`: ajoute la couche de mapping et de customization BMAD
39
+ - `full`: installe tout
40
+
41
+ ## Ce que la commande ajoute
42
+
43
+ - `overlay/`
44
+ - `docs/`
45
+ - des scripts `scripts/overlay-*.sh`
46
+ - les fichiers de setup overlay
47
+ - le merge BMAD si `--merge-bmad true` est active
48
+
49
+ ## Utilisation
50
+
51
+ Depuis le projet cible:
52
+
53
+ ```bash
54
+ scripts/overlay-run-auto.sh "Create a SaaS for appointment booking"
55
+ ```
56
+
57
+ Selon le provider:
58
+
59
+ ```bash
60
+ scripts/overlay-run-codex.sh "Create a SaaS for appointment booking"
61
+ scripts/overlay-run-claude.sh "Create a SaaS for appointment booking"
62
+ ```
63
+
64
+ Verifier l'etat courant:
65
+
66
+ ```bash
67
+ scripts/overlay-status.sh
68
+ ```
69
+
70
+ ## Fichiers utiles
71
+
72
+ - `docs/studio/current-stage.yaml`
73
+ - `docs/studio/run-manifest.md`
74
+
75
+ ## Documentation
76
+
77
+ - [Quickstart](./QUICKSTART.md)
78
+ - [Installation](./install/INSTALL.md)
79
+ - [Publish](./PUBLISH.md)
80
+
81
+ ## Installation manuelle
82
+
83
+ L'installation manuelle existe, mais elle est reservee aux cas avances.
84
+ Le parcours standard doit passer par `npx bmad-overlay`.
@@ -0,0 +1,94 @@
1
+ # Overlay Orchestrator
2
+
3
+ ## Mission
4
+
5
+ Be the single visible entrypoint for the user.
6
+ Delegate internally when useful, but keep the workflow continuous and low-interruption.
7
+
8
+ ## Responsibilities
9
+
10
+ - classify incoming requests
11
+ - choose `quick` or `structured`
12
+ - identify the relevant feature docs
13
+ - determine which BMAD role should act next
14
+ - consolidate outcomes into a single user-facing thread
15
+ - serialize cross-phase execution
16
+ - assign disjoint write scopes to internal workers
17
+ - prevent multiple agents from editing the same synthesis artifacts simultaneously
18
+
19
+ ## Mandatory protocol
20
+
21
+ 1. Read `docs/index.md`
22
+ 2. If the request maps to a feature, read its local docs
23
+ 3. Check `_bmad-output` for relevant BMAD artifacts
24
+ 4. Decide whether the task is planning, architecture, implementation, QA, or documentation
25
+ 5. Decide which single council is active
26
+ 6. Delegate with explicit write ownership
27
+ 7. Wait for council synthesis before opening the next council
28
+ 8. Ensure continuation docs are updated before closing
29
+
30
+ ## Concurrency Rules
31
+
32
+ ### Phase serialization
33
+
34
+ Only one cross-phase council may own the main synthesis path at a time:
35
+
36
+ - Analyst Council
37
+ - PM Council
38
+ - Architecture Council
39
+ - Delivery Council
40
+ - QA / Review Council
41
+
42
+ The orchestrator must not open a downstream council until the upstream council has emitted:
43
+
44
+ - its synthesis artifact
45
+ - its handoff artifact
46
+ - its explicit next-stage recommendation
47
+
48
+ ### Worker write-scope rule
49
+
50
+ Within a council, workers may run in parallel only if their write scopes are disjoint.
51
+
52
+ Examples:
53
+
54
+ - allowed: separate seat notes
55
+ - allowed: frontend and backend implementation in different ownership areas
56
+ - not allowed: two workers editing the same synthesis file
57
+ - not allowed: multiple workers editing the same handoff artifact
58
+
59
+ ### Lead-only synthesis rule
60
+
61
+ Every council has exactly one lead allowed to write:
62
+
63
+ - the council synthesis
64
+ - the council handoff
65
+ - the final council decision
66
+
67
+ All other seats produce inputs for the lead, not direct edits to the authoritative synthesis.
68
+
69
+ ### Escalation to serialization
70
+
71
+ If write scopes become unclear, the orchestrator must serialize the remaining work instead of parallelizing it.
72
+
73
+ ## Artifact Ownership Rule
74
+
75
+ The orchestrator owns:
76
+
77
+ - stage activation
78
+ - worker assignment
79
+ - final merge decisions
80
+ - continuity enforcement
81
+
82
+ Council leads own:
83
+
84
+ - stage synthesis
85
+ - stage handoff
86
+
87
+ Seat workers own:
88
+
89
+ - their own seat output only
90
+
91
+ ## Escalation threshold
92
+
93
+ Do not escalate for local execution ambiguity.
94
+ Escalate only for product ambiguity, conflicting authority, or major architectural impact.
@@ -0,0 +1,40 @@
1
+ stages:
2
+ analysis:
3
+ lead_agent: "bmad-analyst"
4
+ seats:
5
+ market-analyst: "bmad-analyst"
6
+ user-problem-analyst: "bmad-analyst"
7
+ feasibility-analyst: "bmad-analyst"
8
+ adversarial-analyst: "bmad-analyst"
9
+ pm:
10
+ lead_agent: "bmad-pm"
11
+ seats:
12
+ mvp-pm: "bmad-pm"
13
+ growth-pm: "bmad-pm"
14
+ risk-pm: "bmad-pm"
15
+ ux-pm: "bmad-pm"
16
+ architecture:
17
+ lead_agent: "bmad-architect"
18
+ seats:
19
+ application-architect: "bmad-architect"
20
+ data-architect: "bmad-architect"
21
+ delivery-architect: "bmad-architect"
22
+ constraint-reviewer: "bmad-architect"
23
+ delivery:
24
+ lead_agent: "bmad-dev"
25
+ seats:
26
+ story-planner: "bmad-sm"
27
+ dependency-planner: "bmad-architect"
28
+ dev-representative: "bmad-dev"
29
+ frontend-dev: "bmad-dev"
30
+ backend-dev: "bmad-dev"
31
+ data-dev: "bmad-dev"
32
+ integration-dev: "bmad-dev"
33
+ quick-fix-dev: "bmad-quick-flow-solo-dev"
34
+ qa-review:
35
+ lead_agent: "bmad-qa"
36
+ seats:
37
+ qa-engineer: "bmad-qa"
38
+ edge-case-reviewer: "bmad-qa"
39
+ docs-continuity-reviewer: "bmad-tech-writer"
40
+ release-gatekeeper: "bmad-qa"
@@ -0,0 +1,25 @@
1
+ # Merge this content into _bmad/_config/agents/bmm-dev.customize.yaml
2
+
3
+ critical_actions:
4
+ - 'Before implementation, read docs/index.md and the feature-local docs when available.'
5
+ - 'Do not ask the user for information that can be inferred from docs, stories, project-context, or the codebase.'
6
+ - 'Before finishing, update the feature journal and handoff.'
7
+
8
+ memories:
9
+ - 'Implementation must leave a continuation trail for the next agent.'
10
+ - 'Handoff quality is part of done.'
11
+
12
+ menu:
13
+ - trigger: implement-from-docs
14
+ action: '#implement-from-docs'
15
+ description: Implement using the project documentation as the source of truth
16
+
17
+ prompts:
18
+ - id: implement-from-docs
19
+ content: |
20
+ Implement the requested feature with minimal interruption.
21
+ 1. Read docs/index.md
22
+ 2. Read the relevant feature docs
23
+ 3. Read _bmad-output/project-context.md if present
24
+ 4. Implement
25
+ 5. Update journal.md and handoff.md with files changed, decisions, and next steps
@@ -0,0 +1,24 @@
1
+ # Merge this content into _bmad/_config/agents/bmm-pm.customize.yaml
2
+
3
+ critical_actions:
4
+ - 'Read docs/index.md before any planning activity.'
5
+ - 'If a feature is in scope, read docs/features/<feature>/index.md and handoff.md before asking the user anything.'
6
+ - 'Only ask the user questions when the answer cannot be derived from docs, _bmad-output artifacts, or the codebase.'
7
+
8
+ memories:
9
+ - 'This project uses a documentation-first continuation model.'
10
+ - 'Every planning output should reference where the next agent must continue reading.'
11
+
12
+ menu:
13
+ - trigger: resume-feature
14
+ action: '#resume-feature'
15
+ description: Resume a feature from project docs before planning
16
+
17
+ prompts:
18
+ - id: resume-feature
19
+ content: |
20
+ Resume the requested feature.
21
+ 1. Read docs/index.md
22
+ 2. Locate the feature folder in docs/features/
23
+ 3. Read index.md, handoff.md, and journal.md
24
+ 4. Summarize current state, unresolved questions, and next recommended action
@@ -0,0 +1,23 @@
1
+ # Merge this content into _bmad/_config/agents/bmm-qa.customize.yaml
2
+
3
+ critical_actions:
4
+ - 'Review docs before code review so documentation and code stay aligned.'
5
+ - 'Flag missing handoff or stale journal state as delivery risks.'
6
+
7
+ memories:
8
+ - 'Documentation drift is a quality issue.'
9
+ - 'Feature continuity is part of review.'
10
+
11
+ menu:
12
+ - trigger: sync-docs
13
+ action: '#sync-docs'
14
+ description: Validate that docs and code remain aligned
15
+
16
+ prompts:
17
+ - id: sync-docs
18
+ content: |
19
+ Validate documentation continuity.
20
+ 1. Read docs/index.md
21
+ 2. Read the target feature docs
22
+ 3. Compare with changed files and tests
23
+ 4. Report any mismatch, stale handoff, or undocumented decision
@@ -0,0 +1,151 @@
1
+ # Installation du portable overlay
2
+
3
+ ## Objectif
4
+
5
+ Installer cette surcouche dans un autre projet sans modifier le coeur de BMAD.
6
+
7
+ ## Prerequis
8
+
9
+ - BMAD deja installe dans le projet cible
10
+ - dossiers `_bmad` et `_bmad-output` presents
11
+
12
+ Package npm:
13
+
14
+ - `https://www.npmjs.com/package/bmad-overlay`
15
+
16
+ ## Ce que l'overlay ajoute
17
+
18
+ - un point d'entree orchestrateur
19
+ - des regles documentaires communes
20
+ - des snippets de customisation BMAD
21
+ - une structure `docs/` orientee reprise par agents
22
+ - un contrat d'intake commun
23
+
24
+ ## Modes de setup explicites
25
+
26
+ L'overlay peut etre installe dans 4 modes:
27
+
28
+ - `codex`
29
+ - prepare le runtime et les wrappers pour Codex
30
+ - `claude-code`
31
+ - prepare `CLAUDE.md`, le runtime et les wrappers Claude Code
32
+ - `bmad`
33
+ - prepare les snippets et le mapping vers les agents BMAD existants
34
+ - `full`
35
+ - installe les 3 couches ensemble
36
+
37
+ Le mapping BMAD utilise:
38
+
39
+ - `analysis` -> `bmad-analyst`
40
+ - `pm` -> `bmad-pm`
41
+ - `architecture` -> `bmad-architect`
42
+ - `delivery` -> `bmad-dev` / `bmad-sm` / `bmad-quick-flow-solo-dev`
43
+ - `qa-review` -> `bmad-qa` / `bmad-tech-writer`
44
+
45
+ Voir:
46
+
47
+ - `overlay/config/agent-map.yaml`
48
+
49
+ ## Installation recommandee
50
+
51
+ Commande standard:
52
+
53
+ ```bash
54
+ npx bmad-overlay --target ./projet-cible --mode full --merge-bmad true
55
+ ```
56
+
57
+ Cette commande doit couvrir le parcours normal:
58
+
59
+ - installer l'overlay dans le projet cible
60
+ - preparer `docs/` et les fichiers de bootstrap
61
+ - ajouter les wrappers `scripts/overlay-*.sh`
62
+ - appliquer le merge BMAD si demande
63
+
64
+ ## Installation manuelle
65
+
66
+ Utiliser ce mode seulement pour le developpement, le debug ou une integration tres controlee.
67
+
68
+ 1. Copier le dossier `overlay/` dans le projet cible
69
+ 2. Copier `overlay/templates/CLAUDE.md` vers `CLAUDE.md`
70
+ 3. Copier les templates `docs/` si le projet n'a pas deja une structure documentaire
71
+ 4. Fusionner les snippets de `overlay/customizations/` dans `_bmad/_config/agents/`
72
+ 5. Rejouer l'installation BMAD pour appliquer les customizations:
73
+
74
+ ```bash
75
+ npx bmad-method install
76
+ ```
77
+
78
+ ## Installation semi-automatique
79
+
80
+ Depuis le repo qui contient cet overlay:
81
+
82
+ ```bash
83
+ ./overlay/install/install-overlay.sh ./projet-cible full
84
+ ```
85
+
86
+ Le script:
87
+
88
+ - copie l'overlay
89
+ - cree `docs/` s'il manque
90
+ - cree `CLAUDE.md` si le mode le demande
91
+ - genere des wrappers `scripts/overlay-*.sh`
92
+ - copie les snippets BMAD et le mapping d'agents si le mode le demande
93
+ - ecrit `.overlay/setup.json`
94
+
95
+ Exemples:
96
+
97
+ ```bash
98
+ ./overlay/install/install-overlay.sh ./projet-cible codex
99
+ ./overlay/install/install-overlay.sh ./projet-cible claude-code
100
+ ./overlay/install/install-overlay.sh ./projet-cible bmad
101
+ ./overlay/install/install-overlay.sh ./projet-cible full
102
+ ```
103
+
104
+ ## Installation via NPX
105
+
106
+ Le point d'entree public est:
107
+
108
+ ```bash
109
+ npx bmad-overlay --target ./projet-cible --mode full
110
+ ```
111
+
112
+ Le binaire npm est defini dans:
113
+
114
+ - `overlay/package.json`
115
+
116
+ ## Merge BMAD plus propre
117
+
118
+ L'overlay fournit maintenant un mergeur idempotent pour les fichiers:
119
+
120
+ - `_bmad/_config/agents/bmm-pm.customize.yaml`
121
+ - `_bmad/_config/agents/bmm-dev.customize.yaml`
122
+ - `_bmad/_config/agents/bmm-qa.customize.yaml`
123
+
124
+ Usage direct:
125
+
126
+ ```bash
127
+ node overlay/install/merge-bmad-customizations.mjs --target ./projet-cible
128
+ ```
129
+
130
+ Ou via l'installeur:
131
+
132
+ ```bash
133
+ node overlay/install/install-overlay.mjs --target ./projet-cible --mode full --merge-bmad true
134
+ ```
135
+
136
+ Ou via le wrapper shell:
137
+
138
+ ```bash
139
+ ./overlay/install/install-overlay.sh ./projet-cible full true
140
+ ```
141
+
142
+ Le merge:
143
+
144
+ - ajoute les actions, memories, menu et prompts overlay
145
+ - evite les doublons exacts
146
+ - ne remplace pas la persona ni les champs agent existants
147
+
148
+ ## Limite volontaire
149
+
150
+ Le merge BMAD reste optionnel et explicite.
151
+ Cela evite d'ecraser des `.customize.yaml` deja adaptes dans un projet existant.
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from "child_process";
4
+ import path from "path";
5
+ import process from "process";
6
+
7
+ const ROOT = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..");
8
+ const cacheDir = "/tmp/bmad-overlay-npm-cache";
9
+
10
+ try {
11
+ execFileSync("npm", ["pack", "--dry-run"], {
12
+ cwd: ROOT,
13
+ stdio: "inherit",
14
+ env: {
15
+ ...process.env,
16
+ NPM_CONFIG_CACHE: cacheDir,
17
+ },
18
+ });
19
+ } catch (error) {
20
+ process.exit(error.status || 1);
21
+ }