@mfjjs/ruflo-setup 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mfjjs/ruflo-setup",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Cross-platform setup CLI for Ruflo + Claude Flow projects",
5
5
  "type": "module",
6
6
  "bin": {
package/src/setup.js CHANGED
@@ -1,4 +1,3 @@
1
- import fs from 'node:fs';
2
1
  import path from 'node:path';
3
2
  import os from 'node:os';
4
3
  import { spawnSync } from 'node:child_process';
@@ -45,33 +44,6 @@ function writeMcpJson({ cwd, dryRun }) {
45
44
  logLine(' .mcp.json written for this platform.');
46
45
  }
47
46
 
48
- async function copyTemplateClaude({ cwd, force, dryRun, templatePath, yes }) {
49
- const destination = path.join(cwd, 'CLAUDE.md');
50
-
51
- if (pathExists(destination) && !force && !dryRun && !yes) {
52
- logLine(' WARNING: CLAUDE.md already exists.');
53
- const shouldOverwrite = await confirm(' Overwrite with template? [y/N] ');
54
- if (!shouldOverwrite) {
55
- logLine(' Skipped CLAUDE.md (kept existing).');
56
- return;
57
- }
58
- }
59
-
60
- if (dryRun) {
61
- if (pathExists(destination)) {
62
- logLine(` [DRY RUN] Would overwrite: ${destination}`);
63
- } else {
64
- logLine(` [DRY RUN] Would copy CLAUDE.md to: ${destination}`);
65
- }
66
- return;
67
- }
68
-
69
- copyFileSync(templatePath, destination);
70
- if (pathExists(destination)) {
71
- logLine(' CLAUDE.md copied from template.');
72
- }
73
- }
74
-
75
47
  function installGlobalCommand({ packageRoot, dryRun }) {
76
48
  const src = path.join(packageRoot, 'templates', 'ruflo-setup.md');
77
49
  const dest = path.join(os.homedir(), '.claude', 'commands', 'ruflo-setup.md');
@@ -99,12 +71,6 @@ export async function runSetup({
99
71
  yes = false,
100
72
  verbose = false
101
73
  }) {
102
- const templateClaude = path.join(packageRoot, 'templates', 'CLAUDE.md');
103
-
104
- if (!fs.existsSync(templateClaude)) {
105
- throw new Error(`Template CLAUDE.md not found at: ${templateClaude}`);
106
- }
107
-
108
74
  logLine('');
109
75
  logLine('Ruflo Setup (npm CLI)');
110
76
  logLine(`Target directory: ${cwd}`);
@@ -138,12 +104,8 @@ export async function runSetup({
138
104
  writeMcpJson({ cwd, dryRun });
139
105
  logLine('');
140
106
 
141
- logLine('Step 3: Copying template CLAUDE.md ...');
142
- await copyTemplateClaude({ cwd, force, dryRun, templatePath: templateClaude, yes });
143
- logLine('');
144
-
145
107
  if (!noHooks) {
146
- logLine('Step 4: Installing global SessionStart check-ruflo hook ...');
108
+ logLine('Step 3: Installing global SessionStart check-ruflo hook ...');
147
109
  const hookResult = installGlobalCheckRufloHook({ packageRoot, dryRun });
148
110
  if (hookResult.inserted) {
149
111
  logLine(` Hook installed in: ${hookResult.settingsPath}`);
@@ -155,11 +117,11 @@ export async function runSetup({
155
117
  }
156
118
  logLine('');
157
119
  } else {
158
- logLine('Step 4: Skipped hook installation (--no-hooks).');
120
+ logLine('Step 3: Skipped hook installation (--no-hooks).');
159
121
  logLine('');
160
122
  }
161
123
 
162
- logLine('Step 5: Installing global /ruflo-setup command ...');
124
+ logLine('Step 4: Installing global /ruflo-setup command ...');
163
125
  const commandResult = installGlobalCommand({ packageRoot, dryRun });
164
126
  if (!dryRun) {
165
127
  logLine(` Command installed at: ${commandResult.dest}`);
@@ -13,8 +13,7 @@ Runs `npx @mfjjs/ruflo-setup` which:
13
13
  - `.claude/skills/` — 30+ skill definitions
14
14
  - `.claude/commands/` — slash commands
15
15
  2. Writes a platform-aware `.mcp.json` (MCP server registration for claude-flow, ruv-swarm, flow-nexus)
16
- 3. Copies a template `CLAUDE.md` for the project
17
- 4. Installs a global `SessionStart` hook in `~/.claude/settings.json` that warns when Ruflo is not configured
16
+ 3. Installs a global `SessionStart` hook in `~/.claude/settings.json` that warns when Ruflo is not configured
18
17
 
19
18
  ## Instructions for Claude
20
19
 
@@ -1,99 +0,0 @@
1
- # Claude Code Configuration - Claude Flow V3
2
-
3
- ## Behavioral Rules (Always Enforced)
4
-
5
- - Do what has been asked; nothing more, nothing less
6
- - NEVER create files unless they're absolutely necessary for achieving your goal
7
- - ALWAYS prefer editing an existing file to creating a new one
8
- - NEVER proactively create documentation files (*.md) or README files unless explicitly requested
9
- - NEVER save working files, text/mds, or tests to the root folder
10
- - Never continuously check status after spawning a swarm — wait for results
11
- - ALWAYS read a file before editing it
12
- - NEVER commit secrets, credentials, or .env files
13
-
14
- ## File Organization
15
-
16
- - NEVER save to root folder — use the directories below
17
- - Use `/src` for source code files
18
- - Use `/tests` for test files
19
- - Use `/docs` for documentation and markdown files
20
- - Use `/config` for configuration files
21
- - Use `/scripts` for utility scripts
22
- - Use `/examples` for example code
23
-
24
- ## Project Architecture
25
-
26
- - Follow Domain-Driven Design with bounded contexts
27
- - Keep files under 500 lines
28
- - Use typed interfaces for all public APIs
29
- - Prefer TDD London School (mock-first) for new code
30
- - Use event sourcing for state changes
31
- - Ensure input validation at system boundaries
32
-
33
- ### Project Config
34
-
35
- - **Topology**: hierarchical-mesh
36
- - **Max Agents**: 15
37
- - **Memory**: hybrid
38
- - **HNSW**: Enabled
39
- - **Neural**: Enabled
40
-
41
- ## Build & Test
42
-
43
- <!-- TODO: Replace with this project's actual build/test/lint commands -->
44
- ```bash
45
- # Build
46
- npm run build
47
-
48
- # Test
49
- npm test
50
-
51
- # Lint
52
- npm run lint
53
- ```
54
-
55
- - ALWAYS run tests after making code changes
56
- - ALWAYS verify build succeeds before committing
57
-
58
- ## Security Rules
59
-
60
- - NEVER hardcode API keys, secrets, or credentials in source files
61
- - NEVER commit .env files or any file containing secrets
62
- - Always validate user input at system boundaries
63
- - Always sanitize file paths to prevent directory traversal
64
- - Run `npx ruflo@latest security scan` after security-related changes
65
-
66
- ## Concurrency: 1 MESSAGE = ALL RELATED OPERATIONS
67
-
68
- - All operations MUST be concurrent/parallel in a single message
69
- - Use Claude Code's Task tool for spawning agents, not just MCP
70
- - ALWAYS batch ALL todos in ONE TodoWrite call (5-10+ minimum)
71
- - ALWAYS spawn ALL agents in ONE message with full instructions via Task tool
72
- - ALWAYS batch ALL file reads/writes/edits in ONE message
73
- - ALWAYS batch ALL Bash commands in ONE message
74
-
75
- ## Swarm Orchestration
76
-
77
- - MUST initialize the swarm using CLI tools when starting complex tasks
78
- - MUST spawn concurrent agents using Claude Code's Task tool
79
- - Never use CLI tools alone for execution — Task tool agents do the actual work
80
- - MUST call CLI tools AND Task tool in ONE message for complex work
81
-
82
- ## Quick Setup
83
-
84
- ```bash
85
- npx ruflo@latest init --full
86
- npx ruflo@latest daemon start
87
- npx ruflo@latest doctor --fix
88
- ```
89
-
90
- ## Claude Code vs CLI Tools
91
-
92
- - Claude Code's Task tool handles ALL execution: agents, file ops, code generation, git
93
- - CLI tools handle coordination via Bash: swarm init, memory, hooks, routing
94
- - NEVER use CLI tools as a substitute for Task tool agents
95
-
96
- ## Support
97
-
98
- - Documentation: https://github.com/ruvnet/claude-flow
99
- - Issues: https://github.com/ruvnet/claude-flow/issues