mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
69 lines
2.5 KiB
JavaScript
69 lines
2.5 KiB
JavaScript
// sparc-structure.js - Create SPARC development structure
|
|
|
|
import { createBasicRoomodesConfig } from './sparc/roomodes-config.js';
|
|
import { errors } from '../../node-compat.js';
|
|
import { promises as fs } from 'fs';
|
|
import { createBasicSparcWorkflow } from './sparc/workflows.js';
|
|
import { createRooReadme } from './sparc/roo-readme.js';
|
|
import { createClaudeSlashCommands } from './claude-commands/slash-commands.js';
|
|
import { cwd } from '../../node-compat.js';
|
|
import process from 'process';
|
|
|
|
// Helper function to create SPARC structure manually
|
|
export async function createSparcStructureManually() {
|
|
try {
|
|
// Ensure we're in the working directory
|
|
const workingDir = process.env.PWD || cwd();
|
|
|
|
// Create .roo directory structure in working directory (legacy support)
|
|
const rooDirectories = [
|
|
`${workingDir}/.roo`,
|
|
`${workingDir}/.roo/templates`,
|
|
`${workingDir}/.roo/workflows`,
|
|
`${workingDir}/.roo/modes`,
|
|
`${workingDir}/.roo/configs`,
|
|
];
|
|
|
|
for (const dir of rooDirectories) {
|
|
try {
|
|
await fs.mkdir(dir, { recursive: true });
|
|
console.log(` ✓ Created ${dir}/`);
|
|
} catch (err) {
|
|
if (!(err instanceof errors.AlreadyExists)) {
|
|
throw err;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Create .roomodes file (copy from existing if available, or create basic version)
|
|
let roomodesContent;
|
|
try {
|
|
// Check if .roomodes already exists and read it
|
|
roomodesContent = await fs.readFile(`${workingDir}/.roomodes`, 'utf8');
|
|
console.log(' ✓ Using existing .roomodes configuration');
|
|
} catch {
|
|
// Create basic .roomodes configuration
|
|
roomodesContent = createBasicRoomodesConfig();
|
|
await fs.writeFile(`${workingDir}/.roomodes`, roomodesContent, 'utf8');
|
|
console.log(' ✓ Created .roomodes configuration');
|
|
}
|
|
|
|
// Create basic workflow templates
|
|
const basicWorkflow = createBasicSparcWorkflow();
|
|
await fs.writeFile(`${workingDir}/.roo/workflows/basic-tdd.json`, basicWorkflow, 'utf8');
|
|
console.log(' ✓ Created .roo/workflows/basic-tdd.json');
|
|
|
|
// Create README for .roo directory
|
|
const rooReadme = createRooReadme();
|
|
await fs.writeFile(`${workingDir}/.roo/README.md`, rooReadme, 'utf8');
|
|
console.log(' ✓ Created .roo/README.md');
|
|
|
|
// Create Claude Code slash commands for SPARC modes
|
|
await createClaudeSlashCommands(workingDir);
|
|
|
|
console.log(' ✅ Basic SPARC structure created successfully');
|
|
} catch (err) {
|
|
console.log(` ❌ Failed to create SPARC structure: ${err.message}`);
|
|
}
|
|
}
|