agentic-sdlc 1.0.0 → 1.5.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/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
- package/.agent/ide-integration/KIRO-IDE.md +381 -0
- package/.agent/ide-integration/README.md +256 -209
- package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
- package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
- package/.agent/knowledge-base/INDEX.md +43 -0
- package/.agent/knowledge-base/README.md +47 -7
- package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
- package/.agent/knowledge-base/architecture/README.md +98 -0
- package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
- package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
- package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
- package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
- package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
- package/.agent/knowledge-base/features/README.md +83 -0
- package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
- package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
- package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
- package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
- package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
- package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
- package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
- package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
- package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
- package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
- package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
- package/.agent/rules/AUTO-LEARNING.md +418 -0
- package/.agent/rules/ai-enforcement.md +11 -0
- package/.agent/rules/artifacts.md +77 -58
- package/.agent/rules/git-workflow.md +25 -65
- package/.agent/rules/global.md +18 -13
- package/.agent/skills/role-ba.md +76 -0
- package/.agent/skills/role-brain.md +470 -0
- package/.agent/skills/role-dev.md +338 -0
- package/.agent/skills/role-devops.md +122 -0
- package/.agent/skills/role-orchestrator.md +223 -0
- package/.agent/skills/role-pm.md +258 -0
- package/.agent/skills/role-po.md +237 -0
- package/.agent/skills/role-qa.md +81 -0
- package/.agent/skills/role-reporter.md +117 -0
- package/.agent/skills/role-sa.md +277 -0
- package/.agent/skills/role-seca.md +294 -0
- package/.agent/skills/role-stakeholder.md +105 -0
- package/.agent/skills/role-tester.md +294 -0
- package/.agent/skills/role-uiux.md +264 -0
- package/.agent/templates/CHANGELOG-Template.md +83 -0
- package/.agent/templates/Knowledge-Entry-Template.md +3 -0
- package/.agent/workflows/brain.md +84 -53
- package/.agent/workflows/compound.md +51 -0
- package/.agent/workflows/cycle.md +61 -0
- package/.agent/workflows/emergency.md +114 -0
- package/.agent/workflows/explore.md +147 -0
- package/.agent/workflows/housekeeping.md +105 -0
- package/.agent/workflows/metrics.md +179 -0
- package/.agent/workflows/orchestrator.md +68 -0
- package/.agent/workflows/preflight.md +35 -0
- package/.agent/workflows/release.md +153 -0
- package/.agent/workflows/route.md +160 -0
- package/.agent/workflows/sprint.md +125 -0
- package/.agent/workflows/validate.md +146 -0
- package/CHANGELOG.md +349 -6
- package/README.md +171 -86
- package/bin/CROSS-PLATFORM-CLI.md +526 -0
- package/bin/README.md +525 -0
- package/bin/cli.js +65 -90
- package/bin/kb +34 -0
- package/bin/kb.bat +28 -0
- package/bin/kb_cli.py +226 -0
- package/bin/lib/README.md +411 -0
- package/bin/lib/__init__.py +7 -0
- package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
- package/bin/lib/kb_add.py +203 -0
- package/bin/lib/kb_common.py +224 -0
- package/bin/lib/kb_compound.py +250 -0
- package/bin/lib/kb_index.py +193 -0
- package/bin/lib/kb_list.py +144 -0
- package/bin/lib/kb_search.py +121 -0
- package/bin/lib/kb_stats.py +153 -0
- package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
- package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
- package/docs/BRAIN-ARCHITECTURE.md +396 -0
- package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
- package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
- package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
- package/docs/MONOREPO-ARCHITECTURE.md +492 -0
- package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
- package/docs/SDLC-Diagram.md +235 -0
- package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
- package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
- package/docs/architecture/{brain.md → BRAIN.md} +1 -1
- package/docs/global/Master-Documentation.md +307 -0
- package/docs/global/reports/Final-Approval-Report.md +257 -0
- package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
- package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
- package/docs/guides/LEARNING-FLOW.md +0 -0
- package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
- package/docs/guides/MCP-SETUP.md +139 -0
- package/docs/guides/QUICK-START.md +4 -0
- package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
- package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
- package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
- package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
- package/docs/reports/Validation-Report-2026-01-04.md +23 -0
- package/docs/research-reports/research-20260103-101315.json +95 -0
- package/docs/research-reports/research-20260103-101315.md +78 -0
- package/docs/research-reports/research-20260103-183837.json +95 -0
- package/docs/research-reports/research-20260103-183837.md +78 -0
- package/docs/research-reports/research-20260103-190346.json +100 -0
- package/docs/research-reports/research-20260103-190346.md +83 -0
- package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
- package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
- package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
- package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
- package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
- package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
- package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
- package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
- package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
- package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
- package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
- package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
- package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
- package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
- package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
- package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
- package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
- package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
- package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
- package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
- package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
- package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
- package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
- package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
- package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
- package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
- package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
- package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
- package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
- package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
- package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
- package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
- package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
- package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
- package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
- package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
- package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
- package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
- package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
- package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
- package/docs/sprints/sprint-6/.brain-state.json +29 -0
- package/package.json +92 -16
- package/.agent/ide-integration/aider-commands.md +0 -40
- package/.agent/ide-integration/cline-config.json +0 -108
- package/.agent/ide-integration/cursor-rules.md +0 -63
- package/.agent/ide-integration/github-copilot-instructions.md +0 -75
- package/.agent/ide-integration/vscode-commands.json +0 -190
- package/.agent/ide-integration/windsurf-cascade.md +0 -125
- package/.agent/knowledge-base/index.md +0 -202
- package/.agent/legacy/roles/designer.md +0 -311
- package/.agent/legacy/roles/dev.md +0 -177
- package/.agent/legacy/roles/devops.md +0 -146
- package/.agent/legacy/roles/orchestrator.md +0 -339
- package/.agent/legacy/roles/pm.md +0 -120
- package/.agent/legacy/roles/po.md +0 -89
- package/.agent/legacy/roles/qa.md +0 -108
- package/.agent/legacy/roles/reporter.md +0 -70
- package/.agent/legacy/roles/sa.md +0 -118
- package/.agent/legacy/roles/seca.md +0 -112
- package/.agent/legacy/roles/stakeholder.md +0 -111
- package/.agent/legacy/roles/tester.md +0 -129
- package/.agent/rules/global.md.bak +0 -154
- package/.agent/usage.md +0 -653
- package/.agent/workflows/auto.md +0 -35
- package/.agent/workflows/dev.md +0 -30
- package/.agent/workflows/devops.md +0 -28
- package/.agent/workflows/kb-search.md +0 -22
- package/.agent/workflows/pm.md +0 -42
- package/.agent/workflows/po.md +0 -21
- package/.agent/workflows/qa.md +0 -31
- package/.agent/workflows/reporter.md +0 -21
- package/.agent/workflows/sa.md +0 -51
- package/.agent/workflows/seca.md +0 -21
- package/.agent/workflows/stakeholder.md +0 -26
- package/.agent/workflows/tester.md +0 -21
- package/.agent/workflows/uiux.md +0 -38
- package/.cursorrules +0 -49
- package/.env.template +0 -10
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
- package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
- package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
- package/.github/copilot-instructions.md +0 -60
- package/bin/commands/create.js +0 -96
- package/bin/commands/help.js +0 -69
- package/bin/commands/ide.js +0 -116
- package/bin/commands/init-kb.js +0 -74
- package/bin/commands/install.js +0 -68
- package/bin/commands/list.js +0 -35
- package/bin/graph_brain.py +0 -86
- package/bin/sync_github.py +0 -75
- package/bin/utils/args-parser.js +0 -33
- package/bin/utils/colors.js +0 -21
- package/bin/verify_neo4j.py +0 -25
- /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
- /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
- /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
- /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
package/bin/commands/create.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { colors, log } from '../utils/colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create new project with instructions
|
|
7
|
-
*/
|
|
8
|
-
export async function createProject(templatePath, projectName, options = {}) {
|
|
9
|
-
const startTime = Date.now();
|
|
10
|
-
const targetPath = path.join(process.cwd(), projectName);
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
if (!options.quiet) log.header(`🚀 Creating Project: ${projectName}`);
|
|
14
|
-
|
|
15
|
-
// Check if project exists
|
|
16
|
-
if (await fs.pathExists(targetPath)) {
|
|
17
|
-
if (!options.force) {
|
|
18
|
-
log.error(`Directory '${projectName}' already exists`);
|
|
19
|
-
log.info('Use --force to overwrite');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
} else {
|
|
22
|
-
log.warning('Overwriting existing project...');
|
|
23
|
-
await fs.remove(targetPath);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Create project directory
|
|
28
|
-
if (!options.quiet) log.step('Creating project directory...');
|
|
29
|
-
await fs.ensureDir(targetPath);
|
|
30
|
-
|
|
31
|
-
// Copy instructions
|
|
32
|
-
if (!options.quiet) log.step('Installing instructions...');
|
|
33
|
-
await fs.copy(templatePath, path.join(targetPath, '.agent'));
|
|
34
|
-
|
|
35
|
-
// Create basic project structure
|
|
36
|
-
if (!options.quiet) log.step('Setting up project structure...');
|
|
37
|
-
|
|
38
|
-
// Create docs structure
|
|
39
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'plans'));
|
|
40
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'designs'));
|
|
41
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'reviews'));
|
|
42
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'logs'));
|
|
43
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'tests'));
|
|
44
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'sprints', 'sprint-1', 'reports'));
|
|
45
|
-
await fs.ensureDir(path.join(targetPath, 'docs', 'global', 'reports'));
|
|
46
|
-
|
|
47
|
-
// Create package.json
|
|
48
|
-
await fs.writeJson(
|
|
49
|
-
path.join(targetPath, 'package.json'),
|
|
50
|
-
{
|
|
51
|
-
name: projectName,
|
|
52
|
-
version: '1.0.0',
|
|
53
|
-
description: 'Project created with agentic-sdlc',
|
|
54
|
-
main: 'index.js',
|
|
55
|
-
scripts: {
|
|
56
|
-
test: 'echo "Error: no test specified" && exit 1',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
{ spaces: 2 }
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
// Create README
|
|
63
|
-
await fs.writeFile(
|
|
64
|
-
path.join(targetPath, 'README.md'),
|
|
65
|
-
`# ${projectName}\n\nProject created with agentic-sdlc.\n\n## Getting Started\n\n1. Review instructions: \`.agent/usage.md\`\n2. Setup IDE: \`agentic-sdlc ide cursor\`\n3. Start planning: \`/pm Build your project\`\n\n## Documentation\n\nAll project documentation is in \`docs/\` folder organized by sprints.\n`
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
// Create .gitignore
|
|
69
|
-
await fs.writeFile(
|
|
70
|
-
path.join(targetPath, '.gitignore'),
|
|
71
|
-
`node_modules/\n.DS_Store\n*.log\n.env\n.env.local\n.agent/\n`
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
// Success
|
|
75
|
-
if (!options.quiet) {
|
|
76
|
-
log.success('Project created successfully!');
|
|
77
|
-
console.log(`Location: ${targetPath}`);
|
|
78
|
-
console.log(`\nNext Steps:`);
|
|
79
|
-
console.log(` ${colors.cyan}cd ${projectName}${colors.reset}`);
|
|
80
|
-
console.log(' agentic-sdlc ide cursor');
|
|
81
|
-
console.log(' • Review .agent/usage.md');
|
|
82
|
-
console.log(' • Initialize git repository');
|
|
83
|
-
console.log(' • Start: /pm Build your project\n');
|
|
84
|
-
|
|
85
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
86
|
-
log.info(`Completed in ${duration}s`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
process.exit(0);
|
|
90
|
-
} catch (err) {
|
|
91
|
-
log.error('Project creation failed');
|
|
92
|
-
log.error(err.message);
|
|
93
|
-
if (options.verbose) console.error('\nStack trace:', err.stack);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
}
|
package/bin/commands/help.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { colors } from '../utils/colors.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Display help information
|
|
5
|
-
*/
|
|
6
|
-
export function showHelp(packageJson) {
|
|
7
|
-
console.log(`
|
|
8
|
-
${colors.bright}${colors.cyan}agentic-sdlc${colors.reset} ${colors.dim}v${packageJson.version}${colors.reset}
|
|
9
|
-
|
|
10
|
-
${colors.bright}USAGE${colors.reset}
|
|
11
|
-
${colors.cyan}agentic-sdlc${colors.reset} ${colors.yellow}<command>${colors.reset} ${colors.dim}[options]${colors.reset}
|
|
12
|
-
|
|
13
|
-
${colors.bright}COMMANDS${colors.reset}
|
|
14
|
-
${colors.yellow}install${colors.reset} Install instructions into current directory
|
|
15
|
-
${colors.yellow}create${colors.reset} ${colors.dim}<name>${colors.reset} Create new project with instructions
|
|
16
|
-
${colors.yellow}list${colors.reset} List available templates and roles
|
|
17
|
-
${colors.yellow}ide${colors.reset} ${colors.dim}<ide-name>${colors.reset} Setup IDE integration (cursor, copilot, windsurf, cline, aider, all)
|
|
18
|
-
${colors.yellow}init-kb${colors.reset} Initialize knowledge base structure
|
|
19
|
-
${colors.yellow}version${colors.reset} Show version information
|
|
20
|
-
${colors.yellow}help${colors.reset} Show this help message
|
|
21
|
-
|
|
22
|
-
${colors.bright}OPTIONS${colors.reset}
|
|
23
|
-
${colors.dim}-h, --help${colors.reset} Show help
|
|
24
|
-
${colors.dim}-v, --version${colors.reset} Show version
|
|
25
|
-
${colors.dim}-f, --force${colors.reset} Force overwrite existing files
|
|
26
|
-
${colors.dim}-q, --quiet${colors.reset} Suppress output
|
|
27
|
-
${colors.dim}--verbose${colors.reset} Show detailed output
|
|
28
|
-
${colors.dim}--no-color${colors.reset} Disable colored output
|
|
29
|
-
|
|
30
|
-
${colors.bright}EXAMPLES${colors.reset}
|
|
31
|
-
${colors.dim}# Install in current directory${colors.reset}
|
|
32
|
-
${colors.cyan}agentic-sdlc${colors.reset} install
|
|
33
|
-
|
|
34
|
-
${colors.dim}# Create new project${colors.reset}
|
|
35
|
-
${colors.cyan}agentic-sdlc${colors.reset} create my-project
|
|
36
|
-
|
|
37
|
-
${colors.dim}# Setup Cursor IDE integration${colors.reset}
|
|
38
|
-
${colors.cyan}agentic-sdlc${colors.reset} ide cursor
|
|
39
|
-
|
|
40
|
-
${colors.dim}# Setup all IDE integrations${colors.reset}
|
|
41
|
-
${colors.cyan}agentic-sdlc${colors.reset} ide all
|
|
42
|
-
|
|
43
|
-
${colors.dim}# Initialize knowledge base${colors.reset}
|
|
44
|
-
${colors.cyan}agentic-sdlc${colors.reset} init-kb
|
|
45
|
-
|
|
46
|
-
${colors.dim}# List available templates${colors.reset}
|
|
47
|
-
${colors.cyan}agentic-sdlc${colors.reset} list
|
|
48
|
-
|
|
49
|
-
${colors.bright}IDE INTEGRATIONS${colors.reset}
|
|
50
|
-
${colors.dim}cursor${colors.reset} - Cursor IDE (.cursorrules)
|
|
51
|
-
${colors.dim}copilot${colors.reset} - GitHub Copilot (.github/copilot-instructions.md)
|
|
52
|
-
${colors.dim}windsurf${colors.reset} - Windsurf Cascade (.windsurfrules)
|
|
53
|
-
${colors.dim}cline${colors.reset} - Cline VS Code Extension
|
|
54
|
-
${colors.dim}aider${colors.reset} - Aider CLI (.aider.conf.yml)
|
|
55
|
-
${colors.dim}all${colors.reset} - Setup all IDE integrations
|
|
56
|
-
|
|
57
|
-
${colors.bright}DOCUMENTATION${colors.reset}
|
|
58
|
-
${colors.dim}Repository:${colors.reset} https://github.com/yourusername/template-instructions
|
|
59
|
-
${colors.dim}Issues:${colors.reset} https://github.com/yourusername/template-instructions/issues
|
|
60
|
-
`);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Display version information
|
|
65
|
-
*/
|
|
66
|
-
export function showVersion(packageJson) {
|
|
67
|
-
console.log(`${colors.cyan}agentic-sdlc${colors.reset} ${colors.bright}v${packageJson.version}${colors.reset}`);
|
|
68
|
-
console.log(`${colors.dim}${packageJson.description}${colors.reset}`);
|
|
69
|
-
}
|
package/bin/commands/ide.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { log } from '../utils/colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Setup single IDE configuration
|
|
7
|
-
*/
|
|
8
|
-
async function setupSingleIDE(config, options) {
|
|
9
|
-
// Create directory if needed
|
|
10
|
-
if (config.createDir) {
|
|
11
|
-
await fs.ensureDir(config.createDir);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Check if file exists
|
|
15
|
-
if (await fs.pathExists(config.target)) {
|
|
16
|
-
if (!options.force) {
|
|
17
|
-
log.warning(`${config.name} config already exists`);
|
|
18
|
-
log.info('Use --force to overwrite');
|
|
19
|
-
return;
|
|
20
|
-
} else {
|
|
21
|
-
log.warning(`Overwriting ${config.name} config...`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Copy config file
|
|
26
|
-
if (!options.quiet) log.step(`Installing ${config.name}...`);
|
|
27
|
-
await fs.copy(config.source, config.target);
|
|
28
|
-
if (!options.quiet) log.success(`${config.name} installed`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Setup IDE integration
|
|
33
|
-
*/
|
|
34
|
-
export async function setupIDE(templatePath, ideName, options = {}) {
|
|
35
|
-
const startTime = Date.now();
|
|
36
|
-
const targetPath = process.cwd();
|
|
37
|
-
const ideIntegrationPath = path.join(templatePath, 'ide-integration');
|
|
38
|
-
|
|
39
|
-
try {
|
|
40
|
-
if (!options.quiet) log.header(`🔧 Setting up ${ideName.toUpperCase()} Integration`);
|
|
41
|
-
|
|
42
|
-
const ideConfigs = {
|
|
43
|
-
cursor: {
|
|
44
|
-
source: path.join(ideIntegrationPath, 'cursor-rules.md'),
|
|
45
|
-
target: path.join(targetPath, '.cursorrules'),
|
|
46
|
-
name: 'Cursor IDE'
|
|
47
|
-
},
|
|
48
|
-
copilot: {
|
|
49
|
-
source: path.join(ideIntegrationPath, 'github-copilot-instructions.md'),
|
|
50
|
-
target: path.join(targetPath, '.github', 'copilot-instructions.md'),
|
|
51
|
-
name: 'GitHub Copilot',
|
|
52
|
-
createDir: path.join(targetPath, '.github')
|
|
53
|
-
},
|
|
54
|
-
windsurf: {
|
|
55
|
-
source: path.join(ideIntegrationPath, 'windsurf-cascade.md'),
|
|
56
|
-
target: path.join(targetPath, '.windsurfrules'),
|
|
57
|
-
name: 'Windsurf Cascade'
|
|
58
|
-
},
|
|
59
|
-
cline: {
|
|
60
|
-
source: path.join(ideIntegrationPath, 'cline-config.json'),
|
|
61
|
-
target: path.join(targetPath, '.vscode', 'cline-config.json'),
|
|
62
|
-
name: 'Cline Extension',
|
|
63
|
-
createDir: path.join(targetPath, '.vscode')
|
|
64
|
-
},
|
|
65
|
-
aider: {
|
|
66
|
-
source: path.join(ideIntegrationPath, 'aider-commands.md'),
|
|
67
|
-
target: path.join(targetPath, '.aider.conf.yml'),
|
|
68
|
-
name: 'Aider CLI'
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
if (ideName === 'all') {
|
|
73
|
-
// Setup all IDEs
|
|
74
|
-
for (const [ide, config] of Object.entries(ideConfigs)) {
|
|
75
|
-
await setupSingleIDE(config, options);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (!options.quiet) {
|
|
79
|
-
log.success('All IDE integrations installed!');
|
|
80
|
-
console.log(`\nNext Steps:`);
|
|
81
|
-
console.log(' • Restart your IDE');
|
|
82
|
-
console.log(' • Type / in chat to see available commands');
|
|
83
|
-
console.log(' • Try: /pm Build a todo app\n');
|
|
84
|
-
}
|
|
85
|
-
} else {
|
|
86
|
-
// Setup single IDE
|
|
87
|
-
const config = ideConfigs[ideName];
|
|
88
|
-
if (!config) {
|
|
89
|
-
log.error(`Unknown IDE: ${ideName}`);
|
|
90
|
-
console.log(`Available: cursor, copilot, windsurf, cline, aider, all`);
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
await setupSingleIDE(config, options);
|
|
95
|
-
|
|
96
|
-
if (!options.quiet) {
|
|
97
|
-
log.success(`${config.name} integration installed!`);
|
|
98
|
-
console.log(`Location: ${config.target}`);
|
|
99
|
-
console.log(`\nNext Steps:`);
|
|
100
|
-
console.log(` • Restart ${config.name}`);
|
|
101
|
-
console.log(' • Type / in chat to see commands');
|
|
102
|
-
console.log(' • Try: /pm Build a todo app\n');
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
107
|
-
if (!options.quiet) log.info(`Completed in ${duration}s`);
|
|
108
|
-
|
|
109
|
-
process.exit(0);
|
|
110
|
-
} catch (err) {
|
|
111
|
-
log.error('IDE setup failed');
|
|
112
|
-
log.error(err.message);
|
|
113
|
-
if (options.verbose) console.error('\nStack trace:', err.stack);
|
|
114
|
-
process.exit(1);
|
|
115
|
-
}
|
|
116
|
-
}
|
package/bin/commands/init-kb.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { log } from '../utils/colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Initialize knowledge base structure
|
|
7
|
-
*/
|
|
8
|
-
export async function initKnowledgeBase(templatePath, options = {}) {
|
|
9
|
-
const startTime = Date.now();
|
|
10
|
-
const targetPath = path.join(process.cwd(), '.gemini', 'instructions', 'knowledge-base');
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
if (!options.quiet) log.header('🧠 Initializing Knowledge Base');
|
|
14
|
-
|
|
15
|
-
// Check if already exists
|
|
16
|
-
if (await fs.pathExists(targetPath)) {
|
|
17
|
-
if (!options.force) {
|
|
18
|
-
log.warning('Knowledge base already exists');
|
|
19
|
-
log.info('Use --force to reinitialize');
|
|
20
|
-
process.exit(0);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Create directory structure
|
|
25
|
-
if (!options.quiet) log.step('Creating directory structure...');
|
|
26
|
-
|
|
27
|
-
const dirs = [
|
|
28
|
-
'bugs/critical',
|
|
29
|
-
'bugs/high',
|
|
30
|
-
'bugs/medium',
|
|
31
|
-
'bugs/low',
|
|
32
|
-
'features/authentication',
|
|
33
|
-
'features/performance',
|
|
34
|
-
'features/integration',
|
|
35
|
-
'features/ui-ux',
|
|
36
|
-
'architecture',
|
|
37
|
-
'security',
|
|
38
|
-
'performance',
|
|
39
|
-
'platform-specific/web',
|
|
40
|
-
'platform-specific/mobile',
|
|
41
|
-
'platform-specific/desktop',
|
|
42
|
-
'platform-specific/cli',
|
|
43
|
-
'platform-specific/embedded'
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
for (const dir of dirs) {
|
|
47
|
-
await fs.ensureDir(path.join(targetPath, dir));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Copy README and index
|
|
51
|
-
const kbSourcePath = path.join(templatePath, 'knowledge-base');
|
|
52
|
-
await fs.copy(path.join(kbSourcePath, 'README.md'), path.join(targetPath, 'README.md'));
|
|
53
|
-
await fs.copy(path.join(kbSourcePath, 'index.md'), path.join(targetPath, 'index.md'));
|
|
54
|
-
|
|
55
|
-
if (!options.quiet) {
|
|
56
|
-
log.success('Knowledge base initialized!');
|
|
57
|
-
console.log(`Location: ${targetPath}`);
|
|
58
|
-
console.log(`\nNext Steps:`);
|
|
59
|
-
console.log(' • Read: .gemini/instructions/knowledge-base/README.md');
|
|
60
|
-
console.log(' • Use template: Knowledge-Entry-Template.md');
|
|
61
|
-
console.log(' • Search: Check index.md\n');
|
|
62
|
-
|
|
63
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
64
|
-
log.info(`Completed in ${duration}s`);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
process.exit(0);
|
|
68
|
-
} catch (err) {
|
|
69
|
-
log.error('Knowledge base initialization failed');
|
|
70
|
-
log.error(err.message);
|
|
71
|
-
if (options.verbose) console.error('\nStack trace:', err.stack);
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
}
|
package/bin/commands/install.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { log } from '../utils/colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Install instructions in current directory
|
|
7
|
-
*/
|
|
8
|
-
export async function install(templatePath, options = {}) {
|
|
9
|
-
const startTime = Date.now();
|
|
10
|
-
const targetPath = path.join(process.cwd(), '.agent');
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
if (!options.quiet) log.header('🚀 Installing Template Instructions');
|
|
14
|
-
|
|
15
|
-
// Validate environment
|
|
16
|
-
if (options.verbose) log.step('Validating environment...');
|
|
17
|
-
if (!await fs.pathExists(templatePath)) {
|
|
18
|
-
throw new Error(`Template source not found at: ${templatePath}`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Check existing installation
|
|
22
|
-
if (!options.quiet) log.step('Checking for existing installation...');
|
|
23
|
-
if (await fs.pathExists(targetPath)) {
|
|
24
|
-
if (!options.force) {
|
|
25
|
-
log.warning('.agent directory already exists');
|
|
26
|
-
log.info('Use --force to overwrite existing files');
|
|
27
|
-
process.exit(0);
|
|
28
|
-
} else {
|
|
29
|
-
log.warning('Overwriting existing installation...');
|
|
30
|
-
await fs.remove(targetPath);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Copy files
|
|
35
|
-
if (!options.quiet) log.step('Copying template files...');
|
|
36
|
-
await fs.copy(templatePath, targetPath, {
|
|
37
|
-
overwrite: options.force,
|
|
38
|
-
preserveTimestamps: true,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// Verify installation
|
|
42
|
-
if (options.verbose) {
|
|
43
|
-
log.step('Verifying installation...');
|
|
44
|
-
const files = await fs.readdir(targetPath, { recursive: true });
|
|
45
|
-
log.success(`Verified ${files.length} files installed`);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Success message
|
|
49
|
-
if (!options.quiet) {
|
|
50
|
-
log.success('Installation complete!');
|
|
51
|
-
console.log(`Location: ${targetPath}`);
|
|
52
|
-
console.log(`\nNext Steps:`);
|
|
53
|
-
console.log(' • Setup IDE: agentic-sdlc ide cursor');
|
|
54
|
-
console.log(' • Review: .agent/usage.md');
|
|
55
|
-
console.log(' • Start: /pm Build your project\n');
|
|
56
|
-
|
|
57
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
58
|
-
log.info(`Completed in ${duration}s`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
process.exit(0);
|
|
62
|
-
} catch (err) {
|
|
63
|
-
log.error('Installation failed');
|
|
64
|
-
log.error(err.message);
|
|
65
|
-
if (options.verbose) console.error('\nStack trace:', err.stack);
|
|
66
|
-
process.exit(1);
|
|
67
|
-
}
|
|
68
|
-
}
|
package/bin/commands/list.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { colors, log } from '../utils/colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* List available templates and roles
|
|
7
|
-
*/
|
|
8
|
-
export async function listTemplates(templatePath) {
|
|
9
|
-
try {
|
|
10
|
-
log.header('📋 Available Templates & Roles');
|
|
11
|
-
|
|
12
|
-
// List roles
|
|
13
|
-
const rolesPath = path.join(templatePath, 'roles');
|
|
14
|
-
const roles = await fs.readdir(rolesPath);
|
|
15
|
-
console.log(`${colors.bright}Roles (${roles.length}):${colors.reset}`);
|
|
16
|
-
roles.forEach(role => {
|
|
17
|
-
const roleName = role.replace('.md', '');
|
|
18
|
-
console.log(` ${colors.green}•${colors.reset} ${roleName}`);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// List templates
|
|
22
|
-
const templatesPath = path.join(templatePath, 'templates');
|
|
23
|
-
const templates = await fs.readdir(templatesPath);
|
|
24
|
-
console.log(`\n${colors.bright}Templates (${templates.length}):${colors.reset}`);
|
|
25
|
-
templates.forEach(template => {
|
|
26
|
-
const templateName = template.replace('.md', '').replace('.json', '');
|
|
27
|
-
console.log(` ${colors.blue}•${colors.reset} ${templateName}`);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
console.log(`\n${colors.dim}Total: ${roles.length} roles, ${templates.length} templates${colors.reset}\n`);
|
|
31
|
-
} catch (err) {
|
|
32
|
-
log.error(`Failed to list templates: ${err.message}`);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
}
|
package/bin/graph_brain.py
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import glob
|
|
3
|
-
from neo4j import GraphDatabase
|
|
4
|
-
from dotenv import load_dotenv
|
|
5
|
-
|
|
6
|
-
# Load environment variables
|
|
7
|
-
load_dotenv()
|
|
8
|
-
|
|
9
|
-
URI = os.getenv("NEO4J_URI")
|
|
10
|
-
USERNAME = os.getenv("NEO4J_USERNAME")
|
|
11
|
-
PASSWORD = os.getenv("NEO4J_PASSWORD")
|
|
12
|
-
|
|
13
|
-
class Neo4jBrain:
|
|
14
|
-
def __init__(self, uri, user, password):
|
|
15
|
-
self.driver = GraphDatabase.driver(uri, auth=(user, password))
|
|
16
|
-
|
|
17
|
-
def close(self):
|
|
18
|
-
self.driver.close()
|
|
19
|
-
|
|
20
|
-
def initialize_schema(self):
|
|
21
|
-
with self.driver.session() as session:
|
|
22
|
-
# Create constraints
|
|
23
|
-
session.run("CREATE CONSTRAINT IF NOT EXISTS FOR (f:File) REQUIRE f.path IS UNIQUE")
|
|
24
|
-
session.run("CREATE CONSTRAINT IF NOT EXISTS FOR (r:Requirement) REQUIRE r.id IS UNIQUE")
|
|
25
|
-
session.run("CREATE CONSTRAINT IF NOT EXISTS FOR (i:Issue) REQUIRE i.number IS UNIQUE")
|
|
26
|
-
session.run("CREATE CONSTRAINT IF NOT EXISTS FOR (ro:Role) REQUIRE ro.name IS UNIQUE")
|
|
27
|
-
print("[SUCCESS] Neo4j Schema Initialized")
|
|
28
|
-
|
|
29
|
-
def ingest_project_structure(self, base_path):
|
|
30
|
-
"""Walks the directory and creates File nodes and directory HIERARCHY."""
|
|
31
|
-
with self.driver.session() as session:
|
|
32
|
-
# Ignore some directories
|
|
33
|
-
ignore_dirs = {'.git', 'node_modules', '.agent', '__pycache__'}
|
|
34
|
-
|
|
35
|
-
for root, dirs, files in os.walk(base_path):
|
|
36
|
-
# Filter ignore dirs
|
|
37
|
-
dirs[:] = [d for d in dirs if d not in ignore_dirs]
|
|
38
|
-
|
|
39
|
-
rel_root = os.path.relpath(root, base_path)
|
|
40
|
-
if rel_root == ".": rel_root = "root"
|
|
41
|
-
|
|
42
|
-
for file in files:
|
|
43
|
-
rel_path = os.path.relpath(os.path.join(root, file), base_path)
|
|
44
|
-
ext = os.path.splitext(file)[1]
|
|
45
|
-
|
|
46
|
-
session.run("""
|
|
47
|
-
MERGE (f:File {path: $path})
|
|
48
|
-
SET f.name = $name, f.extension = $ext, f.last_updated = timestamp()
|
|
49
|
-
MERGE (d:Directory {path: $dir})
|
|
50
|
-
MERGE (d)-[:CONTAINS]->(f)
|
|
51
|
-
""", path=rel_path, name=file, ext=ext, dir=rel_root)
|
|
52
|
-
print(f"[SUCCESS] Ingested project structure from {base_path}")
|
|
53
|
-
|
|
54
|
-
def link_issue_to_file(self, issue_number, file_path, rel_type="AFFECTS"):
|
|
55
|
-
with self.driver.session() as session:
|
|
56
|
-
session.run(f"""
|
|
57
|
-
MERGE (i:Issue {{number: $issue_num}})
|
|
58
|
-
MERGE (f:File {{path: $file_path}})
|
|
59
|
-
MERGE (i)-[:{rel_type}]->(f)
|
|
60
|
-
""", issue_num=issue_number, file_path=file_path)
|
|
61
|
-
|
|
62
|
-
def get_context_for_file(self, file_path):
|
|
63
|
-
"""Retrieves related requirements and issues for a file."""
|
|
64
|
-
with self.driver.session() as session:
|
|
65
|
-
result = session.run("""
|
|
66
|
-
MATCH (f:File {path: $path})
|
|
67
|
-
OPTIONAL MATCH (i:Issue)-[r1]->(f)
|
|
68
|
-
OPTIONAL MATCH (req:Requirement)-[r2]->(f)
|
|
69
|
-
RETURN f.path as path, collect(DISTINCT i.number) as issues, collect(DISTINCT req.id) as requirements
|
|
70
|
-
""", path=file_path)
|
|
71
|
-
return result.single()
|
|
72
|
-
|
|
73
|
-
if __name__ == "__main__":
|
|
74
|
-
if not URI or not PASSWORD:
|
|
75
|
-
print("[ERROR] NEO4J_URI or NEO4J_PASSWORD not found in .env")
|
|
76
|
-
else:
|
|
77
|
-
brain = Neo4jBrain(URI, USERNAME, PASSWORD)
|
|
78
|
-
try:
|
|
79
|
-
brain.initialize_schema()
|
|
80
|
-
# Ingest current directory
|
|
81
|
-
brain.ingest_project_structure(".")
|
|
82
|
-
print("[SUCCESS] Project brain is now updated in the cloud.")
|
|
83
|
-
except Exception as e:
|
|
84
|
-
print(f"[ERROR] Operation failed: {e}")
|
|
85
|
-
finally:
|
|
86
|
-
brain.close()
|
package/bin/sync_github.py
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import re
|
|
3
|
-
from github import Github
|
|
4
|
-
from neo4j import GraphDatabase
|
|
5
|
-
from dotenv import load_dotenv
|
|
6
|
-
|
|
7
|
-
load_dotenv()
|
|
8
|
-
|
|
9
|
-
# Config
|
|
10
|
-
URI = os.getenv("NEO4J_URI")
|
|
11
|
-
USERNAME = os.getenv("NEO4J_USERNAME")
|
|
12
|
-
PASSWORD = os.getenv("NEO4J_PASSWORD")
|
|
13
|
-
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
|
|
14
|
-
GITHUB_REPO = os.getenv("GITHUB_REPO")
|
|
15
|
-
|
|
16
|
-
class GitHubNeo4jBridge:
|
|
17
|
-
def __init__(self):
|
|
18
|
-
if not all([URI, USERNAME, PASSWORD, GITHUB_TOKEN, GITHUB_REPO]):
|
|
19
|
-
raise Exception("Missing environment variables in .env")
|
|
20
|
-
self.driver = GraphDatabase.driver(URI, auth=(USERNAME, PASSWORD))
|
|
21
|
-
self.github = Github(GITHUB_TOKEN)
|
|
22
|
-
self.repo = self.github.get_repo(GITHUB_REPO)
|
|
23
|
-
|
|
24
|
-
def close(self):
|
|
25
|
-
self.driver.close()
|
|
26
|
-
|
|
27
|
-
def sync_issues(self):
|
|
28
|
-
print(f"🚀 Syncing issues from {GITHUB_REPO}...")
|
|
29
|
-
issues = self.repo.get_issues(state='all')
|
|
30
|
-
|
|
31
|
-
with self.driver.session() as session:
|
|
32
|
-
for issue in issues:
|
|
33
|
-
print(f"Processing Issue #{issue.number}: {issue.title}")
|
|
34
|
-
|
|
35
|
-
# 1. Create/Update Issue Node
|
|
36
|
-
session.run("""
|
|
37
|
-
MERGE (i:Issue {number: $number})
|
|
38
|
-
SET i.title = $title, i.state = $state, i.url = $url, i.body = $body
|
|
39
|
-
""", number=issue.number, title=issue.title, state=issue.state, url=issue.html_url, body=issue.body)
|
|
40
|
-
|
|
41
|
-
# 2. Extract Labels
|
|
42
|
-
for label in issue.labels:
|
|
43
|
-
session.run("""
|
|
44
|
-
MATCH (i:Issue {number: $number})
|
|
45
|
-
MERGE (l:Label {name: $label_name})
|
|
46
|
-
SET l.color = $color
|
|
47
|
-
MERGE (i)-[:HAS_LABEL]->(l)
|
|
48
|
-
""", number=issue.number, label_name=label.name, color=label.color)
|
|
49
|
-
|
|
50
|
-
# 3. Simple Heuristic: Link to Files mentioned in body
|
|
51
|
-
if issue.body:
|
|
52
|
-
# Look for paths like d:\dev\... or just relative paths mentioned
|
|
53
|
-
# This regex looks for common file extensions in the body
|
|
54
|
-
paths = re.findall(r'[\w\-\.\/]+\.(?:py|js|ts|md|yml|json|md)', issue.body)
|
|
55
|
-
for path in set(paths):
|
|
56
|
-
# Clean up path from some markdown characters
|
|
57
|
-
clean_path = path.strip('`()[]')
|
|
58
|
-
|
|
59
|
-
# Try to match existing File nodes in Neo4j
|
|
60
|
-
session.run("""
|
|
61
|
-
MATCH (i:Issue {number: $number})
|
|
62
|
-
MATCH (f:File)
|
|
63
|
-
WHERE f.path ENDS WITH $path OR $path ENDS WITH f.path
|
|
64
|
-
MERGE (i)-[:RELATES_TO_FILE]->(f)
|
|
65
|
-
""", number=issue.number, path=clean_path)
|
|
66
|
-
|
|
67
|
-
print("[SUCCESS] GitHub Issues synced to Neo4j Cloud.")
|
|
68
|
-
|
|
69
|
-
if __name__ == "__main__":
|
|
70
|
-
try:
|
|
71
|
-
bridge = GitHubNeo4jBridge()
|
|
72
|
-
bridge.sync_issues()
|
|
73
|
-
bridge.close()
|
|
74
|
-
except Exception as e:
|
|
75
|
-
print(f"[ERROR] {e}")
|
package/bin/utils/args-parser.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parse command line arguments
|
|
3
|
-
*/
|
|
4
|
-
export function parseArgs(args) {
|
|
5
|
-
const options = {
|
|
6
|
-
force: false,
|
|
7
|
-
quiet: false,
|
|
8
|
-
verbose: false,
|
|
9
|
-
noColor: false,
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const filtered = args.filter(arg => {
|
|
13
|
-
if (arg === '-f' || arg === '--force') {
|
|
14
|
-
options.force = true;
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (arg === '-q' || arg === '--quiet') {
|
|
18
|
-
options.quiet = true;
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (arg === '--verbose') {
|
|
22
|
-
options.verbose = true;
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
if (arg === '--no-color') {
|
|
26
|
-
options.noColor = true;
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
return { options, args: filtered };
|
|
33
|
-
}
|
package/bin/utils/colors.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// ANSI color codes
|
|
2
|
-
export const colors = {
|
|
3
|
-
reset: '\x1b[0m',
|
|
4
|
-
bright: '\x1b[1m',
|
|
5
|
-
dim: '\x1b[2m',
|
|
6
|
-
red: '\x1b[31m',
|
|
7
|
-
green: '\x1b[32m',
|
|
8
|
-
yellow: '\x1b[33m',
|
|
9
|
-
blue: '\x1b[34m',
|
|
10
|
-
cyan: '\x1b[36m',
|
|
11
|
-
magenta: '\x1b[35m',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const log = {
|
|
15
|
-
info: (msg) => console.log(`${colors.cyan}ℹ${colors.reset} ${msg}`),
|
|
16
|
-
success: (msg) => console.log(`${colors.green}✓${colors.reset} ${msg}`),
|
|
17
|
-
warning: (msg) => console.log(`${colors.yellow}⚠${colors.reset} ${msg}`),
|
|
18
|
-
error: (msg) => console.error(`${colors.red}✗${colors.reset} ${msg}`),
|
|
19
|
-
step: (msg) => console.log(`${colors.blue}→${colors.reset} ${msg}`),
|
|
20
|
-
header: (msg) => console.log(`\n${colors.bright}${msg}${colors.reset}\n`),
|
|
21
|
-
};
|