@axiomatic-labs/claudeflow 2.12.113 → 2.12.114
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 +32 -22
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -11,11 +11,13 @@ const ui = require('./ui.js');
|
|
|
11
11
|
// user-generated skills that are not part of the shipped asset.
|
|
12
12
|
const TEMPLATE_MANAGED_MANIFEST = path.join('.claudeflow', 'config', 'template-managed-manifest.json');
|
|
13
13
|
const CLAUDE_BACKUP_ROOT = '.claudeflow-backups';
|
|
14
|
-
const REQUIRED_TEMPLATE_RULES = [
|
|
14
|
+
const REQUIRED_TEMPLATE_RULES = [];
|
|
15
|
+
const LEGACY_TEMPLATE_RULES = ['claudeflow-implementation.md', 'example-rules.md'];
|
|
16
|
+
const SHARED_APPEND_PROMPT_TEMPLATE = path.join('.claudeflow', 'templates', 'claudeflow-core-system-prompt.md');
|
|
17
|
+
const SHARED_APPEND_PROMPT_OUTPUT = 'append-system-prompt.md';
|
|
15
18
|
const TEMPLATE_MANAGED_SETTINGS_KEYS = ['$schema', 'enabledMcpjsonServers', 'env', 'permissions', 'hooks'];
|
|
16
19
|
const SERENA_REPO = 'git+https://github.com/oraios/serena';
|
|
17
20
|
const TEMPLATE_SEEDED_SETTINGS_KEYS = new Set(['statusLine']);
|
|
18
|
-
const TEMPLATE_MANAGED_EXTRA_AGENTS = new Set(['example-agent']);
|
|
19
21
|
|
|
20
22
|
async function run() {
|
|
21
23
|
const current = readLocalVersion();
|
|
@@ -146,6 +148,7 @@ async function run() {
|
|
|
146
148
|
if (fs.existsSync(srcTemplates)) {
|
|
147
149
|
copyDirSync(srcTemplates, dstTemplates);
|
|
148
150
|
}
|
|
151
|
+
materializeSharedAppendPrompt(cwd);
|
|
149
152
|
|
|
150
153
|
// Copy template agents (only template-managed, preserve user agents)
|
|
151
154
|
const srcAgents = path.join(srcClaude, 'agents');
|
|
@@ -161,14 +164,9 @@ async function run() {
|
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
if (!fs.existsSync(srcRules)) {
|
|
168
|
-
throw new Error('Release asset is missing required .claude/rules directory. Rebuild the release before installing.');
|
|
169
|
-
}
|
|
170
|
-
assertRequiredTemplateRules(srcRules);
|
|
171
|
-
copyDirSync(srcRules, dstRules);
|
|
167
|
+
// Remove previously template-seeded base rules. Project memory now comes
|
|
168
|
+
// from setup-context, generated project rules, and root CLAUDE.md.
|
|
169
|
+
pruneLegacyTemplateRules(cwd);
|
|
172
170
|
|
|
173
171
|
// Copy commands
|
|
174
172
|
const srcCommands = path.join(srcClaude, 'commands');
|
|
@@ -214,17 +212,6 @@ async function run() {
|
|
|
214
212
|
// Install analysis tools (ast-grep + Serena MCP)
|
|
215
213
|
installAnalysisTools();
|
|
216
214
|
|
|
217
|
-
// Re-compose workflow rule if the template body was updated
|
|
218
|
-
try {
|
|
219
|
-
const composeScript = path.join(cwd, '.claudeflow', 'runtime', 'compose-workflow-rule.js');
|
|
220
|
-
const workflowBody = path.join(cwd, '.claudeflow', 'templates', 'claudeflow-workflow-body.md');
|
|
221
|
-
const workflowRule = path.join(cwd, '.claude', 'rules', 'claudeflow-workflow.md');
|
|
222
|
-
if (fs.existsSync(composeScript) && fs.existsSync(workflowBody) && fs.existsSync(workflowRule)) {
|
|
223
|
-
require('child_process').execSync(`node "${composeScript}" "${cwd}"`, { cwd, stdio: 'pipe' });
|
|
224
|
-
}
|
|
225
|
-
} catch {}
|
|
226
|
-
|
|
227
|
-
|
|
228
215
|
// Count installed items
|
|
229
216
|
const skillsDir = path.join(cwd, '.claude', 'skills');
|
|
230
217
|
let skillCount = 0;
|
|
@@ -837,8 +824,30 @@ function assertRequiredTemplateRules(rulesDir) {
|
|
|
837
824
|
}
|
|
838
825
|
}
|
|
839
826
|
|
|
827
|
+
function pruneLegacyTemplateRules(projectRoot) {
|
|
828
|
+
const rulesDir = path.join(projectRoot, '.claude', 'rules');
|
|
829
|
+
for (const filename of LEGACY_TEMPLATE_RULES) {
|
|
830
|
+
fs.rmSync(path.join(rulesDir, filename), { force: true });
|
|
831
|
+
}
|
|
832
|
+
if (fs.existsSync(rulesDir) && fs.readdirSync(rulesDir).length === 0) {
|
|
833
|
+
fs.rmdirSync(rulesDir);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
function materializeSharedAppendPrompt(projectRoot) {
|
|
838
|
+
const templatePath = path.join(projectRoot, SHARED_APPEND_PROMPT_TEMPLATE);
|
|
839
|
+
if (!fs.existsSync(templatePath)) {
|
|
840
|
+
throw new Error(
|
|
841
|
+
`Shared append prompt template is missing: ${SHARED_APPEND_PROMPT_TEMPLATE}. Rebuild the release before installing.`,
|
|
842
|
+
);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
const outputPath = path.join(projectRoot, SHARED_APPEND_PROMPT_OUTPUT);
|
|
846
|
+
fs.copyFileSync(templatePath, outputPath);
|
|
847
|
+
}
|
|
848
|
+
|
|
840
849
|
function isTemplateManagedAgent(agentName) {
|
|
841
|
-
return
|
|
850
|
+
return agentName.startsWith('claudeflow-');
|
|
842
851
|
}
|
|
843
852
|
|
|
844
853
|
function listTemplateManagedAgents(agentsDir) {
|
|
@@ -868,6 +877,7 @@ function copyDirSync(src, dst, skipNames) {
|
|
|
868
877
|
|
|
869
878
|
module.exports = Object.assign(run, {
|
|
870
879
|
assertRequiredTemplateRules,
|
|
880
|
+
materializeSharedAppendPrompt,
|
|
871
881
|
isTemplateManagedAgent,
|
|
872
882
|
listTemplateManagedAgents,
|
|
873
883
|
mergeClaudeSettings,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomatic-labs/claudeflow",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.114",
|
|
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"
|