@the-bearded-bear/bear-craft 9.4.0-next.6b09f2d → 10.0.0-rc.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/Dev/scripts/lib/legacy-commands.sh +0 -1
- package/cli/lib/installer.js +3 -4
- package/cli/lib/migrate-legacy.js +2 -5
- package/cli/lib/plugin-install.js +14 -31
- package/package.json +1 -1
- package/bundles/cursor/.cursorrules +0 -363
- package/bundles/windsurf/.windsurfrules +0 -363
- package/cli/kanban/client/dist/assets/BurndownView-CnsZ1jie.css +0 -1
- package/cli/kanban/client/dist/assets/BurndownView-DCE9cvts.js +0 -3
- package/cli/kanban/client/dist/assets/DepsView-D3oHCqqG.js +0 -1
- package/cli/kanban/client/dist/assets/DocsView-DLwHBCwr.js +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-B4toxGc4.css +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-DGAKq2pr.js +0 -1
- package/cli/kanban/client/dist/assets/actions-CHrKQWe5.js +0 -2
- package/cli/kanban/client/dist/assets/cytoscape-dagre-Br_seqxP.js +0 -2
- package/cli/kanban/client/dist/assets/cytoscape.esm-BaNnhyvu.js +0 -321
- package/cli/kanban/client/dist/assets/de-CVJSPmev.js +0 -1
- package/cli/kanban/client/dist/assets/es-N6mwstsx.js +0 -1
- package/cli/kanban/client/dist/assets/fr-BlxcOFMY.js +0 -1
- package/cli/kanban/client/dist/assets/index-BimcLpOz.css +0 -1
- package/cli/kanban/client/dist/assets/index-BjIT-7fF.js +0 -2
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-700-normal-BWTpRfYl.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-700-normal-CEoEElIJ.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-400-normal-Bh0R7Dhr.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-400-normal-C_uLvvQ5.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-500-normal-C9ShMxGR.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-500-normal-CEVyPk4Y.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-600-normal-DVvC-yKp.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-600-normal-Dj6eZy5f.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-700-normal-D6iG63UR.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-700-normal-iEXTdOVf.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-700-normal-C6CZE3T8.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-greek-700-normal-DEigVDxa.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-700-normal-D3wTyLJW.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-700-normal-CZipNAKV.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-latin-ext-700-normal-CxPITLHs.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-400-normal-ByoDsISC.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-500-normal-BvH7FW2L.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-600-normal-Dtizs43-.woff2 +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-700-normal-BDLVIk2r.woff +0 -0
- package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-700-normal-k5PzE07T.woff2 +0 -0
- package/cli/kanban/client/dist/assets/marked.esm-2LEqwveT.js +0 -64
- package/cli/kanban/client/dist/assets/palette.svelte-B5M5XhuY.js +0 -1
- package/cli/kanban/client/dist/assets/pt-D9KPgMEl.js +0 -1
- package/cli/kanban/client/dist/assets/purify.es-Dqk5qvad.js +0 -3
- package/cli/kanban/client/dist/assets/router.svelte-D2AxOIQu.js +0 -1
- package/cli/kanban/client/dist/assets/space-grotesk-latin-400-normal-BnQMeOim.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-400-normal-CJ-V5oYT.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-500-normal-CNSSEhBt.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-600-normal-BflQw4A9.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-600-normal-DjKNqYRj.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-700-normal-CwsQ-cCU.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-700-normal-RjhwGPKo.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-400-normal-CfP_5XZW.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-400-normal-DRPE3kg4.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-500-normal-3dgZTiw9.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-600-normal-DxxdqCpr.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-600-normal-VcznFIpX.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-700-normal-BQnZhY3m.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-latin-ext-700-normal-HVCqSBdx.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-400-normal-B7xT_GF5.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-400-normal-BIWiOVfw.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-500-normal-BTqKIpxg.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-500-normal-BmEvtly_.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-600-normal-D6zpsUhD.woff +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-600-normal-DUi7WF5p.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-700-normal-DMty7AZE.woff2 +0 -0
- package/cli/kanban/client/dist/assets/space-grotesk-vietnamese-700-normal-Duxec5Rn.woff +0 -0
- package/cli/kanban/client/dist/index.html +0 -28
package/cli/lib/installer.js
CHANGED
|
@@ -329,17 +329,16 @@ export async function runInstallation(cli, { CLI_ROOT, VERSION, execFn }) {
|
|
|
329
329
|
const sameLang = previous && previous.lang === lang;
|
|
330
330
|
const recordedTechs = [...new Set([...(sameLang ? previous.techs : []), ...installTechs])];
|
|
331
331
|
const recordedInfra = [...new Set([...(sameLang ? previous.infra : []), ...infra])];
|
|
332
|
-
const { ids } = installPlugins(
|
|
332
|
+
const { ids, marketplace } = installPlugins(
|
|
333
333
|
{
|
|
334
334
|
target,
|
|
335
335
|
cliRoot: CLI_ROOT,
|
|
336
336
|
install: { lang, techs: recordedTechs, infra: recordedInfra, hooks },
|
|
337
337
|
version: VERSION ?? 'unknown',
|
|
338
338
|
},
|
|
339
|
-
deps
|
|
339
|
+
{ ...deps, log: (m) => console.log(` ${c.dim}${m}${c.reset}`) }
|
|
340
340
|
);
|
|
341
|
-
|
|
342
|
-
console.log(` ${c.green}[OK]${c.reset} ${ids.length} plugins enabled`);
|
|
341
|
+
console.log(` ${c.green}[OK]${c.reset} ${ids.length} plugins enabled (${marketplace})`);
|
|
343
342
|
|
|
344
343
|
// Install RTK (Token Optimizer)
|
|
345
344
|
if (cli.config.includeRtk) {
|
|
@@ -13,7 +13,6 @@ import fs from 'fs';
|
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import * as yaml from 'js-yaml';
|
|
15
15
|
import { removeHooks } from '../../Dev/scripts/lib/merge-hooks.mjs';
|
|
16
|
-
import { assertSafeLang, assertSafeTarget } from './path-safety.js';
|
|
17
16
|
|
|
18
17
|
const KINDS = ['commands', 'agents', 'skills', 'templates', 'checklists', 'hooks'];
|
|
19
18
|
|
|
@@ -148,10 +147,8 @@ function removeEmptyDirs(dir) {
|
|
|
148
147
|
* @returns {{removed: number, kept: string[], hooksRemoved: number}}
|
|
149
148
|
*/
|
|
150
149
|
export function migrateLegacyInstall({ target, lang, cliRoot, log = () => {}, warn = () => {} }) {
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
const claude = path.join(projectRoot, '.claude');
|
|
154
|
-
const ours = shippedFiles(cliRoot, assertSafeLang(lang));
|
|
150
|
+
const claude = path.join(target, '.claude');
|
|
151
|
+
const ours = shippedFiles(cliRoot, lang);
|
|
155
152
|
let removed = 0;
|
|
156
153
|
const keptByDir = new Map();
|
|
157
154
|
|
|
@@ -11,7 +11,6 @@ import path from 'path';
|
|
|
11
11
|
import { spawnSync } from 'child_process';
|
|
12
12
|
import { randomUUID } from 'crypto';
|
|
13
13
|
import { MIN_CLAUDE_CODE, assessClaude } from './claude-code.js';
|
|
14
|
-
import { assertSafeLang, assertSafeTarget } from './path-safety.js';
|
|
15
14
|
|
|
16
15
|
/** Infra namespaces published as plugins (bear-<name>). */
|
|
17
16
|
export const INFRA_PLUGINS = [
|
|
@@ -50,22 +49,6 @@ export const marketplaceOf = (record) => record.marketplace ?? marketplaceName(r
|
|
|
50
49
|
/** Error whose message tells the user what to do; the CLI prints it and exits non-zero. */
|
|
51
50
|
export class PluginInstallError extends Error {}
|
|
52
51
|
|
|
53
|
-
/**
|
|
54
|
-
* Path below the project directory. The project is validated first (`assertSafeTarget` refuses system
|
|
55
|
-
* directories) and the joined path must stay inside it (CWE-22).
|
|
56
|
-
* @param {string} target - project directory
|
|
57
|
-
* @param {...string} segments
|
|
58
|
-
* @returns {string}
|
|
59
|
-
*/
|
|
60
|
-
export function inProject(target, ...segments) {
|
|
61
|
-
const root = assertSafeTarget(target);
|
|
62
|
-
const resolved = path.resolve(root, ...segments);
|
|
63
|
-
if (resolved !== root && !resolved.startsWith(root + path.sep)) {
|
|
64
|
-
throw new PluginInstallError(`Refusing a path outside the project: ${segments.join('/')}`);
|
|
65
|
-
}
|
|
66
|
-
return resolved;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
52
|
/**
|
|
70
53
|
* Default executor: run a program without a shell.
|
|
71
54
|
* @param {string} cmd
|
|
@@ -158,11 +141,11 @@ export function ensureClaude(deps = {}) {
|
|
|
158
141
|
* @returns {string} destination directory
|
|
159
142
|
*/
|
|
160
143
|
export function copyMarketplace(cliRoot, lang, target, marketplace) {
|
|
161
|
-
const src = path.join(cliRoot, 'marketplaces',
|
|
144
|
+
const src = path.join(cliRoot, 'marketplaces', lang);
|
|
162
145
|
if (!fs.existsSync(path.join(src, '.claude-plugin', 'marketplace.json'))) {
|
|
163
146
|
throw new PluginInstallError(`No marketplace for language "${lang}" in this package (${src}).`);
|
|
164
147
|
}
|
|
165
|
-
const dest =
|
|
148
|
+
const dest = path.join(target, BEAR_DIR, 'marketplace');
|
|
166
149
|
fs.rmSync(dest, { recursive: true, force: true });
|
|
167
150
|
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
168
151
|
fs.cpSync(src, dest, { recursive: true });
|
|
@@ -190,7 +173,7 @@ const readJson = (file, fallback) => {
|
|
|
190
173
|
* @returns {boolean} whether the file was rewritten
|
|
191
174
|
*/
|
|
192
175
|
export function rewriteMarketplacePath(target, mktName) {
|
|
193
|
-
const file =
|
|
176
|
+
const file = path.join(target, '.claude', 'settings.json');
|
|
194
177
|
const settings = readJson(file, null);
|
|
195
178
|
const entry = settings?.extraKnownMarketplaces?.[mktName];
|
|
196
179
|
if (!entry?.source) return false;
|
|
@@ -200,11 +183,11 @@ export function rewriteMarketplacePath(target, mktName) {
|
|
|
200
183
|
return true;
|
|
201
184
|
}
|
|
202
185
|
|
|
203
|
-
export const installJsonPath = (target) =>
|
|
186
|
+
export const installJsonPath = (target) => path.join(target, BEAR_DIR, 'install.json');
|
|
204
187
|
export const readInstallJson = (target) => readJson(installJsonPath(target), null);
|
|
205
188
|
|
|
206
189
|
export function writeInstallJson(target, data) {
|
|
207
|
-
fs.mkdirSync(
|
|
190
|
+
fs.mkdirSync(path.join(target, BEAR_DIR), { recursive: true });
|
|
208
191
|
fs.writeFileSync(installJsonPath(target), `${JSON.stringify(data, null, 2)}\n`);
|
|
209
192
|
}
|
|
210
193
|
|
|
@@ -252,7 +235,7 @@ export function registerAndInstall(target, install, deps = {}) {
|
|
|
252
235
|
* Every other key is preserved.
|
|
253
236
|
*/
|
|
254
237
|
function migrateGenericMarketplace(target, legacyName, run, log) {
|
|
255
|
-
const file =
|
|
238
|
+
const file = path.join(target, '.claude', 'settings.json');
|
|
256
239
|
const settings = readJson(file, null);
|
|
257
240
|
if (!settings) return;
|
|
258
241
|
const suffix = `@${legacyName}`;
|
|
@@ -278,7 +261,7 @@ export function installPlugins({ target, cliRoot, install, version }, deps = {})
|
|
|
278
261
|
const previous = readInstallJson(target);
|
|
279
262
|
const marketplace = install.marketplace ?? previous?.marketplace ?? newMarketplaceId();
|
|
280
263
|
copyMarketplace(cliRoot, install.lang, target, marketplace);
|
|
281
|
-
fs.writeFileSync(
|
|
264
|
+
fs.writeFileSync(path.join(target, BEAR_DIR, 'VERSION'), `${version}\n`);
|
|
282
265
|
if (previous && !previous.marketplace) migrateGenericMarketplace(target, marketplaceName(previous.lang), run, log);
|
|
283
266
|
const ids = registerAndInstall(target, { ...install, marketplace }, deps);
|
|
284
267
|
writeInstallJson(target, buildInstallRecord({ ...install, marketplace, version }));
|
|
@@ -296,7 +279,7 @@ export function syncPlugins(target, deps = {}) {
|
|
|
296
279
|
`No ${BEAR_DIR}/install.json in ${target}: run \`bear-craft install\` (or \`update\`) first.`
|
|
297
280
|
);
|
|
298
281
|
}
|
|
299
|
-
if (!fs.existsSync(
|
|
282
|
+
if (!fs.existsSync(path.join(target, BEAR_DIR, 'marketplace', '.claude-plugin', 'marketplace.json'))) {
|
|
300
283
|
throw new PluginInstallError(
|
|
301
284
|
`${BEAR_DIR}/marketplace is missing in ${target}: run \`bear-craft update\` to restore it.`
|
|
302
285
|
);
|
|
@@ -318,7 +301,7 @@ export function diagnosePlugins(target, deps = {}) {
|
|
|
318
301
|
|
|
319
302
|
const mkt = marketplaceOf(record);
|
|
320
303
|
const hasMarketplace = fs.existsSync(
|
|
321
|
-
|
|
304
|
+
path.join(target, BEAR_DIR, 'marketplace', '.claude-plugin', 'marketplace.json')
|
|
322
305
|
);
|
|
323
306
|
out.push(
|
|
324
307
|
hasMarketplace
|
|
@@ -326,7 +309,7 @@ export function diagnosePlugins(target, deps = {}) {
|
|
|
326
309
|
: { level: 'fail', message: `${BEAR_DIR}/marketplace missing — run bear-craft update` }
|
|
327
310
|
);
|
|
328
311
|
|
|
329
|
-
const settings = readJson(
|
|
312
|
+
const settings = readJson(path.join(target, '.claude', 'settings.json'), {});
|
|
330
313
|
const declared = settings.extraKnownMarketplaces?.[mkt];
|
|
331
314
|
if (!declared) {
|
|
332
315
|
out.push({
|
|
@@ -356,7 +339,7 @@ export function diagnosePlugins(target, deps = {}) {
|
|
|
356
339
|
if (list.status === 0) {
|
|
357
340
|
const known = parseJsonSafe(list.stdout);
|
|
358
341
|
const entry = (known ?? []).find((m) => m.name === mkt);
|
|
359
|
-
const expected =
|
|
342
|
+
const expected = path.resolve(target, BEAR_DIR, 'marketplace');
|
|
360
343
|
if (!entry) {
|
|
361
344
|
out.push({
|
|
362
345
|
level: 'warn',
|
|
@@ -392,7 +375,7 @@ export function readPluginState(target) {
|
|
|
392
375
|
const record = readInstallJson(target);
|
|
393
376
|
if (!record) return null;
|
|
394
377
|
const mkt = marketplaceOf(record);
|
|
395
|
-
const settings = readJson(
|
|
378
|
+
const settings = readJson(path.join(target, '.claude', 'settings.json'), {});
|
|
396
379
|
const countDir = (dir, test) => {
|
|
397
380
|
try {
|
|
398
381
|
return fs.readdirSync(dir, { withFileTypes: true }).filter(test).length;
|
|
@@ -401,10 +384,10 @@ export function readPluginState(target) {
|
|
|
401
384
|
}
|
|
402
385
|
};
|
|
403
386
|
const plugins = Object.entries(settings.enabledPlugins ?? {})
|
|
404
|
-
.filter(([id, on]) => on === true && id.endsWith(`@${mkt}`)
|
|
387
|
+
.filter(([id, on]) => on === true && id.endsWith(`@${mkt}`))
|
|
405
388
|
.map(([id]) => {
|
|
406
389
|
const name = id.slice(0, id.lastIndexOf('@'));
|
|
407
|
-
const dir =
|
|
390
|
+
const dir = path.join(target, BEAR_DIR, 'marketplace', 'plugins', name);
|
|
408
391
|
return {
|
|
409
392
|
id,
|
|
410
393
|
name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-bearded-bear/bear-craft",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-rc.0",
|
|
4
4
|
"description": "A comprehensive framework for AI-assisted development with Claude Code. Install standardized rules, agents, and commands for your projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli/index.js",
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
# Bear Craft — AI-First TDD Framework for Cursor IDE
|
|
2
|
-
# Generated from https://github.com/TheBeardedBearSAS/bear-craft
|
|
3
|
-
# Version: 8.0.1 | Last updated: 2026-04-17
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Core Framework
|
|
8
|
-
|
|
9
|
-
# Bear-Craft - Multi-Technology Framework
|
|
10
|
-
|
|
11
|
-
**Version:** 9.4.0 | **Languages:** en, fr, es, de, pt
|
|
12
|
-
|
|
13
|
-
A comprehensive AI-assisted development framework for Claude Code with 17 technology stacks, 33 specialized agents (+39 infra agents on-demand), 143 commands across 18 namespaces, and BMAD v6 project management.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Supported Technologies (2026)
|
|
18
|
-
|
|
19
|
-
| Stack | Version | Architecture | Key Patterns |
|
|
20
|
-
|-------|---------|--------------|--------------|
|
|
21
|
-
| **.NET / C#** | 10 LTS / C# 14 | Clean Architecture | CQRS, MediatR (ou alternative), EF Core |
|
|
22
|
-
| **Symfony / PHP** | 8.1 / PHP 8.4+ | Clean Architecture | DDD, Hexagonal, API Platform, HTTP-less apps, JsonStreamer |
|
|
23
|
-
| **Flutter / Dart** | 3.47 / Dart 3.13 | Clean Architecture | BLoC v9, Riverpod 3, Material 3, Impeller |
|
|
24
|
-
| **React** | 19.3 + Compiler 1.0 | Feature-based | Hooks, Zustand, React Query, Server Components |
|
|
25
|
-
| **React Native** | 0.88 (New Architecture) — Expo SDK 58 | Feature-based | Navigation 7, Reanimated 4, TurboModules |
|
|
26
|
-
| **Angular** | 22 | Domain-driven | Signals, Signal Forms (stable), Zoneless par défaut, OnPush défaut, httpResource (TS 6) |
|
|
27
|
-
| **Vue.js** | 3.5+ (3.6 RC Vapor) | Composition API | Pinia 4, Vue Router 5, Vite 8, Vitest, Alien Signals |
|
|
28
|
-
| **Vite** _(community, framework-agnostic)_ | 8.3 | Vanilla / Library / Multi-page | `build.lib`, `vite-plugin-dts`, `input` multi-page, Workers/WASM |
|
|
29
|
-
| **Vercel** _(community, deployment platform)_ | 65.14.0 | Platform config (framework-agnostic) | `vercel.json`, Functions (Node.js/Fluid Compute), ISR, Cron Jobs, Storage |
|
|
30
|
-
| **Tauri** _(community, desktop & mobile)_ | 2.12 | Rust core + web frontend (framework-agnostic) | Commands/IPC, capabilities & permissions, CSP, Isolation, plugins, signed updater, iOS/Android |
|
|
31
|
-
| **WordPress** _(community, plugins & block themes)_ | 7.1 / PHP 7.4+ (8.3+ recommandé) | Plugin/theme + hooks | block.json, theme.json, REST API, WP-CLI, WPCS, PHPStan, wp-env ; WooCommerce 11.2 via skill optionnel |
|
|
32
|
-
| **Laravel** | 13.x / PHP 8.3+ (8.5 recommandé) | Clean Architecture | Actions, Pest 4/5 (Pest 5 : PHP 8.4+), Sanctum, AI SDK, Passkey |
|
|
33
|
-
| **Python** | 3.15 / 3.14+ | Clean Architecture / Hexagonal | FastAPI, async/await, Pydantic, free-threading, JIT |
|
|
34
|
-
| **PHP** | 8.5 (Property Hooks 8.4+) | Clean Architecture | PER-CS 3.0 (ex-PSR-12), PHPStan Level 10, Pest 5 |
|
|
35
|
-
| **Ruby / Rails** | 8.1 / Ruby 4.0 | Rails Way (pragmatic Clean) | Service/Form/Query objects, Hotwire, Solid Queue, RSpec/Minitest, Brakeman |
|
|
36
|
-
| **Rust / Axum** | 0.8 / Rust 1.99 (edition 2024) | Layered workspace (Hexagonal) | Tokio, Tower, SQLx, thiserror + RFC 9457, cargo-nextest, Clippy, cargo-deny |
|
|
37
|
-
| **Paperclip** | 2026.1106.0 | Two-layer (control plane + adapters) | Node.js 24.11+, TypeScript, Vitest, PostgreSQL, governance-first |
|
|
38
|
-
|
|
39
|
-
### Technology Quick Links
|
|
40
|
-
|
|
41
|
-
| Technology | Reference | Commands |
|
|
42
|
-
|------------|-----------|----------|
|
|
43
|
-
| C# / .NET | `@.claude/references/csharp/` | `/bear-csharp:*` |
|
|
44
|
-
| Symfony / PHP | `@.claude/references/symfony/CLAUDE.md` | `/bear-symfony:*` |
|
|
45
|
-
| Flutter / Dart | `@.claude/references/flutter/CLAUDE.md` | `/bear-flutter:*` |
|
|
46
|
-
| React | `@.claude/references/react/` | `/bear-react:*` |
|
|
47
|
-
| React Native | `@.claude/references/reactnative/CLAUDE.md` | `/bear-reactnative:*` |
|
|
48
|
-
| Angular | `@.claude/references/angular/CLAUDE.md` | `/bear-angular:*` |
|
|
49
|
-
| Vue.js | `@.claude/references/vuejs/CLAUDE.md` | `/bear-vuejs:*` |
|
|
50
|
-
| Vite _(community)_ | `@.claude/references/vite/CLAUDE.md` | `/bear-vite:*` |
|
|
51
|
-
| Vercel _(community)_ | `@.claude/references/vercel/CLAUDE.md` | `/bear-vercel:*` |
|
|
52
|
-
| Laravel | `@.claude/references/laravel/` | `/bear-laravel:*` |
|
|
53
|
-
| Python | `@.claude/references/python/` | `/bear-python:*` |
|
|
54
|
-
| PHP | `@.claude/references/php/` | `/bear-php:*` |
|
|
55
|
-
| Paperclip | `@.claude/references/paperclip/` | `/bear-paperclip:*` |
|
|
56
|
-
| **Svelte** _(community)_ | `@.claude/references/svelte/CLAUDE.md` | — |
|
|
57
|
-
|
|
58
|
-
> **Note:** Svelte/SvelteKit is **community-maintained** and hors-scope officiel. Voir `.claude/references/svelte/CLAUDE.md` pour le disclaimer complet.
|
|
59
|
-
|
|
60
|
-
> **Note:** Vite (ce stack) couvre uniquement l'usage **framework-agnostic** de Vite — apps vanilla JS/TS, bibliothèques npm (`build.lib`), apps multi-pages (option top-level `input`) et entrées Workers/WASM. Ce n'est **pas** un remplacement de la configuration Vite dev-server de React/Vue/Angular/Svelte, documentée dans le `tooling.md` propre à chacun de ces stacks.
|
|
61
|
-
|
|
62
|
-
> **Note:** Vercel couvre uniquement la **surface plateforme de déploiement agnostique au framework** — `vercel.json`, Functions (Node.js/Fluid Compute), ISR, Cron Jobs, Storage (Blob natif ; Postgres/KV via Marketplace — Neon/Upstash). Ce n'est **pas** un stack Next.js (hors-périmètre, aucun namespace `/nextjs:*`). Vercel recommande de migrer l'Edge Runtime (`export const runtime = 'edge'`) vers Node.js (Fluid Compute) — ce stack le documente uniquement à des fins de migration de code legacy.
|
|
63
|
-
|
|
64
|
-
See `@.claude/INDEX.md` for condensed checklists and patterns.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Available Commands (18 namespaces, 143 commands)
|
|
69
|
-
|
|
70
|
-
Core: `/bear-common:*`, `/bear-workflow:*`, `/bear-team:*`, `/bear-qa:*`, `/bear-uiux:*` | Tech: `/bear-symfony:*`, `/bear-react:*`, `/bear-flutter:*`, `/bear-python:*`, `/bear-angular:*`, `/bear-vuejs:*`, `/bear-laravel:*`, `/bear-reactnative:*`, `/bear-csharp:*`, `/bear-php:*` _(et `/bear-paperclip:*` via `--tech=paperclip`)_ | Infra (via `@devops-engineer`): Docker 29.9.3, Coolify v4.7.5, K8s 1.37.2, OpenTofu 1.13.9, Ansible 2.22.0, FrankenPHP 1.13.5, PgBouncer 1.26.1 | Project: `/bear-gate:*`, `/bear-project:*`
|
|
71
|
-
|
|
72
|
-
Full reference: [Commands](../docs/COMMANDS.md) | [CLI Reference](../docs/CLI-REFERENCE.md)
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Available Agents (31 specialized + 39 infra on-demand)
|
|
77
|
-
|
|
78
|
-
**Common** (20): `@api-designer`, `@database-architect`, `@devops-engineer`, `@performance-auditor`, `@refactoring-specialist`, `@tdd-coach`, `@uiux-orchestrator`, `@ui-designer`, `@ux-ergonome`, `@accessibility-expert`, `@research-assistant`, `@ralph-conductor`, `@security-auditor`, `@data-analyst`, `@migration-specialist`, `@cost-optimizer`, `@chaos-engineer`, `@devex-engineer`, `@mlops-engineer`, `@observability-engineer` | **Tech Reviewers** (11): `@{symfony,flutter,react,python,angular,laravel,vuejs,reactnative,csharp,php,paperclip}-reviewer` | **Infrastructure** (39): Docker, Coolify, K8s, OpenTofu, Ansible, Hcloud, PgBouncer, FrankenPHP — see [Agents](../docs/AGENTS.md) | **Project** (2): `@product-owner`, `@tech-lead`
|
|
79
|
-
|
|
80
|
-
Full reference: [Agents](../docs/AGENTS.md)
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## BMAD v6 Framework
|
|
85
|
-
|
|
86
|
-
| Track | Setup | Phases | Best For |
|
|
87
|
-
|-------|-------|--------|----------|
|
|
88
|
-
| **Quick Flow** | < 5 min | Implement only | Bug fixes, hotfixes |
|
|
89
|
-
| **Standard** | < 15 min | Plan -> Design -> Implement | New features |
|
|
90
|
-
| **Enterprise** | < 30 min | Analyze -> Plan -> Design -> Implement | Platforms |
|
|
91
|
-
|
|
92
|
-
**Quality Gates:** PRD >=80% | Tech Spec >=90% | INVEST 6/6 | Sprint Ready 100% | Story DoD 100% | Spec Alignment >=85%
|
|
93
|
-
|
|
94
|
-
**Status Routing:** `backlog -> ready-for-dev -> in-progress -> review -> done` (any -> `blocked`)
|
|
95
|
-
|
|
96
|
-
**TDD Phases:** Red -> Green -> Refactor
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Ralph Wiggum
|
|
101
|
-
|
|
102
|
-
Continuous AI loop that runs Claude until task completion: `/bear-common:ralph-run "task"`
|
|
103
|
-
|
|
104
|
-
**DoD Validators:** `command` | `output_contains` | `file_changed` | `hook` | `human`
|
|
105
|
-
|
|
106
|
-
## QA Recette
|
|
107
|
-
|
|
108
|
-
Automated acceptance testing via Chrome. **Golden Rule:** A fixed bug should NEVER reappear.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
/bear-qa:recette --scope=story --id=US-001 # Test a story
|
|
112
|
-
/bear-qa:recette --scope=sprint --id=Sprint-3 # Test a sprint
|
|
113
|
-
/bear-qa:recette --resume=REC-20260130-143022 # Resume session
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Prerequisites:** Chrome extension v1.0.36+ | Claude Code with `--chrome` or `/chrome`
|
|
117
|
-
|
|
118
|
-
> BMAD roles (bmad-master, pm, ba, architect, po, sm, dev, qa, qa-recette, ux) are integrated into workflow and sprint commands, not standalone agent files.
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Docker Requirement
|
|
123
|
-
|
|
124
|
-
**Always use Docker for commands to abstract from local environment.**
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
docker compose exec app php bin/console ...
|
|
128
|
-
docker compose exec app ./vendor/bin/phpunit
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Skills
|
|
134
|
-
|
|
135
|
-
`/solid-principles`, `/testing`, `/security`, `/git-workflow`, `/documentation`, `/kiss-dry-yagni`, `/workflow-analysis`, `/parallel-worktrees`, `/atomic-tasks`, `/design-md-convention`, `/architect`, `/debug-methodical`, `/socratic-brainstorm`, `/ecosystem-tools`, … — loaded on demand from `.claude/skills/`. **Full catalogue : [docs/SKILLS.md](../docs/SKILLS.md)**
|
|
136
|
-
|
|
137
|
-
## AI-First Development (Karpathy)
|
|
138
|
-
|
|
139
|
-
See `@.claude/rules/23-karpathy-principles.md` — 3 principles: **state assumptions explicitly**, **minimal code (no speculation)**, **surface confusion**. Apply to all LLM-assisted code. Extends rule 05 (KISS/DRY/YAGNI).
|
|
140
|
-
|
|
141
|
-
## Design System Convention
|
|
142
|
-
|
|
143
|
-
Projects with UI should include a root `DESIGN.md` file (template: `.claude/templates/DESIGN.md.template`). Skill `design-md-convention` and agents `@ui-designer`/`@ux-ergonome` auto-load it for consistent UI generation.
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Documentation
|
|
148
|
-
|
|
149
|
-
| Document | Description |
|
|
150
|
-
|----------|-------------|
|
|
151
|
-
| [Quickstart](../docs/QUICKSTART.md) | 5-minute getting started |
|
|
152
|
-
| [Prerequisites](../docs/PREREQUISITES.md) | Required dependencies |
|
|
153
|
-
| [CLI Reference](../docs/CLI-REFERENCE.md) | Full CLI documentation |
|
|
154
|
-
| [Commands](../docs/COMMANDS.md) | All commands |
|
|
155
|
-
| [Agents](../docs/AGENTS.md) | All agents |
|
|
156
|
-
| [FAQ](../docs/FAQ.md) | Common questions |
|
|
157
|
-
| [Troubleshooting](../docs/TROUBLESHOOTING.md) | Problem solving |
|
|
158
|
-
| [Ecosystem](../docs/ECOSYSTEM.md) | Third-party token/context/review tools |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Quick Start
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
# Install Bear Craft
|
|
166
|
-
npx @the-bearded-bear/bear-craft install . --tech=symfony --lang=en
|
|
167
|
-
|
|
168
|
-
# Or with Makefile
|
|
169
|
-
make install-symfony TARGET=. RULES_LANG=en
|
|
170
|
-
|
|
171
|
-
# Start workflow
|
|
172
|
-
/bear-workflow:init
|
|
173
|
-
|
|
174
|
-
# Use an agent
|
|
175
|
-
@tdd-coach Guide me through TDD for this feature
|
|
176
|
-
|
|
177
|
-
# Run audit
|
|
178
|
-
/bear-team:audit --sequential
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Claude Code Compatibility
|
|
184
|
-
|
|
185
|
-
**Minimum Version:** 2.1.325 (CVE-2026-86063 / CVE-2026-103435 / CVE-2026-103012 patched) | **Recommended:** 2.1.326 (Opus 5.5, Sonnet 5.5, Haiku 5.5, MCP 2026-07-28, hooks `onFailure: "block"`) — See `@.claude/COMPATIBILITY.md` for full changelog (v2.1.20+).
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Best Practices
|
|
190
|
-
|
|
191
|
-
See `.claude/rules/12-context-management.md` for detailed guidance.
|
|
192
|
-
|
|
193
|
-
| Practice | Description |
|
|
194
|
-
|----------|-------------|
|
|
195
|
-
| **CLAUDE.md size** | Keep under 200 lines; use `.claude/rules/` for details |
|
|
196
|
-
| **Use `/clear`** | Between unrelated tasks to reset context |
|
|
197
|
-
| **Sub-agents** | Delegate investigations to keep main context clean |
|
|
198
|
-
| **Verification loops** | Always provide tests/expected outputs (2-3x quality improvement) |
|
|
199
|
-
| **Plan Mode** | Invest in planning for complex tasks (> 3 files) |
|
|
200
|
-
| **Parallel worktrees** | Use `git worktree` for concurrent sessions |
|
|
201
|
-
| **Hooks** | CLAUDE.md = suggestions. Hooks = requirements |
|
|
202
|
-
| **`/memory`** | Persistent session learnings across conversations (v2.1.59+) |
|
|
203
|
-
| **Pointers over copies** | Reference files instead of copying code; `@path` imports still load at launch — plain paths or `paths:` rules load on demand |
|
|
204
|
-
| **Token optimization** | Use `/bear-common:setup-rtk` for 55-65% token savings |
|
|
205
|
-
| **Sub-agent model** | Set `CLAUDE_CODE_SUBAGENT_MODEL=claude-sonnet-5-5` for cost savings |
|
|
206
|
-
|
|
207
|
-
See `Dev/i18n/base/Common/hooks/templates/examples/` for ready-to-use hook templates.
|
|
208
|
-
|
|
209
|
-
## Quick Reference Index
|
|
210
|
-
|
|
211
|
-
# Bear-Craft Rules Index
|
|
212
|
-
|
|
213
|
-
## Stack Overview (2026)
|
|
214
|
-
|
|
215
|
-
.NET 10 LTS / C# 14 | Symfony 8.1 / PHP 8.4+ | Flutter 3.47 / Dart 3.13 | React 19.3 | Angular 22 | Vue 3.5+ | Laravel 13 / PHP 8.3+ | Python 3.15 / 3.14+
|
|
216
|
-
|
|
217
|
-
## Architecture Layers
|
|
218
|
-
|
|
219
|
-
```
|
|
220
|
-
WebAPI/Presentation → Infrastructure → Application → Domain (← INWARD ONLY)
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**Domain**: NO external deps, Value Objects, private setters | **Application**: CQRS (MediatR/alternative), DTOs, validation | **Infrastructure**: DB, external services
|
|
224
|
-
|
|
225
|
-
## Coding Standards
|
|
226
|
-
|
|
227
|
-
| Element | Convention | Always |
|
|
228
|
-
|---------|-----------|--------|
|
|
229
|
-
| Public | PascalCase | Pass `CancellationToken`, enable nullable |
|
|
230
|
-
| Private | _camelCase | Async suffix: `ProcessAsync` |
|
|
231
|
-
| Params | camelCase | Methods < 20 lines, complexity < 10 |
|
|
232
|
-
|
|
233
|
-
## SOLID + KISS/DRY/YAGNI
|
|
234
|
-
|
|
235
|
-
**SRP**: 1 reason to change | **OCP**: Extend via interfaces | **LSP**: Subtypes substitutable | **ISP**: < 5 methods/interface | **DIP**: Depend on abstractions
|
|
236
|
-
|
|
237
|
-
**KISS**: < 10 complexity | **DRY**: Extract after 3 occurrences | **YAGNI**: Only what's required
|
|
238
|
-
|
|
239
|
-
## Testing Pyramid
|
|
240
|
-
|
|
241
|
-
Unit 70% (< 1s) | Integration 20% (< 5s) | E2E 10% (< 30s) — **TDD**: RED → GREEN → REFACTOR
|
|
242
|
-
|
|
243
|
-
**Stacks**: xUnit/FluentAssertions (C#), Pest 5 (PHP), Vitest 5 (JS/TS), pytest 9 (Python)
|
|
244
|
-
|
|
245
|
-
## Security Essentials
|
|
246
|
-
|
|
247
|
-
Server-side validation | Parameterized queries | Secrets in vault | CSP/HSTS headers | `[Authorize(Policy)]`
|
|
248
|
-
|
|
249
|
-
## Git Workflow
|
|
250
|
-
|
|
251
|
-
**Conventional Commits**: `<type>(<scope>): <description>` — Types: feat, fix, docs, refactor, perf, test
|
|
252
|
-
**Branches**: `feature/`, `fix/`, `refactor/`
|
|
253
|
-
|
|
254
|
-
## Analysis Workflow (Mandatory)
|
|
255
|
-
|
|
256
|
-
1. Understand request → 2. Read affected files + deps → 3. Document impact/risks → 4. Validate if medium/high impact → 5. TDD first
|
|
257
|
-
|
|
258
|
-
## Technology References
|
|
259
|
-
|
|
260
|
-
| Stack | Path | Key Features |
|
|
261
|
-
|-------|------|--------------|
|
|
262
|
-
| **C# / .NET** | `@.claude/references/csharp/` | Extension Members, Span<T>, Clean Architecture |
|
|
263
|
-
| **Symfony / PHP** | `@.claude/references/symfony/CLAUDE.md` | JSON Streamer, ObjectMapper, DDD |
|
|
264
|
-
| **Flutter / Dart** | `@.claude/references/flutter/CLAUDE.md` | WASM, MCP, BLoC v9, Material 3 |
|
|
265
|
-
|
|
266
|
-
## Base Rules
|
|
267
|
-
|
|
268
|
-
`workflow-analysis.md` | `solid-principles.md` | `kiss-dry-yagni.md` | `git-workflow.md` | `security.md` | `testing.md` | `documentation.md`
|
|
269
|
-
|
|
270
|
-
## Tech-Specific Guides
|
|
271
|
-
|
|
272
|
-
**C#**: architecture, coding-standards, testing, security, tooling, quality-tools, aspire
|
|
273
|
-
**Symfony**: architecture, coding-standards, quality-tools, json-streamer, object-mapper
|
|
274
|
-
**Flutter**: coding-standards, wasm, mcp-integration, web-performance-2026
|
|
275
|
-
|
|
276
|
-
All in `@.claude/references/<tech>/`
|
|
277
|
-
|
|
278
|
-
## QA Recette Essentials
|
|
279
|
-
|
|
280
|
-
**Prerequisites**: Chrome extension v1.0.36+ | Claude Code `--chrome` or `/chrome`
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
/bear-qa:recette --scope=story --id=US-001 # Test story
|
|
284
|
-
/bear-qa:recette --resume=REC-xxx # Resume session
|
|
285
|
-
/bear-qa:fix --session=REC-xxx --severity=critical # Fix critical bugs
|
|
286
|
-
/bear-qa:regression --check # Check Golden Rule
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
**Golden Rule**: A fixed bug should NEVER reappear → auto-generates regression tests
|
|
290
|
-
|
|
291
|
-
**Output**: `.recette/` (plans, sessions, regression, metrics, reports)
|
|
292
|
-
|
|
293
|
-
## LSP Plugins
|
|
294
|
-
|
|
295
|
-
PHP: `php-lsp` | Python: `pyright-lsp` | TS/JS: `typescript-lsp` | Dart: `dart-analyzer` | C#: `csharp-lsp`
|
|
296
|
-
|
|
297
|
-
Install: `/plugins install <name>@claude-plugins-official`
|
|
298
|
-
|
|
299
|
-
> Full docs: `@.claude/COMPATIBILITY.md` | Technology details: `@.claude/references/<tech>/`
|
|
300
|
-
|
|
301
|
-
## Essential Rules (Condensed)
|
|
302
|
-
|
|
303
|
-
### SOLID Principles
|
|
304
|
-
SRP | OCP | LSP | ISP | DIP — See full rules in .claude/rules/04-solid-principles.md
|
|
305
|
-
|
|
306
|
-
### KISS, DRY, YAGNI
|
|
307
|
-
## KISS — Keep It Simple
|
|
308
|
-
|
|
309
|
-
| Metrique | Cible | Limite |
|
|
310
|
-
|----------|-------|--------|
|
|
311
|
-
| **Cognitive Complexity** (metrique primaire) | < 7 | < 10 |
|
|
312
|
-
| Lignes par methode | < 10 | < 20 |
|
|
313
|
-
| Complexite cyclomatique | < 5 | < 10 |
|
|
314
|
-
| Profondeur d'indentation | 2 | 3 max |
|
|
315
|
-
| Parametres par methode | 3 | 4 max |
|
|
316
|
-
|
|
317
|
-
> **Seuils < 7 / < 10 = choix interne du projet**, volontairement plus strict que le défaut de la règle Sonar S3776 (15 par fonction) : à relâcher si le contexte de l'équipe l'exige.
|
|
318
|
-
>
|
|
319
|
-
> **Cognitive Complexity** (SonarQube) est la metrique primaire retenue ici : elle mesure la difficulte humaine de comprehension et prevaut sur la stricte limite de 20 lignes. Source : [Sonar, Cognitive Complexity (livre blanc)](https://www.sonarsource.com/docs/CognitiveComplexity.pdf).
|
|
320
|
-
|
|
321
|
-
**Regles :** Early returns (guard clauses), pas de else imbrique, nommage explicite, composition > heritage.
|
|
322
|
-
|
|
323
|
-
### Testing
|
|
324
|
-
TDD: RED → GREEN → REFACTOR | Coverage >= 80% | Mutation testing
|
|
325
|
-
|
|
326
|
-
### Security
|
|
327
|
-
## OWASP Top 10:2025 — Toutes les categories (10/10)
|
|
328
|
-
|
|
329
|
-
| # | Menace | Defense |
|
|
330
|
-
|---|--------|---------|
|
|
331
|
-
| A01 | Broken Access Control (inclut **SSRF** consolidé) | Vérifier les permissions à CHAQUE requête, deny by default |
|
|
332
|
-
| A02 | Security Misconfiguration | Hardening, erreurs génériques en prod |
|
|
333
|
-
| A03 | **Software Supply Chain Failures** (nouveau 2025) | SLSA 1.2, SBOM (CycloneDX 1.7 / SPDX 3), Sigstore keyless signing, reproducible builds, Dependabot/Renovate, `npm audit --audit-level=moderate`, Trivy, Grype |
|
|
334
|
-
| A04 | Cryptographic Failures | TLS 1.3, **Argon2id** (minimum OWASP 19 MiB / t=2 / p=1 ; recommandation interne 128 MiB / t>=3 / p=1), secrets dans vault |
|
|
335
|
-
| A05 | Injection | Requêtes paramétrées, validation/sanitization |
|
|
336
|
-
| A06 | Insecure Design | Threat modeling, defense in depth, rate limiting |
|
|
337
|
-
| A07 | **Authentication Failures** | MFA obligatoire, brute-force protection, sessions invalidées à la déconnexion |
|
|
338
|
-
| A08 | **Software or Data Integrity Failures** | Vérification des signatures/checksums, CI/CD sécurisé, mises à jour signées |
|
|
339
|
-
| A09 | **Security Logging and Alerting Failures** | Centraliser les logs, alertes sur anomalies, rétention >= 1 an |
|
|
340
|
-
| A10 | **Mishandling of Exceptional Conditions** (nouveau 2025) | Logger les erreurs, ne jamais exposer la stack trace en prod |
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
### Git Workflow
|
|
344
|
-
Conventional Commits | GitHub Flow | Feature branches < 3 days
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## Full Documentation
|
|
350
|
-
|
|
351
|
-
For complete documentation, visit: https://bear-craft.dev
|
|
352
|
-
|
|
353
|
-
For full rules and references:
|
|
354
|
-
- SOLID: .claude/rules/04-solid-principles.md
|
|
355
|
-
- KISS/DRY/YAGNI: .claude/rules/05-kiss-dry-yagni.md
|
|
356
|
-
- Testing: .claude/rules/07-testing.md
|
|
357
|
-
- Security: .claude/rules/11-security.md
|
|
358
|
-
- Git Workflow: .claude/rules/09-git-workflow.md
|
|
359
|
-
- Context Management: .claude/rules/12-context-management.md
|
|
360
|
-
|
|
361
|
-
**Attribution:** The Bearded Bear / Bear Craft
|
|
362
|
-
**License:** MIT
|
|
363
|
-
**Repository:** https://github.com/TheBeardedBearSAS/bear-craft
|