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
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
export const meta = {
|
|
2
|
+
name: 'byan-benchmark',
|
|
3
|
+
description: 'DATA-only benchmark engine: given a fork (>=2 options) + weighted criteria + optional judge panel, returns a scored options-x-criteria matrix, a best-first recommendation, and the dissenting view. Reusable for ANY decision fork. The human gate + the rendered table live in the orchestrating skill.',
|
|
4
|
+
phases: [
|
|
5
|
+
{ title: 'RECON', detail: 'parse options+criteria from args' },
|
|
6
|
+
{ title: 'SOURCE', detail: 'gather evidence per option (model-knowledge default; WebFetch only strict-domain/volatile)' },
|
|
7
|
+
{ title: 'JUDGE', detail: 'score each cell against weighted criteria via the judge panel' },
|
|
8
|
+
{ title: 'RECOMMEND', detail: 'rank best-first + capture dissent' },
|
|
9
|
+
],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// FD / STRICT STATE CONTRACT (re-asserted inline - enforcement-bridge F3).
|
|
14
|
+
//
|
|
15
|
+
// The in-CLI Workflow tool runs this script OUTSIDE the conversation turn, so
|
|
16
|
+
// BYAN's main-thread hooks (strict-scope-guard, strict-stop-guard,
|
|
17
|
+
// fd-phase-guard, the autobench Stop hook) DO NOT fire here. This script
|
|
18
|
+
// therefore:
|
|
19
|
+
// - NEVER imports/requires _byan/.../lib/fd-state.js or the strict-mode lib
|
|
20
|
+
// (enforced by byan-lint-workflows.js).
|
|
21
|
+
// - returns DATA only. The orchestrating skill (.claude/skills/byan-benchmark)
|
|
22
|
+
// is the human-gated conductor; IT renders the table, emits the BYAN-BENCH
|
|
23
|
+
// marker, and records FD/strict state via the byan_fd_* / byan_strict_* MCP
|
|
24
|
+
// tools AT the gate.
|
|
25
|
+
// No timestamp / id / RNG is generated in-script: ids and clock-bearing values
|
|
26
|
+
// arrive via the args global, keeping the script deterministic and resumable
|
|
27
|
+
// (the launch validator scans raw text for any wall-clock or RNG primitive).
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
// Strict-domain evidence floors (mirrors .claude/rules/fact-check.md). A claim in
|
|
31
|
+
// these domains must reach at least this proof level or it is flagged unverified.
|
|
32
|
+
// Encoded as data so the JUDGE leaf is told the exact floor for the domain.
|
|
33
|
+
const STRICT_FLOORS = { security: 'L2', performance: 'L2', compliance: 'L1' };
|
|
34
|
+
|
|
35
|
+
// The 5-level evidence rubric as WRITTEN text, passed verbatim to the JUDGE leaf
|
|
36
|
+
// so every cell's Niv (level) is graded against the same scale the doctrine uses.
|
|
37
|
+
const EVIDENCE_RUBRIC = [
|
|
38
|
+
'L1 (95%): official spec - RFC, W3C, ECMAScript, POSIX, vendor canonical doc.',
|
|
39
|
+
'L2 (80%): reproducible benchmark, CVE reference, official product docs.',
|
|
40
|
+
'L3 (65%): peer-reviewed article, recognised technical book.',
|
|
41
|
+
'L4 (50%): community consensus (e.g. StackOverflow > 1000 votes).',
|
|
42
|
+
'L5 (20%): opinion or personal experience.',
|
|
43
|
+
].join(' ');
|
|
44
|
+
|
|
45
|
+
const RECON_SCHEMA = {
|
|
46
|
+
type: 'object',
|
|
47
|
+
required: ['options', 'criteria'],
|
|
48
|
+
properties: {
|
|
49
|
+
fork: { type: 'string', description: 'one-line restatement of the decision fork' },
|
|
50
|
+
options: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
description: 'the >=2 candidate options, normalised',
|
|
53
|
+
items: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
required: ['name'],
|
|
56
|
+
properties: { name: { type: 'string' }, note: { type: 'string' } },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
criteria: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
description: 'the weighted criteria the options are scored against',
|
|
62
|
+
items: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
required: ['name', 'weight'],
|
|
65
|
+
properties: { name: { type: 'string' }, weight: { type: 'number' } },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
valid: { type: 'boolean', description: 'true only if >=2 options and >=1 criterion' },
|
|
69
|
+
reason: { type: 'string', description: 'when invalid, why (degenerate fork -> skip)' },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const EVIDENCE_SCHEMA = {
|
|
74
|
+
type: 'object',
|
|
75
|
+
required: ['option', 'evidence'],
|
|
76
|
+
properties: {
|
|
77
|
+
option: { type: 'string' },
|
|
78
|
+
evidence: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
description: 'one evidence note per criterion for this option',
|
|
81
|
+
items: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
required: ['criterion', 'claim', 'unverified'],
|
|
84
|
+
properties: {
|
|
85
|
+
criterion: { type: 'string' },
|
|
86
|
+
claim: { type: 'string', description: 'the factual basis for this option on this criterion' },
|
|
87
|
+
source: { type: 'string', description: 'model-knowledge by default; a URL ONLY if WebFetch opened it THIS turn' },
|
|
88
|
+
unverified: { type: 'boolean', description: 'true when no live source was opened (tag [UNVERIFIED])' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const JUDGE_SCHEMA = {
|
|
96
|
+
type: 'object',
|
|
97
|
+
required: ['judge', 'scores'],
|
|
98
|
+
properties: {
|
|
99
|
+
judge: { type: 'string' },
|
|
100
|
+
scores: {
|
|
101
|
+
type: 'array',
|
|
102
|
+
description: 'for EACH option: a cell per criterion with score, evidence level and the weighted total',
|
|
103
|
+
items: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
required: ['option', 'cells', 'weightedTotal'],
|
|
106
|
+
properties: {
|
|
107
|
+
option: { type: 'string' },
|
|
108
|
+
cells: {
|
|
109
|
+
type: 'array',
|
|
110
|
+
items: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
required: ['criterion', 'verdict', 'level', 'score', 'unverified'],
|
|
113
|
+
properties: {
|
|
114
|
+
criterion: { type: 'string' },
|
|
115
|
+
verdict: { type: 'string', description: 'short qualitative verdict for this cell' },
|
|
116
|
+
level: { type: 'string', description: 'evidence level L1..L5 per the rubric' },
|
|
117
|
+
score: { type: 'number', description: '1-10 raw score for this option on this criterion' },
|
|
118
|
+
source: { type: 'string' },
|
|
119
|
+
unverified: { type: 'boolean' },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
weightedTotal: { type: 'number', description: 'sum of score*weight across criteria' },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const RECOMMEND_SCHEMA = {
|
|
131
|
+
type: 'object',
|
|
132
|
+
required: ['matrix', 'recommendation', 'dissent'],
|
|
133
|
+
properties: {
|
|
134
|
+
matrix: {
|
|
135
|
+
type: 'array',
|
|
136
|
+
description: 'consolidated one row per option, best-first',
|
|
137
|
+
items: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
required: ['option', 'cells', 'total'],
|
|
140
|
+
properties: {
|
|
141
|
+
option: { type: 'string' },
|
|
142
|
+
cells: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
items: {
|
|
145
|
+
type: 'object',
|
|
146
|
+
required: ['criterion', 'verdict', 'level', 'score'],
|
|
147
|
+
properties: {
|
|
148
|
+
criterion: { type: 'string' },
|
|
149
|
+
verdict: { type: 'string' },
|
|
150
|
+
level: { type: 'string' },
|
|
151
|
+
score: { type: 'number' },
|
|
152
|
+
source: { type: 'string' },
|
|
153
|
+
unverified: { type: 'boolean' },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
total: { type: 'number' },
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
recommendation: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
required: ['best', 'line', 'confidence'],
|
|
164
|
+
properties: {
|
|
165
|
+
best: { type: 'string', description: 'the winning option name' },
|
|
166
|
+
line: { type: 'string', description: 'one best-first recommendation line' },
|
|
167
|
+
confidence: { type: 'string', enum: ['assertive', 'lean'], description: 'assertive=recommend; lean=low-confidence' },
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
dissent: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
required: ['option', 'why'],
|
|
173
|
+
properties: {
|
|
174
|
+
option: { type: 'string', description: 'the runner-up a reasonable judge would defend' },
|
|
175
|
+
why: { type: 'string', description: 'the criterion on which the runner-up wins' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// ---- Args contract (read-only via the args global; deterministic fallbacks) ----
|
|
182
|
+
// args.question : the fork stated as a question (string)
|
|
183
|
+
// args.options : array of { name, ... } (>=2 for a real benchmark)
|
|
184
|
+
// args.criteria : array of { name, weight } (>=1)
|
|
185
|
+
// args.judges : optional reusable panel [{ key, lens, weighting }]; default single neutral judge
|
|
186
|
+
// args.domain : drives strict floors (security/performance/compliance)
|
|
187
|
+
// args.scope : 'internal' | 'external' (internal -> no external links, coherence-first)
|
|
188
|
+
const A = (typeof args !== 'undefined' && args) || {};
|
|
189
|
+
const QUESTION = A.question || 'unspecified decision fork';
|
|
190
|
+
const RAW_OPTIONS = Array.isArray(A.options) ? A.options : [];
|
|
191
|
+
const RAW_CRITERIA = Array.isArray(A.criteria) ? A.criteria : [];
|
|
192
|
+
const DOMAIN = A.domain || 'general';
|
|
193
|
+
const SCOPE = A.scope === 'external' ? 'external' : 'internal';
|
|
194
|
+
const FLOOR = STRICT_FLOORS[DOMAIN] || null;
|
|
195
|
+
// Default to a single neutral judge so the engine works without a panel; a caller
|
|
196
|
+
// can pass an opposed-lens panel to get a multi-judge consensus instead.
|
|
197
|
+
const JUDGES = (Array.isArray(A.judges) && A.judges.length)
|
|
198
|
+
? A.judges
|
|
199
|
+
: [{ key: 'neutral', lens: 'balanced reviewer', weighting: 'Apply each criterion weight as given; no lens bias.' }];
|
|
200
|
+
|
|
201
|
+
const optionsBlob = JSON.stringify(RAW_OPTIONS, null, 2);
|
|
202
|
+
const criteriaBlob = JSON.stringify(RAW_CRITERIA, null, 2);
|
|
203
|
+
|
|
204
|
+
phase('RECON');
|
|
205
|
+
// EXPLORATION leaf: parse + normalise the fork. Labelled 'parse-options' so the
|
|
206
|
+
// linter classifies it as exploration and the haiku downgrade is permitted.
|
|
207
|
+
const recon = await agent(
|
|
208
|
+
`You are the RECON leaf of byan-benchmark. Parse and normalise this decision fork.\n` +
|
|
209
|
+
`QUESTION: ${QUESTION}\n` +
|
|
210
|
+
`RAW OPTIONS: ${optionsBlob}\n` +
|
|
211
|
+
`RAW CRITERIA: ${criteriaBlob}\n` +
|
|
212
|
+
`Normalise options to [{name, note?}] and criteria to [{name, weight}] (default weight 1 when missing). ` +
|
|
213
|
+
`Set valid=true ONLY if there are >=2 distinct, non-substitutable options AND >=1 criterion; ` +
|
|
214
|
+
`otherwise valid=false with a reason (a degenerate/obvious-default fork should be skipped, not tabled).`,
|
|
215
|
+
{ label: 'parse-options', phase: 'RECON', schema: RECON_SCHEMA, model: 'haiku' }
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const options = (recon && Array.isArray(recon.options) && recon.options.length)
|
|
219
|
+
? recon.options
|
|
220
|
+
: RAW_OPTIONS;
|
|
221
|
+
const criteria = (recon && Array.isArray(recon.criteria) && recon.criteria.length)
|
|
222
|
+
? recon.criteria
|
|
223
|
+
: RAW_CRITERIA;
|
|
224
|
+
const degenerate = !(recon && recon.valid) || options.length < 2 || criteria.length < 1;
|
|
225
|
+
|
|
226
|
+
if (degenerate) {
|
|
227
|
+
// Collapse the degenerate case: a fork with <2 real options or no criterion is
|
|
228
|
+
// not benchmarkable. Return DATA telling the skill to emit a BYAN-BENCH:skip.
|
|
229
|
+
log(`degenerate fork: ${recon && recon.reason ? recon.reason : 'fewer than 2 options or no criteria'}`);
|
|
230
|
+
return {
|
|
231
|
+
workflow: 'byan-benchmark',
|
|
232
|
+
question: QUESTION,
|
|
233
|
+
scope: SCOPE,
|
|
234
|
+
domain: DOMAIN,
|
|
235
|
+
options,
|
|
236
|
+
criteria,
|
|
237
|
+
matrix: [],
|
|
238
|
+
recommendation: null,
|
|
239
|
+
dissent: null,
|
|
240
|
+
degenerate: true,
|
|
241
|
+
skipReason: recon && recon.reason ? recon.reason : 'obvious-default',
|
|
242
|
+
needsHumanGate: true,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
phase('SOURCE');
|
|
247
|
+
// EXPLORATION leaves: gather evidence per option. One leaf per option, run in
|
|
248
|
+
// parallel. Labelled 'fetch-evidence:<option>' -> exploration -> haiku allowed.
|
|
249
|
+
// Sourcing is routing-driven: internal scope stays on model-knowledge (no links),
|
|
250
|
+
// external scope may cite a source, but a URL appears ONLY if WebFetch opened it
|
|
251
|
+
// THIS turn - otherwise the claim is tagged unverified.
|
|
252
|
+
const sourcingRule = SCOPE === 'internal'
|
|
253
|
+
? 'INTERNAL scope: stay on model-knowledge, do NOT emit external links, prefer coherence with the existing stack. Tag every claim unverified=true unless it is a self-evident property of the option.'
|
|
254
|
+
: `EXTERNAL scope: model-knowledge is the default. A URL may appear ONLY if you actually opened it with WebFetch THIS turn; otherwise set unverified=true and cite from model-knowledge. Strict domain "${DOMAIN}"${FLOOR ? ` requires evidence floor ${FLOOR}` : ''}.`;
|
|
255
|
+
|
|
256
|
+
const evidence = await parallel(options.map((opt) => () =>
|
|
257
|
+
agent(
|
|
258
|
+
`You are a SOURCE leaf of byan-benchmark for ONE option.\n` +
|
|
259
|
+
`OPTION: ${JSON.stringify(opt)}\n` +
|
|
260
|
+
`CRITERIA: ${criteriaBlob}\n` +
|
|
261
|
+
`${sourcingRule}\n` +
|
|
262
|
+
`Produce one evidence note per criterion: the factual basis for this option on that criterion. ` +
|
|
263
|
+
`Be concrete and honest; do not inflate. Return the EVIDENCE schema for this single option.`,
|
|
264
|
+
{ label: `fetch-evidence:${opt.name}`, phase: 'SOURCE', schema: EVIDENCE_SCHEMA, model: 'haiku' }
|
|
265
|
+
)
|
|
266
|
+
));
|
|
267
|
+
const evidenceClean = evidence.filter(Boolean);
|
|
268
|
+
log(`Sourced ${evidenceClean.length}/${options.length} options (scope=${SCOPE})`);
|
|
269
|
+
const evidenceBlob = JSON.stringify(evidenceClean, null, 2);
|
|
270
|
+
|
|
271
|
+
phase('JUDGE');
|
|
272
|
+
// ANALYSIS leaves: score every cell against the weighted criteria. One leaf per
|
|
273
|
+
// judge (reusable panel). Labelled 'judge-score:<judge>' -> ANALYSIS -> DEEP, so
|
|
274
|
+
// opts.model is OMITTED (these leaves inherit the session model, never downgrade).
|
|
275
|
+
const judgeResults = await parallel(JUDGES.map((j) => () =>
|
|
276
|
+
agent(
|
|
277
|
+
`You are JUDGE "${j.key}" (lens: ${j.lens}) of byan-benchmark. Score ALL options objectively, then apply YOUR weighting.\n` +
|
|
278
|
+
`FORK: ${QUESTION}\n` +
|
|
279
|
+
`OPTIONS: ${optionsBlob}\n` +
|
|
280
|
+
`CRITERIA (each has a weight): ${criteriaBlob}\n` +
|
|
281
|
+
`EVIDENCE gathered per option: ${evidenceBlob}\n` +
|
|
282
|
+
`EVIDENCE RUBRIC (grade each cell's level against this): ${EVIDENCE_RUBRIC}\n` +
|
|
283
|
+
`${FLOOR ? `STRICT FLOOR for domain "${DOMAIN}": a cell below ${FLOOR} must be flagged unverified=true.` : ''}\n` +
|
|
284
|
+
`YOUR WEIGHTING: ${j.weighting}\n` +
|
|
285
|
+
`For each option, produce a cell per criterion: a short verdict, an evidence level (L1..L5), a 1-10 score, ` +
|
|
286
|
+
`the source (or model-knowledge), and unverified (true if no live source was opened). ` +
|
|
287
|
+
`Compute weightedTotal = sum(score * weight) across criteria. Return the JUDGE schema.`,
|
|
288
|
+
{ label: `judge-score:${j.key}`, phase: 'JUDGE', schema: JUDGE_SCHEMA }
|
|
289
|
+
)
|
|
290
|
+
));
|
|
291
|
+
const judgeClean = judgeResults.filter(Boolean);
|
|
292
|
+
log(`Judges scored: ${judgeClean.length}/${JUDGES.length}`);
|
|
293
|
+
const judgeBlob = JSON.stringify(judgeClean, null, 2);
|
|
294
|
+
|
|
295
|
+
phase('RECOMMEND');
|
|
296
|
+
// ANALYSIS leaf: consolidate judges, rank best-first, capture dissent. Labelled
|
|
297
|
+
// 'recommend-rank' -> ANALYSIS -> DEEP (opts.model OMITTED). Confidence is a VERB
|
|
298
|
+
// choice: assertive when the gap and evidence are solid, lean when low-confidence.
|
|
299
|
+
const verdict = await agent(
|
|
300
|
+
`You are the RECOMMEND leaf of byan-benchmark. Consolidate the judges into ONE decision.\n` +
|
|
301
|
+
`FORK: ${QUESTION}\n` +
|
|
302
|
+
`OPTIONS: ${optionsBlob}\n` +
|
|
303
|
+
`CRITERIA: ${criteriaBlob}\n` +
|
|
304
|
+
`JUDGES' SCORECARDS: ${judgeBlob}\n` +
|
|
305
|
+
`Build a consolidated matrix: one row per option (best-first by combined weightedTotal), each cell carrying ` +
|
|
306
|
+
`criterion, verdict, level, score, source and unverified. ` +
|
|
307
|
+
`Recommend the best option with a one-line best-first reco. Set confidence="assertive" only when the winner ` +
|
|
308
|
+
`clearly leads and its key cells are not unverified; otherwise confidence="lean" (low-confidence, hedge the verb). ` +
|
|
309
|
+
`Capture the dissent: the runner-up a reasonable judge would defend and the criterion on which it wins. ` +
|
|
310
|
+
`Return the RECOMMEND schema.`,
|
|
311
|
+
{ label: 'recommend-rank', phase: 'RECOMMEND', schema: RECOMMEND_SCHEMA }
|
|
312
|
+
);
|
|
313
|
+
|
|
314
|
+
// Return DATA only. The skill renders the compact 1-table, emits the BYAN-BENCH
|
|
315
|
+
// marker, and (in BYAN) optionally enriches cells via byan_fc_check at the gate.
|
|
316
|
+
return {
|
|
317
|
+
workflow: 'byan-benchmark',
|
|
318
|
+
question: QUESTION,
|
|
319
|
+
scope: SCOPE,
|
|
320
|
+
domain: DOMAIN,
|
|
321
|
+
options,
|
|
322
|
+
criteria,
|
|
323
|
+
matrix: (verdict && verdict.matrix) || [],
|
|
324
|
+
recommendation: (verdict && verdict.recommendation) || null,
|
|
325
|
+
dissent: (verdict && verdict.dissent) || null,
|
|
326
|
+
degenerate: false,
|
|
327
|
+
needsHumanGate: true,
|
|
328
|
+
};
|
|
@@ -21,7 +21,7 @@ name,displayName,title,icon,role,identity,communicationStyle,principles,module,p
|
|
|
21
21
|
"storyteller","Sophia","Master Storyteller","📖","Expert Storytelling Guide + Narrative Strategist","Master storyteller with 50+ years across journalism, screenwriting, and brand narratives. Expert in emotional psychology and audience engagement.","Speaks like a bard weaving an epic tale - flowery, whimsical, every sentence enraptures and draws you deeper","Powerful narratives leverage timeless human truths. Find the authentic story. Make the abstract concrete through vivid details.","cis","_byan/agent/storyteller/storyteller.md"
|
|
22
22
|
expert-merise-agile,"Expert Merise","Expert Merise Agile - Assistant de Conception & Rédaction","📐","Expert Merise Agile","Spécialiste Merise qui guide rédaction cahiers des charges et conception MCD/MCT. Zero Trust mindset: utilisateur se trompe jusqu'à preuve du contraire.","Direct, concis, constructif. Challenge systématique mais pédagogique.","Zero Trust (IA-1) • Challenge Before Confirm (IA-16) • Ockham's Razor (#37) • Data Dictionary First (#33) • MCD⇄MCT Validation (#34)","bmm","_byan/agent/expert-merise-agile/expert-merise-agile.md"
|
|
23
23
|
"drawio","DrawIO","Expert Diagrammes Draw.io","📐","Expert en Création de Diagrammes Techniques","Spécialiste des diagrammes techniques via serveur MCP draw.io. Maîtrise architecture, UML, Merise, BPMN, et diagrammes métier.","Professionnel et précis, comme un architecte technique. Explique les choix de design.","- Clarté Avant Tout - Simplicité: Ockham's Razor - Standards: Respecte conventions UML et notations métier","bmb","_byan/agent/drawio/drawio.md"
|
|
24
|
-
"turbo-whisper-integration","Turbo Whisper Voice Integration","Voice Dictation Integration Specialist","🎤","Voice Dictation Integration Specialist","Expert in Turbo Whisper integration for BMAD platform. Seamlessly connects voice dictation with
|
|
24
|
+
"turbo-whisper-integration","Turbo Whisper Voice Integration","Voice Dictation Integration Specialist","🎤","Voice Dictation Integration Specialist","Expert in Turbo Whisper integration for BMAD platform. Seamlessly connects voice dictation with Claude Code, and Codex. Enables hands-free interaction with AI agents. Cross-platform specialist (Linux/macOS/Windows). Prioritizes self-hosted solutions for privacy and cost efficiency.","Balanced approach - educational during setup and concise for experienced users. Uses technical precision without jargon overload. Always confirms OS and platform before suggesting commands.","Challenge Before Confirm - Validate OS, platform, requirements | Ockham's Razor - Simplest setup | Fail Fast - Detect issues early | Consequences Awareness - Test all platforms | Privacy First - Self-hosted priority","bmb","_byan/agent/turbo-whisper-integration/turbo-whisper-integration.md"
|
|
25
25
|
"skeptic","The Skeptic","Scientific Claim Challenger and Epistemic Guard","[?]","Epistemic Guard + Fact-Check Specialist","Methodical challenger of all claims. Applies 3-step verification (Source / Proof type / Reproducible). Specializes in auditing documents for unsourced assertions, computing Trust Scores, and verifying reasoning chains with multiplicative confidence propagation.","Cold, methodical, impeccably polite. Speaks in structured CLAIM/CHALLENGE/VERDICT blocks. Uses Socratic method — questions before conclusions. Never hostile, always rigorous.","Challenge Before Confirm | Extraordinary claims require extraordinary evidence | Descartes Doubt | No URL generation | Strict-domain LEVEL-2 minimum","core","_byan/agent/skeptic/skeptic.md"
|
|
26
26
|
"forgeron","Le Forgeron","Revelateur d ames","","Revelateur d ames — Soul Forger","Expert en interview psychologique profonde pour extraire l ame du createur depuis ses experiences de vie. Detecte emotions, valeurs, blessures fondatrices. Genere creator-soul.md et agent soul files. Calme, patient, utilise le silence comme outil.","Calme, patient, minimal, profond. Questions rares mais chaque une compte. Utilise le silence. Reflete sans projeter.","Ne jamais interpreter a la place du createur | Ne jamais precipiter | Emotions = donnees de navigation | Preuve avant sentence","bmb","_byan/agent/forgeron/forgeron.md"
|
|
27
27
|
"tao","Tao","Le Tao — Directeur de Voix des Agents","道","Voice Director — Soul to Expression Bridge","Transforme les valeurs abstraites du soul.md en directives vocales concretes : tics de langage, registre, signatures verbales, vocabulaire interdit. Forge le tao.md de chaque agent. Garantit l anti-uniformite : chaque agent sonne unique.","Calme, precis, chirurgical. L oreille absolue pour les voix. Detecte le generique a la premiere phrase. Concret : jamais de regle sans exemple.","Derivation tracable : chaque tic nait d une valeur d ame | Anti-uniformite : deux agents ne sonnent jamais pareil | Exemple obligatoire | La voix sert l ame pas l inverse","core","_byan/agent/tao/tao.md"
|