create-byan-agent 2.41.0 → 2.44.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 +144 -0
- package/install/bin/byan-handoff.js +139 -0
- package/install/bin/byan-kanban.js +1 -1
- package/install/bin/create-byan-agent-v2.js +133 -112
- package/install/lib/byan-leantime-integration.js +2 -2
- package/install/lib/byan-web-integration.js +5 -5
- package/install/lib/claude-native-setup.js +11 -11
- package/install/lib/codex-native-setup.js +96 -4
- package/install/lib/exchange/agent-packager.js +1 -1
- package/install/lib/mcp-extensions/gdrive.js +5 -5
- package/install/lib/mcp-extensions/index.js +5 -5
- package/install/lib/phase2-chat.js +21 -21
- package/install/lib/platforms/claude-code.js +2 -2
- package/install/lib/project-agents-generator.js +4 -4
- package/install/lib/project-handoff.js +300 -0
- package/install/lib/rtk-integration.js +81 -14
- package/install/lib/staging-consent.js +1 -1
- package/install/lib/subagent-generator.js +2 -3
- package/install/lib/utils/logger.js +4 -4
- package/install/lib/utils/node-detector.js +1 -1
- package/install/lib/yanstaller/agent-launcher.js +1 -1
- package/install/lib/yanstaller/index.js +11 -116
- package/install/lib/yanstaller/platform-selector.js +11 -11
- package/install/src/byan-v2/dispatcher/task-router.js +1 -1
- package/install/src/index.js +1 -1
- package/install/src/webui/api.js +0 -13
- package/install/src/webui/chat/bridge.js +1 -1
- package/install/src/webui/chat/cli-detector.js +1 -1
- package/install/templates/.claude/CLAUDE.md +16 -0
- package/install/templates/.claude/rules/native-workflows.md +22 -14
- package/install/templates/.claude/settings.json +24 -24
- package/install/templates/.claude/skills/byan-byan/SKILL.md +14 -0
- package/install/templates/.claude/skills/byan-codex/SKILL.md +7 -0
- package/install/templates/.codex/skills/byan/SKILL.md +77 -0
- package/install/templates/_byan/COMPLETION-REPORT.md +0 -1
- package/install/templates/_byan/INDEX.md +6 -2
- package/install/templates/_byan/_config/workflow-manifest.csv +1 -1
- package/install/templates/_byan/core/activation/soul-activation.md +3 -3
- package/install/templates/_byan/mcp/byan-mcp-server/bin/byan-lint-workflows.js +6 -3
- package/install/templates/_byan/mcp/byan-mcp-server/lib/native-tiers.js +35 -17
- package/install/templates/_byan/mcp/byan-mcp-server/lib/workflows-lint.js +38 -0
- package/install/templates/_byan/mcp/byan-mcp-server/skill-bundles-manifest.json +2 -2
- package/install/templates/_byan/worker/workers.md +1 -1
- package/install/templates/_byan/workflow/simple/byan/project-handoff-workflow.md +90 -0
- package/install/templates/dist/skill-bundles/byan-byan.zip +0 -0
- package/install/templates/dist/skill-bundles/byan-codex.zip +0 -0
- package/install/templates/docs/codex-auto-delegation.md +140 -0
- package/package.json +2 -1
- package/src/byan-v2/dispatcher/task-router.js +1 -1
- package/src/byan-v2/lib/layout-resolver.js +3 -6
- package/install/lib/yanstaller/installer.js +0 -138
- package/install/lib/yanstaller/interviewer.js +0 -88
- package/install/lib/yanstaller/recommender.js +0 -102
- package/install/lib/yanstaller/troubleshooter.js +0 -89
- package/install/lib/yanstaller/validator.js +0 -198
- package/install/lib/yanstaller/wizard.js +0 -109
- package/install/src/byan-v2/dispatcher/task-tool-interface-mock.js +0 -134
- package/install/src/byan-v2/dispatcher/task-tool-interface.js +0 -123
- package/install/templates/_bmad/bmb/agents/agent-builder.md +0 -59
- package/install/templates/_bmad/bmb/agents/byan-test.md +0 -116
- package/install/templates/_bmad/bmb/agents/byan.md +0 -215
- package/install/templates/_bmad/bmb/agents/marc.md +0 -303
- package/install/templates/_bmad/bmb/agents/module-builder.md +0 -60
- package/install/templates/_bmad/bmb/agents/patnote.md +0 -495
- package/install/templates/_bmad/bmb/agents/rachid.md +0 -184
- package/install/templates/_bmad/bmb/agents/workflow-builder.md +0 -61
- package/install/templates/_bmad/bmb/workflows/byan/data/mantras.yaml +0 -272
- package/install/templates/_bmad/bmb/workflows/byan/data/templates.yaml +0 -59
- package/install/templates/_bmad/bmb/workflows/byan/delete-agent-workflow.md +0 -657
- package/install/templates/_bmad/bmb/workflows/byan/edit-agent-workflow.md +0 -688
- package/install/templates/_bmad/bmb/workflows/byan/interview-workflow.md +0 -753
- package/install/templates/_bmad/bmb/workflows/byan/quick-create-workflow.md +0 -450
- package/install/templates/_bmad/bmb/workflows/byan/templates/base-agent-template.md +0 -79
- package/install/templates/_bmad/bmb/workflows/byan/validate-agent-workflow.md +0 -676
- package/install/templates/_bmad/core/agents/carmack.md +0 -238
- package/src/byan-v2/dispatcher/task-tool-interface-mock.js +0 -134
- package/src/byan-v2/dispatcher/task-tool-interface.js +0 -123
|
@@ -1,129 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* YANSTALLER -
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* YANSTALLER - Backup / update / rollback surface
|
|
3
|
+
*
|
|
4
|
+
* The programmatic install()/uninstall() orchestrator was removed: it was a
|
|
5
|
+
* half-implemented stub (phases 4-9 never wired) and the real installer is
|
|
6
|
+
* install/bin/create-byan-agent-v2.js. What remains here is the live, tested
|
|
7
|
+
* surface consumed by the CLI (update / rollback / backups / check commands)
|
|
8
|
+
* and the web UI: update, rollback, listBackups, plus the raw detector /
|
|
9
|
+
* platformSelector / updater / backuper modules.
|
|
10
|
+
*
|
|
6
11
|
* @module yanstaller
|
|
7
12
|
*/
|
|
8
13
|
|
|
9
14
|
const path = require('path');
|
|
10
15
|
const detector = require('./detector');
|
|
11
|
-
const recommender = require('./recommender');
|
|
12
|
-
const installer = require('./installer');
|
|
13
|
-
const validator = require('./validator');
|
|
14
|
-
const troubleshooter = require('./troubleshooter');
|
|
15
|
-
const interviewer = require('./interviewer');
|
|
16
16
|
const backuper = require('./backuper');
|
|
17
17
|
const updater = require('./updater');
|
|
18
|
-
const wizard = require('./wizard');
|
|
19
18
|
const platformSelector = require('./platform-selector');
|
|
20
19
|
const logger = require('../utils/logger');
|
|
21
20
|
|
|
22
|
-
/**
|
|
23
|
-
* @typedef {Object} YanInstallerOptions
|
|
24
|
-
* @property {boolean} [yes] - Skip confirmations (--yes flag)
|
|
25
|
-
* @property {string} [mode] - Installation mode: 'full' | 'minimal' | 'custom'
|
|
26
|
-
* @property {string[]} [platforms] - Target platforms (override detection)
|
|
27
|
-
* @property {boolean} [verbose] - Verbose output
|
|
28
|
-
* @property {boolean} [quiet] - Minimal output
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Main installation flow
|
|
33
|
-
*
|
|
34
|
-
* @param {YanInstallerOptions} [options={}] - Installation options
|
|
35
|
-
* @returns {Promise<void>}
|
|
36
|
-
*/
|
|
37
|
-
async function install(options = {}) {
|
|
38
|
-
let backupPath = null;
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
// Phase 1: Detect environment
|
|
42
|
-
logger.info('🔍 Detecting environment...');
|
|
43
|
-
const detection = await detector.detect();
|
|
44
|
-
|
|
45
|
-
// Phase 2: Validate Node version (FAIL FAST)
|
|
46
|
-
if (!detector.isNodeVersionValid(detection.nodeVersion, '18.0.0')) {
|
|
47
|
-
throw new Error(`Node.js >= 18.0.0 required. Found: ${detection.nodeVersion}`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Phase 3: Platform Selection
|
|
51
|
-
let platformSelection;
|
|
52
|
-
if (options.platforms) {
|
|
53
|
-
// CLI override
|
|
54
|
-
platformSelection = {
|
|
55
|
-
platforms: options.platforms,
|
|
56
|
-
mode: 'manual'
|
|
57
|
-
};
|
|
58
|
-
} else if (options.yes) {
|
|
59
|
-
// Auto mode
|
|
60
|
-
platformSelection = {
|
|
61
|
-
platforms: detection.platforms.filter(p => p.detected).map(p => p.name),
|
|
62
|
-
mode: 'auto'
|
|
63
|
-
};
|
|
64
|
-
} else {
|
|
65
|
-
// Interactive selection
|
|
66
|
-
platformSelection = await platformSelector.select(detection);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
logger.info(`\n✓ Selected ${platformSelection.platforms.length} platform(s)`);
|
|
70
|
-
logger.info(` Mode: ${platformSelection.mode}`);
|
|
71
|
-
if (platformSelection.specialist) {
|
|
72
|
-
logger.info(` Specialist: @bmad-agent-${platformSelection.specialist}`);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Phase 4: Recommend configuration
|
|
76
|
-
// TODO: Implement
|
|
77
|
-
|
|
78
|
-
// Phase 5: Run interview (unless --yes)
|
|
79
|
-
// TODO: Implement
|
|
80
|
-
|
|
81
|
-
// Phase 6: Backup existing installation
|
|
82
|
-
// backupPath = await backuper.backup('_bmad');
|
|
83
|
-
|
|
84
|
-
// Phase 7: Install agents
|
|
85
|
-
// TODO: Implement
|
|
86
|
-
|
|
87
|
-
// Phase 8: Validate installation
|
|
88
|
-
// TODO: Implement
|
|
89
|
-
|
|
90
|
-
// Phase 9: Show post-install wizard
|
|
91
|
-
// TODO: Implement
|
|
92
|
-
} catch (error) {
|
|
93
|
-
// ROLLBACK STRATEGY: Leave partial state + clear message
|
|
94
|
-
// Rationale (Mantra #37 Ockham's Razor):
|
|
95
|
-
// - Installation = mostly file copies (low risk)
|
|
96
|
-
// - User can re-run (idempotent)
|
|
97
|
-
// - Backup exists for manual restore
|
|
98
|
-
// - Auto-rollback risks losing working partial install
|
|
99
|
-
|
|
100
|
-
logger.error('Installation failed:', error.message);
|
|
101
|
-
|
|
102
|
-
if (backupPath) {
|
|
103
|
-
logger.info('\nPartial installation completed.');
|
|
104
|
-
logger.info(`Backup available at: ${backupPath}`);
|
|
105
|
-
logger.info('\nOptions:');
|
|
106
|
-
logger.info('1. Re-run: npx create-byan-agent');
|
|
107
|
-
logger.info(`2. Restore backup: yanstaller restore ${backupPath}`);
|
|
108
|
-
logger.info('3. Troubleshoot: yanstaller doctor');
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
throw error; // Re-throw for exit code handling
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Uninstall BYAN
|
|
117
|
-
*
|
|
118
|
-
* @returns {Promise<void>}
|
|
119
|
-
*/
|
|
120
|
-
async function uninstall() {
|
|
121
|
-
// TODO: Remove _bmad/, .github/agents/ stubs
|
|
122
|
-
}
|
|
123
|
-
|
|
124
21
|
/**
|
|
125
22
|
* Update existing BYAN installation
|
|
126
|
-
*
|
|
23
|
+
*
|
|
127
24
|
* @param {string} projectRoot - Project root directory
|
|
128
25
|
* @param {Object} [options={}] - Update options
|
|
129
26
|
* @param {boolean} [options.force] - Force update even if same version
|
|
@@ -163,12 +60,10 @@ async function listBackups(projectRoot) {
|
|
|
163
60
|
}
|
|
164
61
|
|
|
165
62
|
module.exports = {
|
|
166
|
-
install,
|
|
167
|
-
uninstall,
|
|
168
63
|
update,
|
|
169
64
|
rollback,
|
|
170
65
|
listBackups,
|
|
171
|
-
//
|
|
66
|
+
// Raw modules exposed for the CLI, the web UI, and tests
|
|
172
67
|
detector,
|
|
173
68
|
platformSelector,
|
|
174
69
|
updater,
|
|
@@ -33,13 +33,13 @@ const PLATFORM_INFO = {
|
|
|
33
33
|
displayName: 'Claude Code',
|
|
34
34
|
native: true,
|
|
35
35
|
specialist: 'claude',
|
|
36
|
-
icon: '
|
|
36
|
+
icon: ''
|
|
37
37
|
},
|
|
38
38
|
'codex': {
|
|
39
39
|
displayName: 'OpenCode/Codex',
|
|
40
40
|
native: true, // NOW NATIVE!
|
|
41
41
|
specialist: 'codex',
|
|
42
|
-
icon: '
|
|
42
|
+
icon: ''
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -50,7 +50,7 @@ const PLATFORM_INFO = {
|
|
|
50
50
|
* @returns {Promise<PlatformSelectionResult>}
|
|
51
51
|
*/
|
|
52
52
|
async function select(detectionResult) {
|
|
53
|
-
logger.info('\
|
|
53
|
+
logger.info('\nPlatform Selection\n');
|
|
54
54
|
|
|
55
55
|
// Build platform choices from detection
|
|
56
56
|
const choices = buildChoices(detectionResult.platforms);
|
|
@@ -75,7 +75,7 @@ async function select(detectionResult) {
|
|
|
75
75
|
{
|
|
76
76
|
type: 'list',
|
|
77
77
|
name: 'primary',
|
|
78
|
-
message: '
|
|
78
|
+
message: 'Choose your PRIMARY platform for native agent invocation:',
|
|
79
79
|
choices: [
|
|
80
80
|
...nativePlatforms.map(c => ({
|
|
81
81
|
name: `${c.icon} ${c.name} - ${c.agentSpecialist ? `@bmad-agent-${c.agentSpecialist}` : 'No specialist'}`,
|
|
@@ -84,11 +84,11 @@ async function select(detectionResult) {
|
|
|
84
84
|
})),
|
|
85
85
|
new inquirer.Separator(),
|
|
86
86
|
{
|
|
87
|
-
name: '
|
|
87
|
+
name: 'Advanced: Install on multiple platforms',
|
|
88
88
|
value: 'multi'
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
name: '
|
|
91
|
+
name: 'Skip native integration (manual install only)',
|
|
92
92
|
value: 'skip'
|
|
93
93
|
}
|
|
94
94
|
]
|
|
@@ -125,7 +125,7 @@ async function select(detectionResult) {
|
|
|
125
125
|
message: 'Choose installation target:',
|
|
126
126
|
choices: [
|
|
127
127
|
{
|
|
128
|
-
name:
|
|
128
|
+
name: `Auto (detect & install all available) - ${choices.length} platform(s)`,
|
|
129
129
|
value: 'auto'
|
|
130
130
|
},
|
|
131
131
|
...choices.map(c => ({
|
|
@@ -133,7 +133,7 @@ async function select(detectionResult) {
|
|
|
133
133
|
value: `single:${c.id}`
|
|
134
134
|
})),
|
|
135
135
|
{
|
|
136
|
-
name: '
|
|
136
|
+
name: 'Custom (select multiple)',
|
|
137
137
|
value: 'custom'
|
|
138
138
|
}
|
|
139
139
|
]
|
|
@@ -167,7 +167,7 @@ function buildChoices(detectedPlatforms) {
|
|
|
167
167
|
displayName: p.name,
|
|
168
168
|
native: false,
|
|
169
169
|
specialist: null,
|
|
170
|
-
icon: '
|
|
170
|
+
icon: ''
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
return {
|
|
@@ -189,8 +189,8 @@ function buildChoices(detectedPlatforms) {
|
|
|
189
189
|
* @returns {string}
|
|
190
190
|
*/
|
|
191
191
|
function formatPlatformChoice(choice) {
|
|
192
|
-
const nativeBadge = choice.native ? '
|
|
193
|
-
const statusBadge = choice.detected ? '
|
|
192
|
+
const nativeBadge = choice.native ? 'Native' : 'Conversational';
|
|
193
|
+
const statusBadge = choice.detected ? '[OK]' : '[x]';
|
|
194
194
|
|
|
195
195
|
return `${choice.icon} ${choice.name} (${nativeBadge}) ${statusBadge}`;
|
|
196
196
|
}
|
package/install/src/index.js
CHANGED
|
@@ -59,7 +59,7 @@ class Dashboard {
|
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* const byan = createByanInstance({ workerCount: 2 });
|
|
62
|
-
* await byan.executeWorkflow('
|
|
62
|
+
* await byan.executeWorkflow('_byan/workflows/create-prd/workflow.yaml');
|
|
63
63
|
*/
|
|
64
64
|
function createByanInstance(options = {}) {
|
|
65
65
|
const {
|
package/install/src/webui/api.js
CHANGED
|
@@ -165,19 +165,6 @@ const routes = {
|
|
|
165
165
|
await sleep(300);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
if (yanstaller) {
|
|
169
|
-
try {
|
|
170
|
-
await yanstaller.install({
|
|
171
|
-
mode: config.mode || 'full',
|
|
172
|
-
platforms: config.platforms,
|
|
173
|
-
yes: true,
|
|
174
|
-
projectRoot
|
|
175
|
-
});
|
|
176
|
-
} catch (err) {
|
|
177
|
-
server.broadcastLog('warn', `Yanstaller: ${err.message} (continuing with stub install)`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
168
|
ensureDirectoryStructure(projectRoot);
|
|
182
169
|
writeBaseConfig(projectRoot, config);
|
|
183
170
|
|
|
@@ -26,7 +26,7 @@ class Bridge {
|
|
|
26
26
|
if (!agentName) return null;
|
|
27
27
|
|
|
28
28
|
// Layout resolver: Gen3 _byan/agent/<name>/ first, Gen2 flat +
|
|
29
|
-
// per-module
|
|
29
|
+
// per-module.
|
|
30
30
|
const hit = layoutResolver.resolveAgent(agentName, { projectRoot: this.projectRoot });
|
|
31
31
|
return hit ? hit.path : null;
|
|
32
32
|
}
|
|
@@ -96,7 +96,7 @@ function parseFrontmatter(content) {
|
|
|
96
96
|
// Map a resolver layout (+ rel) to the legacy source label, so API responses
|
|
97
97
|
// stay stable: Gen2 flat / Gen3 -> 'byan', Gen2 per-module -> 'bmad-<mod>'.
|
|
98
98
|
function sourceForLayout(layout, rel) {
|
|
99
|
-
if (layout === 'gen2-module'
|
|
99
|
+
if (layout === 'gen2-module') {
|
|
100
100
|
const mod = String(rel).split('/')[1];
|
|
101
101
|
return `bmad-${mod}`;
|
|
102
102
|
}
|
|
@@ -67,6 +67,22 @@ Doctrine d'equipe complete (template role-in-team, analogie orchestre, principes
|
|
|
67
67
|
- Architecture portable (noyau portable, projection native): voir .claude/rules/portable-core.md (charge a la demande)
|
|
68
68
|
- Systeme API byan_web: voir @.claude/rules/byan-api.md
|
|
69
69
|
|
|
70
|
+
## Handoff Claude/Codex
|
|
71
|
+
|
|
72
|
+
Quand l'utilisateur demande `importe depuis claude` ou `importe depuis codex`,
|
|
73
|
+
ne demande pas de precision si un handoff depuis cette source existe. Lance:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
byan-handoff latest --from <source demandee> --prompt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Utilise le prompt produit comme contexte de reprise, inspecte les fichiers listes,
|
|
80
|
+
puis continue le travail. Si aucun fichier ne correspond, signale simplement
|
|
81
|
+
qu'aucun handoff depuis cette source n'a ete trouve et propose
|
|
82
|
+
`byan-handoff latest --prompt` comme fallback seulement si l'utilisateur accepte
|
|
83
|
+
de reprendre depuis le dernier handoff toutes sources confondues. Ne t'appuie
|
|
84
|
+
pas sur les memoires natives Claude/Codex comme source de verite.
|
|
85
|
+
|
|
70
86
|
## API byan_web
|
|
71
87
|
|
|
72
88
|
BYAN expose une API REST via `$BYAN_API_URL` avec authentification par token (`ApiKey` ou `Bearer`).
|
|
@@ -29,14 +29,20 @@ The tiering decision lives in one place — `_byan/mcp/byan-mcp-server/lib/nativ
|
|
|
29
29
|
(tier vocabulary, leaf classifier, model map). Three tiers:
|
|
30
30
|
|
|
31
31
|
- **cheap (`model: 'haiku'`)** — a pure EXPLORATION leaf (read/load/parse/detect).
|
|
32
|
-
- **balanced (`model: 'sonnet'`)** —
|
|
33
|
-
the `mech-` label prefix (`mech-validate-json`):
|
|
34
|
-
(JSON parses, schema matches, lint passes).
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
32
|
+
- **balanced (`model: 'sonnet'`)** — two classes land here. (1) MECHANICAL
|
|
33
|
+
verification, opt-in ONLY through the `mech-` label prefix (`mech-validate-json`):
|
|
34
|
+
a binary, judgment-free check (JSON parses, schema matches, lint passes). (2)
|
|
35
|
+
ANALYSIS leaves (score/rank/assess/design/nfr/coverage/recommend/synthesize),
|
|
36
|
+
auto-routed by keyword: judgment-bearing but rarely frontier, so sonnet by
|
|
37
|
+
default. This deliberately OVERRIDES the session model for analysis even on an
|
|
38
|
+
Opus / high-effort session (that is the cost lever) — escape a frontier analysis
|
|
39
|
+
leaf with the `deep-` prefix. A `mech-` leaf without `model: 'sonnet'` is a hard violation; an analysis
|
|
40
|
+
leaf may carry `model: 'sonnet'` (its tier) but not `haiku` (`analysis-below-tier`).
|
|
41
|
+
Semantic/adversarial VERIFICATION is NOT analysis and stays deep.
|
|
42
|
+
- **deep (OMIT `opts.model`)** — implementation + verification leaves inherit the
|
|
43
|
+
session model (no pin-up to opus). A genuinely frontier ANALYSIS leaf opts back to
|
|
44
|
+
deep with the `deep-` label prefix (`deep-assess-architecture`), the mirror of the
|
|
45
|
+
`mech-` opt-in.
|
|
40
46
|
|
|
41
47
|
The linter splits the two directions:
|
|
42
48
|
|
|
@@ -44,12 +50,14 @@ The linter splits the two directions:
|
|
|
44
50
|
pin-up, or a half-applied `mech-` opt-in is a contract violation
|
|
45
51
|
(`modelRoutingViolations` + `mechanicalLabelViolations`). This is the STRICT-2
|
|
46
52
|
No Downgrade net.
|
|
47
|
-
- **Ceiling (ADVISORY, non-blocking)** — an exploration-labelled leaf
|
|
48
|
-
deep is *reported* (`byan-lint-workflows.js --advise
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
- **Ceiling (ADVISORY, non-blocking)** — an exploration- OR analysis-labelled leaf
|
|
54
|
+
that runs deep is *reported* (`byan-lint-workflows.js --advise`:
|
|
55
|
+
`untiered-exploration` -> `model: 'haiku'`, `untiered-analysis` -> `model: 'sonnet'`),
|
|
56
|
+
not forced. `classifyLeaf` is permissive: many such leaves legitimately stay deep
|
|
57
|
+
because they bear a HALT/prerequisite gate, a classification, an exact conversion
|
|
58
|
+
consumed verbatim downstream, or genuinely frontier reasoning (`deep-` prefix). The
|
|
59
|
+
human owns that per-leaf call. Forcing a downgrade would be the very regression the
|
|
60
|
+
floor forbids.
|
|
53
61
|
|
|
54
62
|
## Ad-hoc scripts — the tier gate hook
|
|
55
63
|
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "
|
|
9
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/inject-soul.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"type": "command",
|
|
13
|
-
"command": "
|
|
13
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/inject-tao.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"type": "command",
|
|
17
|
-
"command": "
|
|
17
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/soul-memory-check.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -25,27 +25,27 @@
|
|
|
25
25
|
"hooks": [
|
|
26
26
|
{
|
|
27
27
|
"type": "command",
|
|
28
|
-
"command": "
|
|
28
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/inject-voice-anchor.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"type": "command",
|
|
32
|
-
"command": "
|
|
32
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/inject-delivery-default.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"type": "command",
|
|
36
|
-
"command": "
|
|
36
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/soul-memory-triggers.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"type": "command",
|
|
40
|
-
"command": "
|
|
40
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/fd-phase-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"type": "command",
|
|
44
|
-
"command": "
|
|
44
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/strict-context-inject.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "command",
|
|
48
|
-
"command": "
|
|
48
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/codex-autodelegate.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}
|
|
@@ -56,35 +56,35 @@
|
|
|
56
56
|
"hooks": [
|
|
57
57
|
{
|
|
58
58
|
"type": "command",
|
|
59
|
-
"command": "
|
|
59
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/mantra-validate.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"type": "command",
|
|
63
|
-
"command": "
|
|
63
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/fact-check-claims.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"type": "command",
|
|
67
|
-
"command": "
|
|
67
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/fd-response-check.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"type": "command",
|
|
71
|
-
"command": "
|
|
71
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/stage-to-byan.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"type": "command",
|
|
75
|
-
"command": "
|
|
75
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/strict-stop-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"type": "command",
|
|
79
|
-
"command": "
|
|
79
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/autobench-stop-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"type": "command",
|
|
83
|
-
"command": "
|
|
83
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/punt-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"type": "command",
|
|
87
|
-
"command": "
|
|
87
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/drain-advisory.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
88
88
|
}
|
|
89
89
|
]
|
|
90
90
|
}
|
|
@@ -95,15 +95,15 @@
|
|
|
95
95
|
"hooks": [
|
|
96
96
|
{
|
|
97
97
|
"type": "command",
|
|
98
|
-
"command": "
|
|
98
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/tool-transparency.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"type": "command",
|
|
102
|
-
"command": "
|
|
102
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/fact-check-absolutes.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"type": "command",
|
|
106
|
-
"command": "
|
|
106
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/strict-scope-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
},
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"hooks": [
|
|
113
113
|
{
|
|
114
114
|
"type": "command",
|
|
115
|
-
"command": "
|
|
115
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/tier-script-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
116
116
|
}
|
|
117
117
|
]
|
|
118
118
|
}
|
|
@@ -123,11 +123,11 @@
|
|
|
123
123
|
"hooks": [
|
|
124
124
|
{
|
|
125
125
|
"type": "command",
|
|
126
|
-
"command": "
|
|
126
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/tool-failure-guard.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"type": "command",
|
|
130
|
-
"command": "
|
|
130
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/leantime-fd-sync.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
131
131
|
}
|
|
132
132
|
]
|
|
133
133
|
}
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"hooks": [
|
|
139
139
|
{
|
|
140
140
|
"type": "command",
|
|
141
|
-
"command": "
|
|
141
|
+
"command": "p=\"$CLAUDE_PROJECT_DIR/.claude/hooks/pre-compact-save.js\"; [ -f \"$p\" ] || exit 0; exec node \"$p\""
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -18,6 +18,20 @@ Invoke this protocol when the user :
|
|
|
18
18
|
|
|
19
19
|
If the user request is a simple question or chat, stay out of FD — respond normally.
|
|
20
20
|
|
|
21
|
+
## 1.25. Claude/Codex handoff import trigger
|
|
22
|
+
|
|
23
|
+
When the user says `importe depuis claude` or `importe depuis codex`, handle it
|
|
24
|
+
before starting a new FD cycle:
|
|
25
|
+
|
|
26
|
+
1. Run `byan-handoff latest --from <requested source> --prompt`.
|
|
27
|
+
2. Use the generated prompt as resume context, inspect the listed files, then
|
|
28
|
+
continue the current work.
|
|
29
|
+
|
|
30
|
+
If no matching handoff exists, say that no handoff from that source was found and
|
|
31
|
+
offer `byan-handoff latest --prompt` as the fallback only if the user accepts
|
|
32
|
+
resuming from the newest handoff across all sources. Do not rely on native
|
|
33
|
+
Claude/Codex memory as the source of truth.
|
|
34
|
+
|
|
21
35
|
## 1.5. Freshness check (silent, once per session)
|
|
22
36
|
|
|
23
37
|
Before responding to the user's first activation message in a session, call the MCP tool `byan_update_check` once. It is read-only and cheap (single npm registry lookup, 5s timeout, no side effects).
|
|
@@ -19,3 +19,10 @@ description: "OpenCode/Codex integration specialist for BYAN skills Role: OpenCo
|
|
|
19
19
|
- Validate .codex/prompts/ structure
|
|
20
20
|
- Test skill detection before deployment
|
|
21
21
|
- Handle Codex-specific terminology (skills not agents)
|
|
22
|
+
- When the user says `importe depuis claude` or `importe depuis codex`, run
|
|
23
|
+
`byan-handoff latest --from <requested source> --prompt`, then resume from
|
|
24
|
+
the generated prompt after inspecting the listed files. If none matches,
|
|
25
|
+
report that no handoff from that source exists and offer
|
|
26
|
+
`byan-handoff latest --prompt` as fallback only if the user accepts resuming
|
|
27
|
+
from the newest handoff across all sources. Native Claude/Codex memory is not
|
|
28
|
+
the source of truth.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: byan
|
|
3
|
+
description: BYAN local project skill. Use when working in the BYAN repo, invoking BYAN agents/workflows/commands, enforcing BYAN Strict Mode, or needing the portable BYAN filesystem map.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BYAN Local Skill
|
|
7
|
+
|
|
8
|
+
Use this skill when the user asks for BYAN behavior, mentions BYAN/BMAD, asks to
|
|
9
|
+
run an agent or workflow from this repo, or works on the BYAN platform itself.
|
|
10
|
+
|
|
11
|
+
## Source Of Truth
|
|
12
|
+
|
|
13
|
+
BYAN's portable core lives in this repository. Do not treat native assistant
|
|
14
|
+
memory, generated caches, or platform-specific projections as authoritative.
|
|
15
|
+
|
|
16
|
+
Read `_byan/INDEX.md` first to find agents, workflows, commands, and project
|
|
17
|
+
artefacts. Avoid broad filesystem scans unless the index is missing, stale, or
|
|
18
|
+
insufficient for the requested task.
|
|
19
|
+
|
|
20
|
+
Core references:
|
|
21
|
+
|
|
22
|
+
- `_byan/INDEX.md` — filesystem map for BYAN agents, workflows, commands, and projects.
|
|
23
|
+
- `AGENTS.md` — Codex adapter for BYAN Strict Mode and delivery defaults.
|
|
24
|
+
- `.claude/rules/portable-core.md` — portable-core doctrine: `_byan/` and
|
|
25
|
+
`_byan-output/` are the source of truth; native platform features are
|
|
26
|
+
write-through accelerators.
|
|
27
|
+
- `_byan/agent/byan/byan.md` — BYAN core meta-agent when the task requires the
|
|
28
|
+
full BYAN persona and FD workflow.
|
|
29
|
+
|
|
30
|
+
## Strict Mode
|
|
31
|
+
|
|
32
|
+
When BYAN Strict Mode is active, follow the audit protocol before delivery:
|
|
33
|
+
|
|
34
|
+
1. Lock scope with `byan_strict_lock_scope` before building.
|
|
35
|
+
2. Build the locked scope without silent downgrade.
|
|
36
|
+
3. Run at least three `byan_strict_self_verify` passes against the original
|
|
37
|
+
request and acceptance criteria.
|
|
38
|
+
4. Call `byan_strict_complete` only after the final pass is `ok`.
|
|
39
|
+
|
|
40
|
+
Surface gaps explicitly. Do not round skipped tests, blocked tools, or partial
|
|
41
|
+
work up to done.
|
|
42
|
+
|
|
43
|
+
## Working Rules
|
|
44
|
+
|
|
45
|
+
- Prefer BYAN's local manifests and `_byan/INDEX.md` over filesystem wandering.
|
|
46
|
+
- Keep Codex-specific material under `.codex/` or installed Codex skills under
|
|
47
|
+
`$CODEX_HOME/skills` / `~/.codex/skills`.
|
|
48
|
+
- Use existing BYAN agents and workflows instead of inventing parallel
|
|
49
|
+
conventions.
|
|
50
|
+
- If a public surface changes, update the matching doc, manifest, template, or
|
|
51
|
+
generated projection when applicable.
|
|
52
|
+
- Preserve BYAN's no-emoji convention in code, commits, docs, and prompts.
|
|
53
|
+
|
|
54
|
+
## Claude/Codex Handoff Import
|
|
55
|
+
|
|
56
|
+
When the user says `importe depuis claude` or `importe depuis codex`, handle it
|
|
57
|
+
without asking for more context if a matching handoff exists:
|
|
58
|
+
|
|
59
|
+
1. Run `byan-handoff latest --from <requested source> --prompt`.
|
|
60
|
+
2. Treat the generated prompt as the resume context, inspect the listed files,
|
|
61
|
+
then continue the work.
|
|
62
|
+
|
|
63
|
+
If no matching handoff exists, say that no handoff from that source was found and
|
|
64
|
+
offer `byan-handoff latest --prompt` as the fallback only if the user accepts
|
|
65
|
+
resuming from the newest handoff across all sources. Do not rely on native
|
|
66
|
+
Claude/Codex memory as the source of truth.
|
|
67
|
+
|
|
68
|
+
## Installed Bundles In This Repo
|
|
69
|
+
|
|
70
|
+
Prebuilt Codex skill bundles are available under `dist/skill-bundles/`, including:
|
|
71
|
+
|
|
72
|
+
- `byan-byan.zip` — full BYAN FD/meta-agent skill.
|
|
73
|
+
- `byan-strict.zip` — strict scope-lock and audit protocol.
|
|
74
|
+
- `byan-codex.zip` — Codex/OpenCode integration specialist.
|
|
75
|
+
|
|
76
|
+
Use those bundles when the user asks for a specific packaged BYAN skill. Use this
|
|
77
|
+
local `byan` skill as the general repo-aware entrypoint.
|
|
@@ -99,7 +99,6 @@ Suite à la migration `_byan` → `_byan`, la structure BYAN v2 a été complét
|
|
|
99
99
|
- ComplexityScorer: Analyse complexité tâches (0.0-1.0)
|
|
100
100
|
- TaskRouter: Routage intelligent (local vs délégation)
|
|
101
101
|
- LocalExecutor: Exécution locale
|
|
102
|
-
- TaskToolInterface: Interface avec sous-agents Copilot CLI
|
|
103
102
|
|
|
104
103
|
3. **Generation Worker** (`generation/`)
|
|
105
104
|
- ProfileTemplate: Templates markdown avec placeholders
|