@axiomatic-labs/claudeflow 2.13.151 → 2.13.153
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/lib/install.js +28 -34
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -170,9 +170,10 @@ async function run() {
|
|
|
170
170
|
materializeSharedAppendPrompt(cwd);
|
|
171
171
|
ensureDefaultClaudeMdRules(cwd);
|
|
172
172
|
propagateTemplateRules(cwd, srcTemplates);
|
|
173
|
-
// After CLAUDE.md exists,
|
|
174
|
-
//
|
|
175
|
-
//
|
|
173
|
+
// After CLAUDE.md exists, append the claudeflow addendum (the load-bearing
|
|
174
|
+
// rule "all code changes flow through /claudeflow-build" + mode-aware
|
|
175
|
+
// mandates). Idempotent: runs every install/update; the block lives
|
|
176
|
+
// between <!-- claudeflow:boost-mode:BEGIN/END --> markers.
|
|
176
177
|
syncBoostAddendumOnInstall(cwd);
|
|
177
178
|
|
|
178
179
|
// Copy template agents (only template-managed, preserve user agents)
|
|
@@ -969,9 +970,10 @@ function collectManagedPathsFromRelease(extractRoot) {
|
|
|
969
970
|
destPrefix: '.claude/hooks',
|
|
970
971
|
});
|
|
971
972
|
|
|
972
|
-
// Claudeflow dirs: runtime, templates, docs
|
|
973
|
-
// (variants/ removed in v2.13.148.
|
|
974
|
-
|
|
973
|
+
// Claudeflow dirs: runtime, templates, docs in .claudeflow/.
|
|
974
|
+
// (variants/ removed in v2.13.148. .claudeflow/cli/ removed in v2.13.153
|
|
975
|
+
// — only held the now-deleted claudeflow-mode.js variant-switcher.)
|
|
976
|
+
['runtime', 'templates', 'docs'].forEach((folder) => {
|
|
975
977
|
addFilesFromDir(managed, extractRoot, path.join(srcClaudeflow, folder));
|
|
976
978
|
});
|
|
977
979
|
|
|
@@ -1029,18 +1031,12 @@ function collectLegacyManagedPathsFromDisk(projectRoot) {
|
|
|
1029
1031
|
// Claude Code native: hooks stay in .claude/
|
|
1030
1032
|
addFilesFromDir(managed, projectRoot, path.join(claudeDir, 'hooks'));
|
|
1031
1033
|
|
|
1032
|
-
// Claudeflow dirs: runtime, templates, docs
|
|
1033
|
-
// (variants/ removed in v2.13.148.)
|
|
1034
|
-
['runtime', 'templates', 'docs'
|
|
1034
|
+
// Claudeflow dirs: runtime, templates, docs in .claudeflow/
|
|
1035
|
+
// (variants/ removed in v2.13.148. .claudeflow/cli/ removed in v2.13.153.)
|
|
1036
|
+
['runtime', 'templates', 'docs'].forEach((folder) => {
|
|
1035
1037
|
addFilesFromDir(managed, projectRoot, path.join(claudeflowDir, folder));
|
|
1036
1038
|
});
|
|
1037
1039
|
|
|
1038
|
-
// Root-level marker file for the active variant.
|
|
1039
|
-
const activeModePath = path.join(claudeflowDir, 'active-mode');
|
|
1040
|
-
if (fs.existsSync(activeModePath)) {
|
|
1041
|
-
managed.add('.claudeflow/active-mode');
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
1040
|
const skillsDir = path.join(claudeDir, 'skills');
|
|
1045
1041
|
if (fs.existsSync(skillsDir)) {
|
|
1046
1042
|
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
@@ -1297,24 +1293,26 @@ function copyDirSync(src, dst, skipNames) {
|
|
|
1297
1293
|
}
|
|
1298
1294
|
}
|
|
1299
1295
|
|
|
1300
|
-
//
|
|
1301
|
-
//
|
|
1302
|
-
//
|
|
1303
|
-
//
|
|
1304
|
-
//
|
|
1305
|
-
//
|
|
1296
|
+
// Append the claudeflow addendum to CLAUDE.md (idempotent).
|
|
1297
|
+
// The block between <!-- claudeflow:boost-mode:BEGIN/END --> markers carries
|
|
1298
|
+
// the load-bearing rule ("all code changes flow through /claudeflow-build")
|
|
1299
|
+
// plus mode-aware mandates. Re-runs on every install/update; refreshes a
|
|
1300
|
+
// stale block if present. Marker name preserved for backwards compatibility
|
|
1301
|
+
// with projects upgraded across the v2.13.148 variants-removal boundary.
|
|
1306
1302
|
function syncBoostAddendumOnInstall(cwd) {
|
|
1307
|
-
|
|
1303
|
+
// v2.13.152: in unified mode (mode is per-build, picked at /claudeflow-build
|
|
1304
|
+
// invocation), the addendum is always injected when CLAUDE.md exists. The
|
|
1305
|
+
// load-bearing rule "all code changes flow through /claudeflow-build" applies
|
|
1306
|
+
// regardless of which mode is picked per build, so we no longer gate on
|
|
1307
|
+
// .claudeflow/active-mode (which was removed in v2.13.148). Mode-specific
|
|
1308
|
+
// mandates inside the addendum body explicitly say "fast-only" or
|
|
1309
|
+
// "normal-only" so the LLM applies them conditionally.
|
|
1308
1310
|
const claudeMdPath = path.join(cwd, 'CLAUDE.md');
|
|
1309
|
-
// The addendum lives in .claudeflow/templates/ (not inside variants/) so
|
|
1310
|
-
// the /claudeflow-mode switch's persist-step does not wipe it on every
|
|
1311
|
-
// rotation. See .claudeflow/cli/claudeflow-mode.js for the same rationale.
|
|
1312
1311
|
const addendumPath = path.join(cwd, '.claudeflow', 'templates', 'CLAUDE_BOOST_ADDENDUM.md');
|
|
1313
|
-
if (!fs.existsSync(
|
|
1312
|
+
if (!fs.existsSync(claudeMdPath) || !fs.existsSync(addendumPath)) return;
|
|
1314
1313
|
|
|
1315
1314
|
const ADDENDUM_BEGIN = '<!-- claudeflow:boost-mode:BEGIN -->';
|
|
1316
1315
|
const ADDENDUM_END = '<!-- claudeflow:boost-mode:END -->';
|
|
1317
|
-
const activeMode = fs.readFileSync(activeModePath, 'utf8').trim();
|
|
1318
1316
|
const original = fs.readFileSync(claudeMdPath, 'utf8');
|
|
1319
1317
|
const beginIdx = original.indexOf(ADDENDUM_BEGIN);
|
|
1320
1318
|
const endIdx = original.indexOf(ADDENDUM_END);
|
|
@@ -1326,13 +1324,9 @@ function syncBoostAddendumOnInstall(cwd) {
|
|
|
1326
1324
|
base = original.slice(0, beginIdx).replace(/\s*$/, '') + original.slice(blockEnd).replace(/^\s*/, '\n');
|
|
1327
1325
|
}
|
|
1328
1326
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
fs.writeFileSync(claudeMdPath, base.replace(/\s*$/, '') + block);
|
|
1333
|
-
} else if (hasBlock) {
|
|
1334
|
-
fs.writeFileSync(claudeMdPath, base.replace(/\s*$/, '') + '\n');
|
|
1335
|
-
}
|
|
1327
|
+
const addendumBody = fs.readFileSync(addendumPath, 'utf8').trimEnd();
|
|
1328
|
+
const block = `\n\n${ADDENDUM_BEGIN}\n${addendumBody}\n${ADDENDUM_END}\n`;
|
|
1329
|
+
fs.writeFileSync(claudeMdPath, base.replace(/\s*$/, '') + block);
|
|
1336
1330
|
}
|
|
1337
1331
|
|
|
1338
1332
|
module.exports = Object.assign(run, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomatic-labs/claudeflow",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.153",
|
|
4
4
|
"description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claudeflow": "./bin/cli.js"
|