agentic-sdlc 1.0.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/README.md +298 -0
- package/.agent/ide-integration/aider-commands.md +40 -0
- package/.agent/ide-integration/cline-config.json +108 -0
- package/.agent/ide-integration/cursor-rules.md +63 -0
- package/.agent/ide-integration/github-copilot-instructions.md +75 -0
- package/.agent/ide-integration/vscode-commands.json +190 -0
- package/.agent/ide-integration/windsurf-cascade.md +125 -0
- package/.agent/knowledge-base/README.md +202 -0
- package/.agent/knowledge-base/architecture/.gitkeep +1 -0
- package/.agent/knowledge-base/bugs/.gitkeep +1 -0
- package/.agent/knowledge-base/features/.gitkeep +1 -0
- package/.agent/knowledge-base/index.md +202 -0
- package/.agent/knowledge-base/performance/.gitkeep +1 -0
- package/.agent/knowledge-base/platform-specific/.gitkeep +1 -0
- package/.agent/knowledge-base/security/.gitkeep +1 -0
- package/.agent/legacy/roles/designer.md +311 -0
- package/.agent/legacy/roles/dev.md +177 -0
- package/.agent/legacy/roles/devops.md +146 -0
- package/.agent/legacy/roles/orchestrator.md +339 -0
- package/.agent/legacy/roles/pm.md +120 -0
- package/.agent/legacy/roles/po.md +89 -0
- package/.agent/legacy/roles/qa.md +108 -0
- package/.agent/legacy/roles/reporter.md +70 -0
- package/.agent/legacy/roles/sa.md +118 -0
- package/.agent/legacy/roles/seca.md +112 -0
- package/.agent/legacy/roles/stakeholder.md +111 -0
- package/.agent/legacy/roles/tester.md +129 -0
- package/.agent/rules/artifacts.md +58 -0
- package/.agent/rules/git-workflow.md +65 -0
- package/.agent/rules/global.md +154 -0
- package/.agent/rules/global.md.bak +154 -0
- package/.agent/rules/knowledge-base.md +45 -0
- package/.agent/templates/Design-Verification-Report-Template.md +67 -0
- package/.agent/templates/DevOps-Plan-Template.md +90 -0
- package/.agent/templates/Development-Log-Template.md +51 -0
- package/.agent/templates/Final-Approval-Report-Template.md +82 -0
- package/.agent/templates/Final-Project-Report-Template.md +280 -0
- package/.agent/templates/Knowledge-Entry-Template.md +164 -0
- package/.agent/templates/Master-Documentation-Template.md +269 -0
- package/.agent/templates/Phase-Report-Template.md +70 -0
- package/.agent/templates/Product-Backlog-Template.md +84 -0
- package/.agent/templates/Project-Plan-Template.md +79 -0
- package/.agent/templates/Security-Review-Report-Template.md +80 -0
- package/.agent/templates/System-Design-Spec-Template.md +170 -0
- package/.agent/templates/Test-Report-Template.md +97 -0
- package/.agent/templates/UIUX-Design-Spec-Template.md +280 -0
- package/.agent/templates/definition-of-done.md +151 -0
- package/.agent/templates/incident-response.md +111 -0
- package/.agent/usage.md +653 -0
- package/.agent/workflows/auto.md +35 -0
- package/.agent/workflows/brain.md +56 -0
- package/.agent/workflows/dev.md +30 -0
- package/.agent/workflows/devops.md +28 -0
- package/.agent/workflows/kb-search.md +22 -0
- package/.agent/workflows/pm.md +42 -0
- package/.agent/workflows/po.md +21 -0
- package/.agent/workflows/qa.md +31 -0
- package/.agent/workflows/reporter.md +21 -0
- package/.agent/workflows/sa.md +51 -0
- package/.agent/workflows/seca.md +21 -0
- package/.agent/workflows/stakeholder.md +26 -0
- package/.agent/workflows/tester.md +21 -0
- package/.agent/workflows/uiux.md +38 -0
- package/.cursorrules +49 -0
- package/.env.template +10 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
- package/.github/ISSUE_TEMPLATE/security_alert.yml +28 -0
- package/.github/ISSUE_TEMPLATE/task_implementation.yml +37 -0
- package/.github/copilot-instructions.md +60 -0
- package/CHANGELOG.md +13 -0
- package/README.md +136 -0
- package/bin/cli.js +104 -0
- package/bin/commands/create.js +96 -0
- package/bin/commands/help.js +69 -0
- package/bin/commands/ide.js +116 -0
- package/bin/commands/init-kb.js +74 -0
- package/bin/commands/install.js +68 -0
- package/bin/commands/list.js +35 -0
- package/bin/graph_brain.py +86 -0
- package/bin/sync_github.py +75 -0
- package/bin/utils/args-parser.js +33 -0
- package/bin/utils/colors.js +21 -0
- package/bin/verify_neo4j.py +25 -0
- package/docs/OUTLINE.md +23 -0
- package/docs/architecture/brain.md +36 -0
- package/docs/architecture/neo4j-learning-queries.md +49 -0
- package/docs/guides/CLI-EXAMPLES.md +649 -0
- package/docs/guides/INTEGRATION-GUIDE.md +709 -0
- package/docs/guides/MCP-GUIDE.md +53 -0
- package/docs/guides/QUICK-START.md +104 -0
- package/docs/reports/comparison-leann-neo4j.md +49 -0
- package/docs/setup/github-management.md +37 -0
- package/docs/sprints/sprint-github-issues.md +36 -0
- package/docs/sprints/sprint-leann-integration.md +41 -0
- package/docs/sprints/sprint-neo4j-brain.md +38 -0
- package/package.json +16 -0
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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()
|
|
@@ -0,0 +1,75 @@
|
|
|
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}")
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from neo4j import GraphDatabase
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
|
|
5
|
+
load_dotenv()
|
|
6
|
+
|
|
7
|
+
URI = os.getenv("NEO4J_URI")
|
|
8
|
+
USERNAME = os.getenv("NEO4J_USERNAME")
|
|
9
|
+
PASSWORD = os.getenv("NEO4J_PASSWORD")
|
|
10
|
+
|
|
11
|
+
def verify_data():
|
|
12
|
+
driver = GraphDatabase.driver(URI, auth=(USERNAME, PASSWORD))
|
|
13
|
+
with driver.session() as session:
|
|
14
|
+
result = session.run("MATCH (f:File) RETURN f.path as path, f.summary as summary")
|
|
15
|
+
records = list(result)
|
|
16
|
+
if records:
|
|
17
|
+
print(f"[SUCCESS] Found {len(records)} files in Neo4j:")
|
|
18
|
+
for record in records:
|
|
19
|
+
print(f" - {record['path']}: {record['summary']}")
|
|
20
|
+
else:
|
|
21
|
+
print("[WARNING] No files found in Neo4j.")
|
|
22
|
+
driver.close()
|
|
23
|
+
|
|
24
|
+
if __name__ == "__main__":
|
|
25
|
+
verify_data()
|
package/docs/OUTLINE.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Documentation Outline
|
|
2
|
+
|
|
3
|
+
Explore the comprehensive documentation for Agentic SDLC to master its specialized AI roles and automated workflows.
|
|
4
|
+
|
|
5
|
+
## ๐ Getting Started
|
|
6
|
+
- **[Quick Start Guide](guides/QUICK-START.md)**: Get up and running in 5 minutes.
|
|
7
|
+
- **[Integration Guide](guides/INTEGRATION-GUIDE.md)**: Add Agentic SDLC to your existing projects.
|
|
8
|
+
- **[CLI Examples](guides/CLI-EXAMPLES.md)**: Real-world command-line usage and workflows.
|
|
9
|
+
|
|
10
|
+
## ๐ ๏ธ Core Concepts
|
|
11
|
+
- **[Usage Guide](../.agent/usage.md)**: Detailed documentation on roles, modes, and commands.
|
|
12
|
+
- **[IDE Integration](../.agent/ide-integration/README.md)**: Setting up Cursor, Copilot, and other IDEs.
|
|
13
|
+
- **[MCP Guide](guides/MCP-GUIDE.md)**: Understanding Model Context Protocol (MCP) integrations.
|
|
14
|
+
|
|
15
|
+
## ๐๏ธ Architecture & Knowledge
|
|
16
|
+
- **[AI Brain](architecture/brain.md)**: How the project captures and uses collective knowledge.
|
|
17
|
+
- **[Neo4j Queries](architecture/neo4j-learning-queries.md)**: Advanced knowledge retrieval for technical insights.
|
|
18
|
+
|
|
19
|
+
## โ๏ธ Project Management
|
|
20
|
+
- **[GitHub Management](setup/github-management.md)**: Integrating with GitHub issues and automation.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
*Generated by Antigravity - 2026-01-01*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ๐ง The Project Brain: Hybrid Memory & Reasoning
|
|
2
|
+
|
|
3
|
+
This project uses a **Hybrid Brain Architecture** combining **LEANN** (Vector Memory) and **Neo4j Aura** (Reasoning Graph).
|
|
4
|
+
|
|
5
|
+
## ๐ Two Layers of Intelligence
|
|
6
|
+
|
|
7
|
+
### 1. LEANN (Semantic Knowledge)
|
|
8
|
+
- **Primary Use:** Finding similar code patterns and semantic context.
|
|
9
|
+
- **Why:** Ultra-fast, AST-aware search with 97% storage savings.
|
|
10
|
+
- **Operation:** Local (runs via WSL2 or local Python).
|
|
11
|
+
|
|
12
|
+
### 2. Neo4j Cloud (Reasoning Graph)
|
|
13
|
+
- **Primary Use:** Understanding relationships between requirements, code, and bugs.
|
|
14
|
+
- **Why:** Allows agents to perform deep reasoning paths: *"This bug in File X is related to Requirement Y implemented in Sprint Z."*
|
|
15
|
+
- **Operation:** Cloud-based (Neo4j AuraDB).
|
|
16
|
+
|
|
17
|
+
## ๐ ๏ธ How to Use
|
|
18
|
+
|
|
19
|
+
### 1. Semantic Search
|
|
20
|
+
Use `/brain [query]` or run:
|
|
21
|
+
```bash
|
|
22
|
+
leann search "your query"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Reasoning Update
|
|
26
|
+
To sync the latest project structure and relationships to the Cloud Brain:
|
|
27
|
+
```bash
|
|
28
|
+
python bin/graph_brain.py
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## ๐ Best Practices
|
|
32
|
+
- **Update Frequently:** Run the ingestion script after merging any major feature.
|
|
33
|
+
- **Hybrid Queries:** When solving a complex bug, ask the AI to check both LEANN for code context and Neo4j for relationship history.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
*Powered by [LEANN](https://github.com/yichuan-w/LEANN) and [Neo4j Aura](https://neo4j.com/aura/)*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# ๐ง AI Self-Learning: Neo4j Reasoning Dashboard
|
|
2
|
+
|
|
3
|
+
These Cypher queries are designed to help the AI (and you) extract "wisdom" from the project graph. Run these in your [Neo4j Aura Console](https://console.neo4j.io/).
|
|
4
|
+
|
|
5
|
+
## 1. ๐ Project Heatmap (Risk Analysis)
|
|
6
|
+
Find files that are frequently linked to bugs. These are your "high-risk" areas that require more testing.
|
|
7
|
+
```cypher
|
|
8
|
+
MATCH (f:File)<-[:RELATES_TO_FILE]-(i:Issue)-[:HAS_LABEL]->(l:Label {name: 'type:bug'})
|
|
9
|
+
RETURN f.path AS FilePath, count(i) AS BugCount
|
|
10
|
+
ORDER BY BugCount DESC
|
|
11
|
+
LIMIT 10
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## 2. ๐ต๏ธ Feature Lineage
|
|
15
|
+
Trace a specific feature requirement to the exact files that implement it and the issues encountered during development.
|
|
16
|
+
```cypher
|
|
17
|
+
MATCH (f:File)<-[:RELATES_TO_FILE]-(i:Issue)
|
|
18
|
+
WHERE i.title CONTAINS 'Feature Name' // Replace with your feature
|
|
19
|
+
RETURN i.number AS Issue, i.title AS Title, f.path AS AffectedFile
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 3. ๐ฆ Skill Capability Map
|
|
23
|
+
See which roles (labels) are managing which parts of the codebase. This helps in understanding "Who owns what?"
|
|
24
|
+
```cypher
|
|
25
|
+
MATCH (f:File)<-[:RELATES_TO_FILE]-(i:Issue)-[:HAS_LABEL]->(l:Label)
|
|
26
|
+
WHERE l.name STARTS WITH 'role:'
|
|
27
|
+
RETURN l.name AS Role, f.path AS FilePath, count(i) AS ContributionLevel
|
|
28
|
+
ORDER BY ContributionLevel DESC
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 4. ๐ง The "Lessons Learned" Path
|
|
32
|
+
Find the reasoning body for completed tasks to help the AI implement similar features in the future.
|
|
33
|
+
```cypher
|
|
34
|
+
MATCH (i:Issue {state: 'closed'})-[:RELATES_TO_FILE]->(f:File)
|
|
35
|
+
RETURN i.title AS TaskSummary, i.body AS TechnicalReasoning, f.path AS ReferenceFile
|
|
36
|
+
ORDER BY i.number DESC
|
|
37
|
+
LIMIT 5
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## ๐งน Maintenance Query: Clean Up Unlinked Files
|
|
41
|
+
Find files that don't have any issue coverage yet (potentially dark code).
|
|
42
|
+
```cypher
|
|
43
|
+
MATCH (f:File)
|
|
44
|
+
WHERE NOT (f)<-[:RELATES_TO_FILE]-(:Issue)
|
|
45
|
+
RETURN f.path AS UntrackedFile
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
*Query these regularly to improve the AI's "Intuition" about the codebase.*
|