create-byan-agent 2.25.0 → 2.26.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/CHANGELOG.md +155 -0
- package/README.md +9 -12
- package/install/bin/create-byan-agent-v2.js +29 -169
- package/install/lib/agent-generator.js +5 -5
- package/install/lib/byan-web-integration.js +1 -1
- package/install/lib/claude-native-setup.js +1 -1
- package/install/lib/phase2-chat.js +3 -10
- package/install/lib/platforms/claude-code.js +2 -2
- package/install/lib/platforms/index.js +0 -2
- package/install/lib/project-agents-generator.js +3 -3
- package/install/lib/staging-consent.js +3 -3
- package/install/lib/subagent-generator.js +3 -3
- package/install/lib/yanstaller/agent-launcher.js +1 -27
- package/install/lib/yanstaller/detector.js +4 -4
- package/install/lib/yanstaller/installer.js +0 -2
- package/install/lib/yanstaller/interviewer.js +1 -1
- package/install/lib/yanstaller/platform-selector.js +1 -13
- package/install/package.json +1 -1
- package/install/src/byan-v2/context/session-state.js +2 -2
- package/install/src/byan-v2/index.js +1 -5
- package/install/src/byan-v2/orchestrator/generation-state.js +4 -4
- package/install/src/webui/api.js +0 -2
- package/install/src/webui/chat/bridge.js +1 -13
- package/install/src/webui/chat/cli-detector.js +0 -23
- package/install/src/webui/public/app.js +1 -3
- package/install/src/webui/public/chat.html +0 -2
- package/install/src/webui/public/chat.js +0 -1
- package/install/src/webui/public/index.html +2 -2
- package/install/templates/.claude/CLAUDE.md +13 -2
- package/install/templates/.claude/agents/bmad-byan.md +1 -1
- package/install/templates/.claude/hooks/autobench-stop-guard.js +286 -0
- package/install/templates/.claude/hooks/fact-check-absolutes.js +1 -61
- package/install/templates/.claude/hooks/fact-check-claims.js +69 -0
- package/install/templates/.claude/hooks/fd-response-check.js +37 -46
- package/install/templates/.claude/hooks/inject-soul.js +64 -25
- package/install/templates/.claude/hooks/leantime-fd-sync.js +216 -0
- package/install/templates/.claude/hooks/lib/autobench-config.json +81 -0
- package/install/templates/.claude/hooks/lib/autobench-fc-enrich.js +251 -0
- package/install/templates/.claude/hooks/lib/autobench-ledger-report.js +253 -0
- package/install/templates/.claude/hooks/lib/autobench-runtime.js +199 -0
- package/install/templates/.claude/hooks/lib/fact-check-core.js +69 -0
- package/install/templates/.claude/hooks/lib/transcript-read.js +137 -0
- package/install/templates/.claude/hooks/soul-memory-check.js +49 -25
- package/install/templates/.claude/hooks/soul-memory-triggers.js +27 -8
- package/install/templates/.claude/hooks/stage-to-byan.js +25 -7
- package/install/templates/.claude/hooks/strict-stop-guard.js +4 -16
- package/install/templates/.claude/rules/benchmark.md +251 -0
- package/install/templates/.claude/rules/byan-agents.md +0 -1
- package/install/templates/.claude/rules/byan-api.md +64 -0
- package/install/templates/.claude/rules/fact-check.md +1 -1
- package/install/templates/.claude/rules/strict-mode.md +10 -9
- package/install/templates/.claude/settings.json +12 -0
- package/install/templates/.claude/skills/byan-benchmark/SKILL.md +159 -0
- package/install/templates/.claude/skills/byan-byan/SKILL.md +73 -12
- package/install/templates/.claude/skills/byan-fact-check/SKILL.md +1 -1
- package/install/templates/.claude/skills/byan-hermes-dispatch/SKILL.md +5 -6
- package/install/templates/.claude/skills/byan-orchestrate/SKILL.md +11 -3
- package/install/templates/.claude/skills/byan-strict/SKILL.md +4 -1
- package/install/templates/.claude/workflows/INDEX.md +2 -1
- package/install/templates/.claude/workflows/byan-benchmark.js +328 -0
- package/install/templates/_byan/_config/agent-manifest.csv +1 -1
- package/install/templates/_byan/_config/autobench.yaml +510 -0
- package/install/templates/_byan/_config/strict-mode.yaml +9 -3
- package/install/templates/_byan/_config/workflow-manifest.csv +1 -0
- package/install/templates/_byan/agent/byan/byan.md +1 -3
- package/install/templates/_byan/agent/byan-flat/byan.md +1 -3
- package/install/templates/_byan/agent/byan-test/byan-test.md +2 -2
- package/install/templates/_byan/agent/byan-test-flat/byan-test.md +2 -2
- package/install/templates/_byan/agent/byan.optimized/byan.optimized.md +2 -2
- package/install/templates/_byan/agent/byan.optimized-v2/byan.optimized-v2.md +2 -2
- package/install/templates/_byan/agent/claude/claude.md +0 -2
- package/install/templates/_byan/agent/codex/codex.md +0 -2
- package/install/templates/_byan/agent/rachid/rachid.md +2 -10
- package/install/templates/_byan/agent/rachid-flat/rachid.md +2 -11
- package/install/templates/_byan/agent/turbo-whisper/turbo-whisper.md +2 -5
- package/install/templates/_byan/agent/turbo-whisper-integration/turbo-whisper-integration.md +5 -13
- package/install/templates/_byan/agent/yanstaller/yanstaller.md +2 -24
- package/install/templates/_byan/config.yaml +0 -1
- package/install/templates/_byan/mcp/byan-mcp-server/bin/byan-sync-rules.js +20 -4
- package/install/templates/_byan/mcp/byan-mcp-server/lib/advisory-autofeed.js +13 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/index-generator.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/kanban.js +6 -3
- package/install/templates/_byan/mcp/byan-mcp-server/lib/leantime-fd-core.js +205 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/leantime-sync.js +415 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/precommit-gate.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/strict-activation.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/strict-mode.js +8 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/sync-rules.js +172 -23
- package/install/templates/_byan/mcp/byan-mcp-server/lib/workflows-generator.js +1 -0
- package/install/templates/_byan/mcp/byan-mcp-server/server.js +205 -82
- package/install/templates/_byan/worker/launchers/README.md +4 -24
- package/install/templates/_byan/worker/workers.md +0 -2
- package/install/templates/_byan/workflow/simple/bmb/byan-benchmark/workflow.md +86 -0
- package/install/templates/docs/leantime-integration.md +160 -0
- package/package.json +3 -7
- package/src/byan-v2/context/session-state.js +2 -2
- package/src/byan-v2/generation/mantra-validator.js +3 -3
- package/src/byan-v2/index.js +1 -5
- package/src/byan-v2/integration/voice-integration.js +1 -1
- package/src/byan-v2/orchestrator/generation-state.js +4 -4
- package/src/staging/staging.js +20 -6
- package/install/bin/build-copilot-stubs.js +0 -138
- package/install/lib/platforms/copilot-cli.js +0 -123
- package/install/lib/platforms/vscode.js +0 -51
- package/install/src/byan-v2/context/copilot-context.js +0 -79
- package/install/src/webui/chat/copilot-adapter.js +0 -68
- package/install/templates/.claude/agents/bmad-marc.md +0 -25
- package/install/templates/.claude/skills/byan-marc/SKILL.md +0 -20
- package/install/templates/.github/agents/bmad-agent-bmad-master.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-agent-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-module-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-analyst.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-architect.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-dev.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-pm.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-quinn.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-sm.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-tech-writer.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-ux-designer.md +0 -16
- package/install/templates/.github/agents/bmad-agent-byan-test.md +0 -33
- package/install/templates/.github/agents/bmad-agent-byan-v2.md +0 -44
- package/install/templates/.github/agents/bmad-agent-byan.md +0 -1062
- package/install/templates/.github/agents/bmad-agent-carmack.md +0 -14
- package/install/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-presentation-master.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-storyteller.md +0 -16
- package/install/templates/.github/agents/bmad-agent-claude.md +0 -49
- package/install/templates/.github/agents/bmad-agent-codex.md +0 -49
- package/install/templates/.github/agents/bmad-agent-drawio.md +0 -45
- package/install/templates/.github/agents/bmad-agent-fact-checker.md +0 -16
- package/install/templates/.github/agents/bmad-agent-forgeron.md +0 -15
- package/install/templates/.github/agents/bmad-agent-jimmy.md +0 -15
- package/install/templates/.github/agents/bmad-agent-marc.md +0 -49
- package/install/templates/.github/agents/bmad-agent-mike.md +0 -15
- package/install/templates/.github/agents/bmad-agent-patnote.md +0 -49
- package/install/templates/.github/agents/bmad-agent-rachid.md +0 -48
- package/install/templates/.github/agents/bmad-agent-skeptic.md +0 -16
- package/install/templates/.github/agents/bmad-agent-tao.md +0 -14
- package/install/templates/.github/agents/bmad-agent-tea-tea.md +0 -16
- package/install/templates/.github/agents/bmad-agent-test-dynamic.md +0 -22
- package/install/templates/.github/agents/bmad-agent-yanstaller-interview.md +0 -50
- package/install/templates/.github/agents/bmad-agent-yanstaller-phase2.md +0 -189
- package/install/templates/.github/agents/bmad-agent-yanstaller.md +0 -350
- package/install/templates/.github/agents/expert-merise-agile.md +0 -178
- package/install/templates/.github/agents/franck.md +0 -379
- package/install/templates/.github/agents/hermes.md +0 -575
- package/install/templates/.github/extensions/byan-staging/extension.mjs +0 -169
- package/install/templates/.github/extensions/byan-staging/package.json +0 -8
- package/install/templates/_byan/agent/marc/marc-soul.md +0 -47
- package/install/templates/_byan/agent/marc/marc-tao.md +0 -77
- package/install/templates/_byan/agent/marc/marc.md +0 -324
- package/install/templates/_byan/agent/marc-flat/marc.md +0 -387
- package/install/templates/_byan/mcp/byan-mcp-server/lib/copilot.js +0 -148
- package/install/templates/_byan/worker/launchers/launch-yanstaller-copilot.md +0 -173
- package/install/templates/workers/cost-optimizer.js +0 -169
- package/src/byan-v2/context/copilot-context.js +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,161 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [2.26.0] - 2026-06-16
|
|
13
|
+
|
|
14
|
+
### Added - Leantime FD auto-sync hook (FD lifecycle -> board, automatic)
|
|
15
|
+
|
|
16
|
+
The FD -> Leantime mirror is now AUTOMATIC. A `PostToolUse` hook
|
|
17
|
+
(`.claude/hooks/leantime-fd-sync.js`, registered in `.claude/settings.json`) fires
|
|
18
|
+
after `byan_fd_advance` / `byan_fd_update` and drives the board with no agent
|
|
19
|
+
action: it ensures the project at DISCOVERY, creates one task per backlog feature
|
|
20
|
+
at DISPATCH, and moves tasks through `todo -> doing -> blocked/review -> done` as
|
|
21
|
+
the FD advances. This supersedes the hand-driven section 2.5 fire points (which
|
|
22
|
+
the agent had to run by hand and could skip).
|
|
23
|
+
|
|
24
|
+
- **Pure core** (`_byan/mcp/byan-mcp-server/lib/leantime-fd-core.js`):
|
|
25
|
+
`decideActions` maps a phase transition + the sidecar to ordered Leantime
|
|
26
|
+
intents; unit-tested for every transition. The hook is a thin I/O shell that
|
|
27
|
+
executes them.
|
|
28
|
+
- **Best-effort + bounded**: the hook exits 0 in every path (a sync issue does
|
|
29
|
+
not block the turn), no-ops when Leantime is off, self-heals a dropped call on
|
|
30
|
+
the next phase event (a per-call timeout + a hook wall-clock budget), and logs
|
|
31
|
+
every attempt to `.byan-leantime/sync.jsonl`.
|
|
32
|
+
- **Idempotence**: a gitignored sidecar (`.byan-leantime/map.json`, keyed by
|
|
33
|
+
fd_id) is the single id ledger — a REFACTOR loop re-builds without duplicating a
|
|
34
|
+
project or task. The hook does not write `fd-state.json` (state-coupling).
|
|
35
|
+
- **Human visibility** (`assignUserToProject` + `LEANTIME_ASSIGN_USER_ID`): an
|
|
36
|
+
API-created project is owned by the API service user and hidden from a person's
|
|
37
|
+
project selector; the hook relates the configured human so the board shows up.
|
|
38
|
+
The underlying Leantime RPC reconciles a user's whole project list, so the
|
|
39
|
+
assign reads the full list first and writes the union (fail-closed if that read
|
|
40
|
+
is incomplete) to avoid unassigning the user's other projects.
|
|
41
|
+
|
|
42
|
+
### Added - Leantime project-management integration (one-way FD -> board)
|
|
43
|
+
|
|
44
|
+
BYAN can now mirror its Feature Development lifecycle onto a self-hosted Leantime
|
|
45
|
+
instance. When `LEANTIME_API_URL` + `LEANTIME_API_TOKEN` are configured, the FD
|
|
46
|
+
phases drive a Leantime project and one task per backlog feature ; when absent,
|
|
47
|
+
the tools report disabled and FD proceeds unchanged. The sync is one direction
|
|
48
|
+
(FD -> Leantime) and best-effort : a down or misconfigured Leantime degrades to
|
|
49
|
+
`{ synced:false, reason }` and does not block a phase transition.
|
|
50
|
+
|
|
51
|
+
- **Client** (`_byan/mcp/byan-mcp-server/lib/leantime-sync.js`): a JSON-RPC 2.0
|
|
52
|
+
client for `<base>/api/jsonrpc`, authenticated by the Leantime-native
|
|
53
|
+
`x-api-key` header (kept distinct from the byan_web `ApiKey/Bearer` scheme).
|
|
54
|
+
Best-effort and does not throw, with an `AbortController` timeout and a
|
|
55
|
+
non-JSON-200 guard that rejects an HTML login body (the wrong-host lesson)
|
|
56
|
+
instead of reading it as an empty board. Business fns: `ensureProject`
|
|
57
|
+
(idempotent by name), `createTask`, `moveTask`, `assignTask`, `getTask`,
|
|
58
|
+
`getBoard`, plus `resolveStatusMap` / `resolveClientId` / `resolveEditorId`.
|
|
59
|
+
- **MCP tools** (7): `byan_leantime_ping`, `byan_leantime_project_ensure`,
|
|
60
|
+
`byan_leantime_task_create`, `byan_leantime_task_move`,
|
|
61
|
+
`byan_leantime_task_assign`, `byan_leantime_task_get`,
|
|
62
|
+
`byan_leantime_board_get`. All but `ping` pass through `requireLeantime()`.
|
|
63
|
+
- **FD wiring** (`.claude/skills/byan-byan/SKILL.md` section 2.5): fire points
|
|
64
|
+
DISCOVERY -> project_ensure, DISPATCH -> task_create per feature, BUILD ->
|
|
65
|
+
doing, REVIEW/VALIDATE-KO -> blocked, VALIDATE-OK -> review, DOC -> done.
|
|
66
|
+
Leantime ids persist into fd-state (`project_context.leantime.projectId`,
|
|
67
|
+
backlog `leantime.taskId`) so a REFACTOR loop reuses tasks instead of
|
|
68
|
+
duplicating them.
|
|
69
|
+
- **Status mapping**: the canonical FD columns (`todo|doing|blocked|review|done`)
|
|
70
|
+
resolve to per-project Leantime status ids at call time, with a conservative
|
|
71
|
+
fallback when the labels cannot be read.
|
|
72
|
+
- **Tests**: `test/leantime-sync.test.js` (14 cases: auth header, non-JSON guard,
|
|
73
|
+
timeout, idempotence, column resolution) + `test/leantime-tools.test.js`
|
|
74
|
+
(the 7-tool declaration/handler surface in server.js).
|
|
75
|
+
- **Docs**: `.claude/rules/byan-api.md` section 8 (the `byan_leantime_*` family +
|
|
76
|
+
the wrong-host lesson).
|
|
77
|
+
- **Pending**: the live wire-format verification (one real POST with a Leantime
|
|
78
|
+
PAT, to confirm `params:{values:{}}` wrapping against the running instance) is
|
|
79
|
+
a documented follow-up ; the tested format follows the Leantime master source.
|
|
80
|
+
|
|
81
|
+
### Removed - GitHub Copilot CLI + VSCode dropped as target platforms (3 -> 2)
|
|
82
|
+
|
|
83
|
+
BYAN now targets two platforms: Claude Code and Codex. GitHub Copilot CLI and
|
|
84
|
+
the VSCode extension are no longer install targets. This is a breaking change for
|
|
85
|
+
anyone who relied on the Copilot/VSCode output.
|
|
86
|
+
|
|
87
|
+
- **Install path** (`npx create-byan-agent`): the platform menu, auto-select, and
|
|
88
|
+
generated stubs cover Claude Code + Codex only. The `byan_copilot_*` MCP tool
|
|
89
|
+
family and the `marc` Copilot-oriented agent were removed in the core pass
|
|
90
|
+
(commit `0f06cf8`).
|
|
91
|
+
- **Web UI** (ships on npm via `install/src/webui`): the chat CLI selector, the
|
|
92
|
+
`cli-detector` definitions, the platform-detection list, and the marketing copy
|
|
93
|
+
drop Copilot and VSCode; the `copilot-adapter` bridge and its `createBridge`
|
|
94
|
+
case are gone (`createBridge('copilot')` now rejects with `Unknown CLI adapter`).
|
|
95
|
+
- **Dead code**: both shipped copies of the orphaned `copilot-context` module
|
|
96
|
+
(`src/byan-v2/context/` and `install/src/byan-v2/context/`) and two stale
|
|
97
|
+
non-jest harnesses (`test-byan-v2-workflow.js`, `test-workflow-simple.js`) were
|
|
98
|
+
deleted.
|
|
99
|
+
- **Note**: the `byan-loadbalancer` Copilot *provider* (an LLM backend, not an
|
|
100
|
+
install target) is unaffected and stays.
|
|
101
|
+
|
|
102
|
+
### Added - Auto-Benchmark: native sourced decision benchmarks (C1-C5)
|
|
103
|
+
|
|
104
|
+
When the agent is about to ask you to choose between options, it now benchmarks
|
|
105
|
+
the fork by default: one compact `Option | criteria | Niv` table with a best-first
|
|
106
|
+
recommendation, sourced and confidence-tagged, at the right level of detail — so
|
|
107
|
+
you no longer have to ask each time. Two layers cover this honestly (Claude Code
|
|
108
|
+
exposes no pre-display interception hook today, GH #28273):
|
|
109
|
+
|
|
110
|
+
- **Proactive doctrine** (the broadly-portable layer). The full doctrine lives in
|
|
111
|
+
`.claude/rules/benchmark.md`, generated from the single source of truth
|
|
112
|
+
`_byan/_config/autobench.yaml` by `byan-sync-rules`, and a lean pointer is
|
|
113
|
+
upserted cross-platform into `.claude/CLAUDE.md`, `AGENTS.md`, and
|
|
114
|
+
`.github/copilot-instructions.md` (idempotent `BYAN-AUTOBENCH` markers). It
|
|
115
|
+
covers the TRIGGER 2-gate rule (>= 2 non-substitutable options diverging on
|
|
116
|
+
>= 1 weighted criterion) + the exemption list (y/n confirms, destructive
|
|
117
|
+
prompts) + internal/external routing + a verbatim few-shot decision tree, the
|
|
118
|
+
SCALER 5-level evidence rubric + strict-domain floors + the link-only-if-WebFetch
|
|
119
|
+
rule, the FORMAT compact table with hard caps (<= 4 options / <= 4 criteria /
|
|
120
|
+
<= 3 links) + collapse-the-degenerate + `[bench:expand]` opt-in, and the
|
|
121
|
+
ANTI-BLOAT latency guard + escape-hatch + no-re-benchmark.
|
|
122
|
+
- **Reactive Stop hook** (`.claude/hooks/autobench-stop-guard.js`), the safety
|
|
123
|
+
net. It **ships DISARMED**: it observes and ledgers every turn but stays inert
|
|
124
|
+
(does not block) until you opt in — set `enforcement.armed: true` in
|
|
125
|
+
`_byan/_config/autobench.yaml` and run `byan-sync-rules` (config-only; there is
|
|
126
|
+
no loose flag file) — so day one is zero noise / zero latency.
|
|
127
|
+
Detection is **artifact-primary**: a real fork is recognized from an
|
|
128
|
+
`AskUserQuestion` tool_use in the finished turn, with the choice-language regex
|
|
129
|
+
as a last-resort fallback. Block-once is content-hashed (no loop); a session
|
|
130
|
+
escape-hatch (`touch .byan-autobench/off`) plus a cross-session toggle suppress
|
|
131
|
+
it.
|
|
132
|
+
- **Tooling.** A `byan-benchmark` skill (conductor) and a DATA-only native
|
|
133
|
+
workflow (`.claude/workflows/byan-benchmark.js`), both registered in the
|
|
134
|
+
workflow manifest / PORTABLE bucket / INDEX. A BYAN-only opt-in layer enriches
|
|
135
|
+
the matrix via `byan_fc_check`. Every fire/miss is audited to
|
|
136
|
+
`_byan-output/benchmark-ledger.jsonl`.
|
|
137
|
+
|
|
138
|
+
### Added - byan-install-core (F1): headless, deterministic install engine
|
|
139
|
+
|
|
140
|
+
First feature of the installer refactor (FD lot 1). A new internal workspace
|
|
141
|
+
package `byan-install-core` (`install/packages/install-core/`) that replaces the
|
|
142
|
+
LLM-driven AUTO interview with a deterministic engine. It is the shared core both
|
|
143
|
+
front-ends bind to: the npm CLI wizard (F2, next) and the Electron app (F5).
|
|
144
|
+
|
|
145
|
+
- **Four-verb lifecycle.** `detect(opts)` builds a serializable MachineProfile
|
|
146
|
+
(os, arch, node, npm, git, claude, codex) and is spawn-free by default
|
|
147
|
+
(`probeVersions` is opt-in). `plan(profile, answers)` is pure and turns the
|
|
148
|
+
non-interactive answers contract into an ordered InstallPlan. `apply(plan, opts)`
|
|
149
|
+
is the only mutator. `verify(plan|target)` is read-only.
|
|
150
|
+
- **No LLM, no `which`.** Detection uses a pure-Node PATH walk (`lookpath`,
|
|
151
|
+
honoring Windows PATHEXT); recommendations come from a versioned JSON decision
|
|
152
|
+
table (`data/recommender.json`), not a model call.
|
|
153
|
+
- **Per-OS env + validate-or-die .mcp.json.** `env-writer` and `mcp-renderer`
|
|
154
|
+
reuse the existing `byan-platform-config` package (idempotent marker blocks;
|
|
155
|
+
a config is parsed and validated before any write, so a broken file is not
|
|
156
|
+
emitted on an invalid input).
|
|
157
|
+
- **Per-user install, no sudo.** `--install-cli claude|codex` installs via
|
|
158
|
+
`npm -g`; the AUTH step is an explicit handoff (the engine returns the manual
|
|
159
|
+
command and reports a pending state rather than a fake authenticated success).
|
|
160
|
+
- **ES5 preflight.** `byan-install-core/preflight` is a dependency-free, ES5-only
|
|
161
|
+
entry a launcher can require on an ancient Node to gate the version before any
|
|
162
|
+
modern module loads.
|
|
163
|
+
- Tests: 9 suites / 161 tests for the package; full repo suite green
|
|
164
|
+
(no regression). The CLI wizard, `doctor`, journal/resume and the v2.19
|
|
165
|
+
`--yes` end-to-end snapshot land in the following features (F2, F3).
|
|
166
|
+
|
|
12
167
|
## [2.25.0] - 2026-06-09
|
|
13
168
|
|
|
14
169
|
### Added - Advisory auto-feed (BYAN learns from each session, automatically)
|
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ Diversifier les personas elargit la surface de competence collective.
|
|
|
69
69
|
|
|
70
70
|
- Node.js >= 12.0.0
|
|
71
71
|
- npm >= 6.0.0
|
|
72
|
-
- Un compte
|
|
72
|
+
- Un compte Claude Code ou Codex (selon la plateforme cible)
|
|
73
73
|
|
|
74
74
|
### Installation rapide (recommandée)
|
|
75
75
|
|
|
@@ -89,7 +89,7 @@ L'installeur (Yanstaller) vous guide interactivement à travers le processus :
|
|
|
89
89
|
```
|
|
90
90
|
? Nom du projet : mon-projet
|
|
91
91
|
? Langue de communication : Francais
|
|
92
|
-
? Plateforme cible :
|
|
92
|
+
? Plateforme cible : Claude Code
|
|
93
93
|
? Activer le fact-check scientifique ? [Y/n]
|
|
94
94
|
? Activer le système ELO de confiance ? [Y/n]
|
|
95
95
|
? Optimiser les coûts LLM automatiquement (~54% d'économies) ? [Y/n]
|
|
@@ -108,7 +108,6 @@ votre-projet/
|
|
|
108
108
|
workflows/ # Workflows guidés
|
|
109
109
|
knowledge/ # Base de connaissances sources (axiomes, benchmarks)
|
|
110
110
|
config.yaml # Configuration principale (langue, utilisateur, chemins)
|
|
111
|
-
.github/agents/ # Wrappers GitHub Copilot CLI
|
|
112
111
|
.claude/ # Intégration Claude Code (si activée)
|
|
113
112
|
.codex/ # Intégration Codex/OpenCode (si activée)
|
|
114
113
|
bin/byan-v2-cli.js # CLI BYAN
|
|
@@ -164,7 +163,7 @@ const ctx = byan.getClaimContext('security');
|
|
|
164
163
|
console.log('Scaffold level :', ctx.scaffoldLevel);
|
|
165
164
|
```
|
|
166
165
|
|
|
167
|
-
### Activer les agents dans
|
|
166
|
+
### Activer les agents dans Claude Code ou Codex
|
|
168
167
|
|
|
169
168
|
Une fois installé, les agents sont disponibles via `@agent-name` :
|
|
170
169
|
|
|
@@ -183,7 +182,7 @@ Une fois installé, les agents sont disponibles via `@agent-name` :
|
|
|
183
182
|
|
|
184
183
|
## Liste des Agents Disponibles
|
|
185
184
|
|
|
186
|
-
BYAN contient **
|
|
185
|
+
BYAN contient **26 agents spécialisés** organisés en **5 modules** :
|
|
187
186
|
|
|
188
187
|
### Core — Fondation de la Plateforme
|
|
189
188
|
|
|
@@ -203,7 +202,6 @@ BYAN contient **27 agents spécialisés** organisés en **5 modules** :
|
|
|
203
202
|
| **agent-builder** | Bond | Expert en construction d'agents BMAD-compliant | Construire un agent complexe manuellement |
|
|
204
203
|
| **module-builder** | Morgan | Architecte de modules BYAN complets | Créer un nouveau module métier |
|
|
205
204
|
| **workflow-builder** | Wendy | Designer de workflows guidés | Concevoir un processus multi-étapes |
|
|
206
|
-
| **marc** | Spécialiste | Intégration GitHub Copilot CLI | Déployer des agents sur Copilot |
|
|
207
205
|
| **rachid** | Spécialiste | Déploiement npm/npx | Publier un package BYAN |
|
|
208
206
|
| **carmack** | Optimiseur | Optimisation tokens (-46%) | Réduire le coût d'utilisation des agents |
|
|
209
207
|
| **patnote** | Gestionnaire | Mises à jour BYAN et résolution de conflits | Mettre à jour un projet BYAN existant |
|
|
@@ -274,7 +272,7 @@ Un agent est un spécialiste IA avec une identité définie. Il possède :
|
|
|
274
272
|
- **Rules** : les contraintes absolues qu'il ne peut pas violer (les 71 mantras)
|
|
275
273
|
- **Capabilities** : ce qu'il peut faire, ce qu'il ne fait pas
|
|
276
274
|
|
|
277
|
-
Les agents sont définis en Markdown avec des sections XML. Ils sont stockés dans `_byan/{module}/agents/` et exposés sur chaque plateforme via un wrapper léger (`.
|
|
275
|
+
Les agents sont définis en Markdown avec des sections XML. Ils sont stockés dans `_byan/{module}/agents/` et exposés sur chaque plateforme via un wrapper léger (`.claude/`, `.codex/prompts/`).
|
|
278
276
|
|
|
279
277
|
### Workflow
|
|
280
278
|
|
|
@@ -432,7 +430,7 @@ Domaines stricts : `security` / `performance` / `compliance` → LEVEL-2 minimum
|
|
|
432
430
|
|
|
433
431
|
Mode d'enforcement qui empêche l'agent de livrer moins que demandé (un MVP au
|
|
434
432
|
lieu de l'app prod, un stub au lieu de la feature, un template baclé). Actif sur
|
|
435
|
-
les **
|
|
433
|
+
les **2 plateformes** : Claude Code, Codex.
|
|
436
434
|
|
|
437
435
|
```
|
|
438
436
|
1. Lock du scope byan_strict_lock_scope (scope verbatim + critères testables)
|
|
@@ -442,8 +440,8 @@ les **3 plateformes** : Claude Code, Codex, GitHub Copilot.
|
|
|
442
440
|
```
|
|
443
441
|
|
|
444
442
|
Le commit est **bloqué** par un filet pre-commit tant que la session strict
|
|
445
|
-
engagée n'est pas complétée correctement — y compris pour Codex
|
|
446
|
-
n'
|
|
443
|
+
engagée n'est pas complétée correctement — y compris pour Codex qui
|
|
444
|
+
n'a pas de hook in-session. Source de vérité unique :
|
|
447
445
|
`_byan/_config/strict-mode.yaml`, régénérée via `byan-sync-rules`.
|
|
448
446
|
|
|
449
447
|
Activation : `byan_fd_start strict:true`, skill `byan-strict`, ou auto-détection
|
|
@@ -466,7 +464,7 @@ sur mots-clés (`prod`, `client`, `livrable`, `contrat`, `release`...).
|
|
|
466
464
|
| `testarch-atdd` | Générer des tests ATDD avant implémentation | tea |
|
|
467
465
|
| `fact-check` | Analyser une assertion ou un document | fact-checker |
|
|
468
466
|
| `elo-workflow` | Consulter et gérer le score de confiance ELO | byan |
|
|
469
|
-
| `byan-sync-rules` | Régénérer les artefacts du mode strict (
|
|
467
|
+
| `byan-sync-rules` | Régénérer les artefacts du mode strict (2 plateformes) | byan |
|
|
470
468
|
|
|
471
469
|
---
|
|
472
470
|
|
|
@@ -474,7 +472,6 @@ sur mots-clés (`prod`, `client`, `livrable`, `contrat`, `release`...).
|
|
|
474
472
|
|
|
475
473
|
| Plateforme | Invocation | Chemin de config |
|
|
476
474
|
|------------|-----------|------------------|
|
|
477
|
-
| GitHub Copilot CLI | `@agent-name` | `.github/agents/*.md` |
|
|
478
475
|
| Claude Code | `@agent-name` | `.claude/rules/*.md` |
|
|
479
476
|
| Codex / OpenCode | `@agent-name` | `.codex/prompts/*.md` |
|
|
480
477
|
| CLI direct | `node bin/byan-v2-cli.js` | `_byan/config.yaml` |
|
|
@@ -177,31 +177,10 @@ async function copyV2Runtime(templateDir, projectRoot, spinner) {
|
|
|
177
177
|
// Detects SYSTEM binaries, not project folders (.codex, .github/agents are created by yanstaller)
|
|
178
178
|
async function detectPlatforms() {
|
|
179
179
|
const platforms = {
|
|
180
|
-
copilot: false,
|
|
181
180
|
codex: false,
|
|
182
181
|
claude: false
|
|
183
182
|
};
|
|
184
|
-
|
|
185
|
-
// GitHub Copilot CLI detection (binary + config)
|
|
186
|
-
try {
|
|
187
|
-
const result = execSync('which copilot 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
188
|
-
if (result) {
|
|
189
|
-
platforms.copilot = true;
|
|
190
|
-
}
|
|
191
|
-
} catch (e) {
|
|
192
|
-
// Fallback: check config directory (means it was installed)
|
|
193
|
-
const copilotPaths = [
|
|
194
|
-
path.join(os.homedir(), '.config', 'github-copilot'),
|
|
195
|
-
path.join(os.homedir(), '.config', 'copilot')
|
|
196
|
-
];
|
|
197
|
-
for (const p of copilotPaths) {
|
|
198
|
-
if (fs.existsSync(p)) {
|
|
199
|
-
platforms.copilot = true;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
183
|
+
|
|
205
184
|
// Codex detection (binary + config, NOT project .codex/ folder)
|
|
206
185
|
try {
|
|
207
186
|
const result = execSync('which codex 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
@@ -393,7 +372,6 @@ async function install(options = {}) {
|
|
|
393
372
|
platformSpinner.succeed('Platform detection complete');
|
|
394
373
|
|
|
395
374
|
console.log(chalk.cyan('\n📦 Installed Platforms:'));
|
|
396
|
-
console.log(` GitHub Copilot CLI: ${detectedPlatforms.copilot ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
397
375
|
console.log(` OpenAI Codex: ${detectedPlatforms.codex ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
398
376
|
console.log(` Claude Code: ${detectedPlatforms.claude ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
399
377
|
console.log('');
|
|
@@ -440,12 +418,10 @@ async function install(options = {}) {
|
|
|
440
418
|
|
|
441
419
|
// Step 1: Select target platform(s)
|
|
442
420
|
const availableManualPlatforms = [];
|
|
443
|
-
if (detectedPlatforms.copilot) availableManualPlatforms.push({ name: '🤖 GitHub Copilot CLI (agents: .github/agents/)', value: 'copilot' });
|
|
444
421
|
if (detectedPlatforms.codex) availableManualPlatforms.push({ name: '🔷 OpenAI Codex (skills: .codex/prompts/)', value: 'codex' });
|
|
445
422
|
if (detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (rules: .claude/)', value: 'claude' });
|
|
446
423
|
|
|
447
424
|
// Always allow manual selection even if not detected
|
|
448
|
-
if (!detectedPlatforms.copilot) availableManualPlatforms.push({ name: '🤖 GitHub Copilot CLI (not detected)', value: 'copilot' });
|
|
449
425
|
if (!detectedPlatforms.codex) availableManualPlatforms.push({ name: '🔷 OpenAI Codex (not detected)', value: 'codex' });
|
|
450
426
|
if (!detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (not detected)', value: 'claude' });
|
|
451
427
|
|
|
@@ -471,7 +447,6 @@ async function install(options = {}) {
|
|
|
471
447
|
],
|
|
472
448
|
'Core - Platform Specialists': (() => {
|
|
473
449
|
const specialists = [];
|
|
474
|
-
if (manualPlatforms.includes('copilot')) specialists.push({ name: 'marc', label: 'Marc - GitHub Copilot CLI Specialist [workflow agent]', checked: true });
|
|
475
450
|
if (manualPlatforms.includes('claude')) specialists.push({ name: 'claude', label: 'Claude - Claude Code Integration Specialist [workflow agent]', checked: true });
|
|
476
451
|
if (manualPlatforms.includes('codex')) specialists.push({ name: 'codex', label: 'Codex - OpenCode/Codex Integration Specialist [workflow agent]', checked: true });
|
|
477
452
|
return specialists;
|
|
@@ -656,7 +631,7 @@ async function install(options = {}) {
|
|
|
656
631
|
// Build prompt for yanstaller agent with interview data + detected platforms
|
|
657
632
|
const interviewPrompt = [
|
|
658
633
|
`Analyse ce profil utilisateur et retourne UNIQUEMENT un JSON de recommandations.`,
|
|
659
|
-
`DETECTED PLATFORMS:
|
|
634
|
+
`DETECTED PLATFORMS: codex=${detectedPlatforms.codex}, claude=${detectedPlatforms.claude}`,
|
|
660
635
|
`PROJECT: type=${interviewAnswers.projectType}, domain=${interviewAnswers.domain}`,
|
|
661
636
|
`OBJECTIVES: ${interviewAnswers.objectives.join(',')}`,
|
|
662
637
|
`TEAM: ${interviewAnswers.teamSize}, EXPERIENCE: ${interviewAnswers.experience}`,
|
|
@@ -671,19 +646,9 @@ async function install(options = {}) {
|
|
|
671
646
|
|
|
672
647
|
// Calculate model for interview analysis based on complexity
|
|
673
648
|
const interviewComplexity = interviewAnswers.quality === 'critical' ? 'claude-haiku-4.5' : 'gpt-5-mini';
|
|
674
|
-
|
|
675
|
-
// Pre-copy interview-only agent stub for Copilot CLI (requires .github/agents/ in CWD)
|
|
676
|
-
// This stub is self-contained - no external workflow references
|
|
649
|
+
|
|
677
650
|
// Codex and Claude use direct prompt execution, no agent stub needed
|
|
678
|
-
|
|
679
|
-
const earlyGithubDir = path.join(projectRoot, '.github', 'agents');
|
|
680
|
-
const interviewAgentSource = path.join(templateDir, '.github', 'agents', 'bmad-agent-yanstaller-interview.md');
|
|
681
|
-
if (await fs.pathExists(interviewAgentSource)) {
|
|
682
|
-
await fs.ensureDir(earlyGithubDir);
|
|
683
|
-
await fs.copy(interviewAgentSource, path.join(earlyGithubDir, 'bmad-agent-yanstaller-interview.md'), { overwrite: true });
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
|
|
651
|
+
|
|
687
652
|
// Write prompt to temp file to avoid shell escaping issues
|
|
688
653
|
const promptFile = path.join(projectRoot, '.yanstaller-prompt.tmp');
|
|
689
654
|
await fs.writeFile(promptFile, interviewPrompt, 'utf8');
|
|
@@ -693,7 +658,7 @@ async function install(options = {}) {
|
|
|
693
658
|
const promptContent = await fs.readFile(promptFile, 'utf8');
|
|
694
659
|
let hasAgent = false;
|
|
695
660
|
|
|
696
|
-
if (detectedPlatforms.
|
|
661
|
+
if (detectedPlatforms.codex || detectedPlatforms.claude) {
|
|
697
662
|
hasAgent = true;
|
|
698
663
|
const agentSpinner = ora(`Analysing with yanstaller agent (${interviewComplexity})...`).start();
|
|
699
664
|
|
|
@@ -708,14 +673,7 @@ async function install(options = {}) {
|
|
|
708
673
|
if (isWindows) spawnOpts.shell = true;
|
|
709
674
|
|
|
710
675
|
let res;
|
|
711
|
-
if (detectedPlatforms.
|
|
712
|
-
res = spawnSync('copilot', [
|
|
713
|
-
'--agent=bmad-agent-yanstaller-interview',
|
|
714
|
-
'-p', promptContent,
|
|
715
|
-
'--model', interviewComplexity,
|
|
716
|
-
'-s'
|
|
717
|
-
], spawnOpts);
|
|
718
|
-
} else if (detectedPlatforms.codex) {
|
|
676
|
+
if (detectedPlatforms.codex) {
|
|
719
677
|
res = spawnSync('codex', ['exec', promptContent], spawnOpts);
|
|
720
678
|
} else if (detectedPlatforms.claude) {
|
|
721
679
|
res = spawnSync('claude', ['-p', promptContent], spawnOpts);
|
|
@@ -801,7 +759,7 @@ async function install(options = {}) {
|
|
|
801
759
|
} else if (!hasAgent) {
|
|
802
760
|
// No AI platform detected - build from interview data
|
|
803
761
|
interviewResults = {
|
|
804
|
-
platforms: ['
|
|
762
|
+
platforms: ['claude'],
|
|
805
763
|
turboWhisper: {
|
|
806
764
|
mode: interviewAnswers.gpu.startsWith('yes') && (interviewAnswers.objectives.includes('voice') || interviewAnswers.frequency === 'daily') ? 'docker' :
|
|
807
765
|
interviewAnswers.objectives.includes('voice') || interviewAnswers.frequency === 'daily' ? 'local' : 'skip',
|
|
@@ -857,7 +815,6 @@ async function install(options = {}) {
|
|
|
857
815
|
console.log(chalk.green(` ✓ ${p} - Recommandé par yanstaller`));
|
|
858
816
|
});
|
|
859
817
|
} else {
|
|
860
|
-
if (detectedPlatforms.copilot) { recommendedPlatforms.push('copilot'); console.log(chalk.green(' ✓ GitHub Copilot CLI - Détecté')); }
|
|
861
818
|
if (detectedPlatforms.codex) { recommendedPlatforms.push('codex'); console.log(chalk.green(' ✓ Codex - Détecté')); }
|
|
862
819
|
if (detectedPlatforms.claude) { recommendedPlatforms.push('claude'); console.log(chalk.green(' ✓ Claude Code - Détecté')); }
|
|
863
820
|
}
|
|
@@ -889,7 +846,6 @@ async function install(options = {}) {
|
|
|
889
846
|
let selectedPlatform = null;
|
|
890
847
|
const availablePlatforms = [];
|
|
891
848
|
|
|
892
|
-
if (detectedPlatforms.copilot) availablePlatforms.push({ name: '🤖 GitHub Copilot CLI', value: 'copilot' });
|
|
893
849
|
if (detectedPlatforms.codex) availablePlatforms.push({ name: '🔷 OpenAI Codex', value: 'codex' });
|
|
894
850
|
if (detectedPlatforms.claude) availablePlatforms.push({ name: '🧠 Claude Code (Anthropic)', value: 'claude' });
|
|
895
851
|
|
|
@@ -899,7 +855,7 @@ async function install(options = {}) {
|
|
|
899
855
|
name: 'platform',
|
|
900
856
|
message: 'Quelle plateforme IA utiliser pour Phase 2?',
|
|
901
857
|
choices: availablePlatforms,
|
|
902
|
-
default: '
|
|
858
|
+
default: 'claude'
|
|
903
859
|
}]);
|
|
904
860
|
selectedPlatform = platform;
|
|
905
861
|
} else if (availablePlatforms.length === 1) {
|
|
@@ -933,14 +889,7 @@ async function install(options = {}) {
|
|
|
933
889
|
const spawnOpts = { encoding: 'utf8', timeout: 15000, stdio: 'pipe' };
|
|
934
890
|
if (isWindows) spawnOpts.shell = true;
|
|
935
891
|
|
|
936
|
-
if (selectedPlatform === '
|
|
937
|
-
// copilot --version to check if CLI is available
|
|
938
|
-
authCheckCmd = 'copilot';
|
|
939
|
-
authCheckArgs = ['--version'];
|
|
940
|
-
loginInstructions = [
|
|
941
|
-
`${chalk.cyan('copilot auth')}`
|
|
942
|
-
];
|
|
943
|
-
} else if (selectedPlatform === 'codex') {
|
|
892
|
+
if (selectedPlatform === 'codex') {
|
|
944
893
|
// codex --version as basic check (no auth status command available)
|
|
945
894
|
authCheckCmd = 'codex';
|
|
946
895
|
authCheckArgs = ['--version'];
|
|
@@ -978,9 +927,7 @@ async function install(options = {}) {
|
|
|
978
927
|
console.log(chalk.bold(' Pour vous connecter:'));
|
|
979
928
|
|
|
980
929
|
let loginInstructions;
|
|
981
|
-
if (selectedPlatform === '
|
|
982
|
-
loginInstructions = [`${chalk.cyan('copilot auth')}`];
|
|
983
|
-
} else if (selectedPlatform === 'codex') {
|
|
930
|
+
if (selectedPlatform === 'codex') {
|
|
984
931
|
loginInstructions = [`${chalk.cyan('codex login')}`];
|
|
985
932
|
} else if (selectedPlatform === 'claude') {
|
|
986
933
|
loginInstructions = [
|
|
@@ -1095,7 +1042,7 @@ async function install(options = {}) {
|
|
|
1095
1042
|
}
|
|
1096
1043
|
}
|
|
1097
1044
|
|
|
1098
|
-
autoSelectPlatform = recommendedPlatforms[0] || '
|
|
1045
|
+
autoSelectPlatform = recommendedPlatforms[0] || 'claude';
|
|
1099
1046
|
}
|
|
1100
1047
|
|
|
1101
1048
|
// Step 3: Platform selection (skip in MANUAL mode - already selected)
|
|
@@ -1109,18 +1056,15 @@ async function install(options = {}) {
|
|
|
1109
1056
|
console.log('');
|
|
1110
1057
|
} else {
|
|
1111
1058
|
const platformChoices = [
|
|
1112
|
-
{ name: `GitHub Copilot CLI ${detectedPlatforms.copilot ? chalk.green('(✓ Detected)') : ''}`, value: 'copilot' },
|
|
1113
|
-
{ name: `VSCode`, value: 'vscode' },
|
|
1114
1059
|
{ name: `Claude Code ${detectedPlatforms.claude ? chalk.green('(✓ Detected)') : ''}`, value: 'claude' },
|
|
1115
1060
|
{ name: `Codex ${detectedPlatforms.codex ? chalk.green('(✓ Detected)') : ''}`, value: 'codex' },
|
|
1116
1061
|
{ name: 'All platforms', value: 'all' }
|
|
1117
1062
|
];
|
|
1118
|
-
|
|
1063
|
+
|
|
1119
1064
|
// Auto-select first detected platform as default (or use interview recommendation)
|
|
1120
1065
|
const defaultPlatform = (installMode === 'custom' && autoSelectPlatform) ? autoSelectPlatform :
|
|
1121
|
-
(detectedPlatforms.
|
|
1122
|
-
detectedPlatforms.
|
|
1123
|
-
detectedPlatforms.claude ? 'claude' : 'copilot');
|
|
1066
|
+
(detectedPlatforms.codex ? 'codex' :
|
|
1067
|
+
detectedPlatforms.claude ? 'claude' : 'claude');
|
|
1124
1068
|
|
|
1125
1069
|
const platformAnswer = await inquirer.prompt([
|
|
1126
1070
|
{
|
|
@@ -1211,7 +1155,6 @@ async function install(options = {}) {
|
|
|
1211
1155
|
|
|
1212
1156
|
const byanDir = path.join(projectRoot, '_byan');
|
|
1213
1157
|
const bmbDir = path.join(byanDir, 'bmb');
|
|
1214
|
-
const githubAgentsDir = path.join(projectRoot, '.github', 'agents');
|
|
1215
1158
|
const isManual = installMode === 'manual' && manualSelection;
|
|
1216
1159
|
const manualPlatformList = isManual ? manualSelection.platforms : [];
|
|
1217
1160
|
|
|
@@ -1224,11 +1167,9 @@ async function install(options = {}) {
|
|
|
1224
1167
|
await fs.ensureDir(path.join(byanDir, '_output'));
|
|
1225
1168
|
|
|
1226
1169
|
// Create platform directories based on selection
|
|
1227
|
-
const needsCopilot = isManual ? manualPlatformList.includes('copilot') : true;
|
|
1228
1170
|
const needsClaude = isManual ? manualPlatformList.includes('claude') : (detectedPlatforms.claude || platform === 'claude' || platform === 'all');
|
|
1229
1171
|
const needsCodex = isManual ? manualPlatformList.includes('codex') : (detectedPlatforms.codex || platform === 'codex' || platform === 'all');
|
|
1230
|
-
|
|
1231
|
-
if (needsCopilot) await fs.ensureDir(githubAgentsDir);
|
|
1172
|
+
|
|
1232
1173
|
if (needsClaude) await fs.ensureDir(path.join(projectRoot, '.claude', 'rules'));
|
|
1233
1174
|
if (needsCodex) await fs.ensureDir(path.join(projectRoot, '.codex', 'prompts'));
|
|
1234
1175
|
|
|
@@ -1293,73 +1234,7 @@ async function install(options = {}) {
|
|
|
1293
1234
|
// MANUAL mode: Generate stubs only for selected agents on each selected platform
|
|
1294
1235
|
if (isManual && manualSelection) {
|
|
1295
1236
|
const selectedAgents = manualSelection.agents;
|
|
1296
|
-
|
|
1297
|
-
// Agent name to stub filename mapping (must match existing templates)
|
|
1298
|
-
const AGENT_STUB_MAP = {
|
|
1299
|
-
'hermes': 'hermes',
|
|
1300
|
-
'franck': 'franck',
|
|
1301
|
-
'expert-merise-agile': 'expert-merise-agile',
|
|
1302
|
-
'bmad-master': 'bmad-agent-bmad-master',
|
|
1303
|
-
// BMB agents
|
|
1304
|
-
'byan': 'bmad-agent-byan',
|
|
1305
|
-
'agent-builder': 'bmad-agent-bmb-agent-builder',
|
|
1306
|
-
'module-builder': 'bmad-agent-bmb-module-builder',
|
|
1307
|
-
'workflow-builder': 'bmad-agent-bmb-workflow-builder',
|
|
1308
|
-
'marc': 'bmad-agent-marc',
|
|
1309
|
-
'rachid': 'bmad-agent-rachid',
|
|
1310
|
-
'claude': 'bmad-agent-claude',
|
|
1311
|
-
'codex': 'bmad-agent-codex',
|
|
1312
|
-
'drawio': 'bmad-agent-drawio',
|
|
1313
|
-
'turbo-whisper-integration': 'bmad-agent-turbo-whisper-integration',
|
|
1314
|
-
'patnote': 'bmad-agent-patnote',
|
|
1315
|
-
'carmack': 'bmad-agent-carmack',
|
|
1316
|
-
// BMM agents
|
|
1317
|
-
'analyst': 'bmad-agent-bmm-analyst',
|
|
1318
|
-
'pm': 'bmad-agent-bmm-pm',
|
|
1319
|
-
'architect': 'bmad-agent-bmm-architect',
|
|
1320
|
-
'dev': 'bmad-agent-bmm-dev',
|
|
1321
|
-
'sm': 'bmad-agent-bmm-sm',
|
|
1322
|
-
'quinn': 'bmad-agent-bmm-quinn',
|
|
1323
|
-
'ux-designer': 'bmad-agent-bmm-ux-designer',
|
|
1324
|
-
'tech-writer': 'bmad-agent-bmm-tech-writer',
|
|
1325
|
-
'quick-flow-solo-dev': 'bmad-agent-bmm-quick-flow-solo-dev',
|
|
1326
|
-
// TEA
|
|
1327
|
-
'tea': 'bmad-agent-tea-tea',
|
|
1328
|
-
// CIS agents
|
|
1329
|
-
'brainstorming-coach': 'bmad-agent-cis-brainstorming-coach',
|
|
1330
|
-
'creative-problem-solver': 'bmad-agent-cis-creative-problem-solver',
|
|
1331
|
-
'design-thinking-coach': 'bmad-agent-cis-design-thinking-coach',
|
|
1332
|
-
'innovation-strategist': 'bmad-agent-cis-innovation-strategist',
|
|
1333
|
-
'presentation-master': 'bmad-agent-cis-presentation-master',
|
|
1334
|
-
'storyteller': 'bmad-agent-cis-storyteller'
|
|
1335
|
-
};
|
|
1336
|
-
const agentToStubName = (agentName) => AGENT_STUB_MAP[agentName] || `bmad-agent-${agentName}`;
|
|
1337
|
-
|
|
1338
|
-
// --- COPILOT: Copy matching .github/agents/ stubs ---
|
|
1339
|
-
if (manualPlatformList.includes('copilot')) {
|
|
1340
|
-
const githubAgentsSource = path.join(templateDir, '.github', 'agents');
|
|
1341
|
-
let copilotCount = 0;
|
|
1342
|
-
|
|
1343
|
-
if (await fs.pathExists(githubAgentsSource)) {
|
|
1344
|
-
for (const agentName of selectedAgents) {
|
|
1345
|
-
const stubName = agentToStubName(agentName);
|
|
1346
|
-
const sourceFile = path.join(githubAgentsSource, `${stubName}.md`);
|
|
1347
|
-
const destFile = path.join(githubAgentsDir, `${stubName}.md`);
|
|
1348
|
-
|
|
1349
|
-
if (await fs.pathExists(sourceFile)) {
|
|
1350
|
-
await fs.copy(sourceFile, destFile, { overwrite: true });
|
|
1351
|
-
copilotCount++;
|
|
1352
|
-
} else {
|
|
1353
|
-
// Generate stub if no template exists
|
|
1354
|
-
const stubContent = `---\nname: "${stubName}"\ndescription: "${agentName} agent from BYAN platform"\n---\n\nYou must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.\n\n<agent-activation CRITICAL="TRUE">\n1. LOAD the FULL agent file from {project-root}/_byan/agent/${agentName}/${agentName}.md (new layout); if absent, {project-root}/_byan/*/agents/${agentName}.md (legacy layout)\n2. READ its entire contents - this contains the complete agent persona, menu, and instructions\n3. FOLLOW every step in the <activation> section precisely\n4. DISPLAY the welcome/greeting as instructed\n5. PRESENT the numbered menu\n6. WAIT for user input before proceeding\n</agent-activation>\n`;
|
|
1355
|
-
await fs.writeFile(destFile, stubContent, 'utf8');
|
|
1356
|
-
copilotCount++;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
console.log(chalk.green(` ✓ Copilot CLI: ${copilotCount} agent stubs → .github/agents/`));
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1237
|
+
|
|
1363
1238
|
// --- CODEX: Generate .codex/prompts/ skills ---
|
|
1364
1239
|
if (manualPlatformList.includes('codex')) {
|
|
1365
1240
|
const codexPromptsDir = path.join(projectRoot, '.codex', 'prompts');
|
|
@@ -1391,18 +1266,7 @@ async function install(options = {}) {
|
|
|
1391
1266
|
|
|
1392
1267
|
} else {
|
|
1393
1268
|
// AUTO/CUSTOM mode: Copy all platform stubs (existing behavior)
|
|
1394
|
-
|
|
1395
|
-
// Copy .github/agents files
|
|
1396
|
-
const githubAgentsSource = path.join(templateDir, '.github', 'agents');
|
|
1397
|
-
|
|
1398
|
-
if (await fs.pathExists(githubAgentsSource)) {
|
|
1399
|
-
await fs.copy(githubAgentsSource, githubAgentsDir, { overwrite: true });
|
|
1400
|
-
copySpinner.text = 'Copied Copilot CLI agent stubs...';
|
|
1401
|
-
console.log(chalk.green(` ✓ GitHub agents: ${githubAgentsSource} → ${githubAgentsDir}`));
|
|
1402
|
-
} else {
|
|
1403
|
-
copySpinner.warn(`⚠ GitHub agents source not found: ${githubAgentsSource}`);
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1269
|
+
|
|
1406
1270
|
// Copy .claude/ files for Claude Code integration (always includes Hermes)
|
|
1407
1271
|
if (needsClaude) {
|
|
1408
1272
|
const claudeSource = path.join(templateDir, '.claude');
|
|
@@ -1454,7 +1318,7 @@ async function install(options = {}) {
|
|
|
1454
1318
|
}
|
|
1455
1319
|
}
|
|
1456
1320
|
|
|
1457
|
-
if (needsClaude
|
|
1321
|
+
if (needsClaude) {
|
|
1458
1322
|
console.log();
|
|
1459
1323
|
console.log(chalk.cyan('byan_web integration (optional — service payant)'));
|
|
1460
1324
|
let byanWebResult = { configured: false };
|
|
@@ -1674,7 +1538,7 @@ async function install(options = {}) {
|
|
|
1674
1538
|
if (!pkg.scripts) pkg.scripts = {};
|
|
1675
1539
|
|
|
1676
1540
|
if (!pkg.scripts.byan) {
|
|
1677
|
-
pkg.scripts.byan = 'echo "BYAN agent installed. Use:
|
|
1541
|
+
pkg.scripts.byan = 'echo "BYAN agent installed. Use: claude and ask Hermes which agent fits your task"';
|
|
1678
1542
|
}
|
|
1679
1543
|
|
|
1680
1544
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
@@ -1701,10 +1565,6 @@ async function install(options = {}) {
|
|
|
1701
1565
|
|
|
1702
1566
|
// Platform-specific checks based on installation mode
|
|
1703
1567
|
if (isManual) {
|
|
1704
|
-
if (manualPlatformList.includes('copilot')) {
|
|
1705
|
-
checks.push({ name: 'Copilot agents dir', path: githubAgentsDir });
|
|
1706
|
-
checks.push({ name: 'Hermes (Copilot)', path: path.join(githubAgentsDir, 'hermes.md') });
|
|
1707
|
-
}
|
|
1708
1568
|
if (manualPlatformList.includes('codex')) {
|
|
1709
1569
|
checks.push({ name: 'Codex prompts dir', path: path.join(projectRoot, '.codex', 'prompts') });
|
|
1710
1570
|
checks.push({ name: 'Hermes (Codex)', path: path.join(projectRoot, '.codex', 'prompts', 'hermes.md') });
|
|
@@ -1717,8 +1577,11 @@ async function install(options = {}) {
|
|
|
1717
1577
|
);
|
|
1718
1578
|
}
|
|
1719
1579
|
} else {
|
|
1720
|
-
|
|
1721
|
-
|
|
1580
|
+
// Add Codex checks if installed
|
|
1581
|
+
if (needsCodex) {
|
|
1582
|
+
checks.push({ name: 'Codex prompts dir', path: path.join(projectRoot, '.codex', 'prompts') });
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1722
1585
|
// Add Claude Code checks if installed
|
|
1723
1586
|
if (needsClaude) {
|
|
1724
1587
|
checks.push(
|
|
@@ -1820,18 +1683,15 @@ async function install(options = {}) {
|
|
|
1820
1683
|
console.log(chalk.yellow('1. Activate BYAN agent:'));
|
|
1821
1684
|
}
|
|
1822
1685
|
|
|
1823
|
-
if (platform === '
|
|
1824
|
-
console.log(` ${chalk.blue('copilot')}`);
|
|
1825
|
-
console.log(` Then type: ${chalk.blue('/agent')}`);
|
|
1826
|
-
console.log(` Select: ${chalk.cyan('byan')} (create agents)`);
|
|
1827
|
-
} else if (platform === 'vscode') {
|
|
1828
|
-
console.log(' Open VSCode Command Palette (Ctrl+Shift+P)');
|
|
1829
|
-
console.log(' Type: \'Activate BYAN Agent\'');
|
|
1830
|
-
} else if (platform === 'claude') {
|
|
1686
|
+
if (platform === 'claude') {
|
|
1831
1687
|
console.log(` ${chalk.blue('claude')}`);
|
|
1832
1688
|
console.log(` Hermes est integre via ${chalk.cyan('.claude/CLAUDE.md')}`);
|
|
1833
1689
|
console.log(` Demande: ${chalk.cyan('"quel agent pour mon projet?"')} → Hermes repond`);
|
|
1834
1690
|
console.log(` Regles: ${chalk.cyan('.claude/rules/')} (hermes, agents, methodologie)`);
|
|
1691
|
+
} else if (platform === 'codex') {
|
|
1692
|
+
console.log(` ${chalk.blue('codex')}`);
|
|
1693
|
+
console.log(` Skills installes dans ${chalk.cyan('.codex/prompts/')}`);
|
|
1694
|
+
console.log(` Lance: ${chalk.cyan('codex skill hermes')} → Hermes route vers le bon agent`);
|
|
1835
1695
|
} else {
|
|
1836
1696
|
console.log(' Follow your platform\'s agent activation procedure');
|
|
1837
1697
|
}
|