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/README.md
ADDED
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
# Knowledge Base Scripts (Python Only)
|
|
2
|
+
|
|
3
|
+
**Cross-Platform CLI** - Works on Windows, Linux, and macOS
|
|
4
|
+
|
|
5
|
+
Python-based CLI for managing the TeamLifecycle knowledge base with Neo4j brain integration.
|
|
6
|
+
|
|
7
|
+
## 🐍 Technology Stack
|
|
8
|
+
|
|
9
|
+
- ✅ **Python 3.7+** - Primary language
|
|
10
|
+
- ✅ **Shell scripts** - Linux/macOS entry points
|
|
11
|
+
- ✅ **Batch/PowerShell** - Windows entry points
|
|
12
|
+
- ❌ **NO JavaScript/Node.js**
|
|
13
|
+
|
|
14
|
+
## 🌍 Cross-Platform Support
|
|
15
|
+
|
|
16
|
+
The KB CLI supports all major platforms:
|
|
17
|
+
|
|
18
|
+
- **Windows** - CMD, PowerShell, Git Bash
|
|
19
|
+
- **Linux** - Bash, Zsh, Fish
|
|
20
|
+
- **macOS** - Bash, Zsh
|
|
21
|
+
|
|
22
|
+
### Quick Start
|
|
23
|
+
|
|
24
|
+
**Windows:**
|
|
25
|
+
```cmd
|
|
26
|
+
bin\kb\kb.bat help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Linux/macOS:**
|
|
30
|
+
```bash
|
|
31
|
+
./bin/kb/kb help
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**See:** `kb/CROSS-PLATFORM-CLI.md` for complete cross-platform guide
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
The compound learning system combines file-based storage with Neo4j graph database to create an intelligent knowledge system:
|
|
39
|
+
|
|
40
|
+
- **File System** - Stores full markdown content from `.agent/knowledge-base/` and `docs/`
|
|
41
|
+
- **Neo4j Brain** - Maps relationships between skills, technologies, and entries
|
|
42
|
+
- **Compound Scripts** - Seamless integration between both
|
|
43
|
+
- **Cross-Platform** - Python-based CLI works everywhere
|
|
44
|
+
- **Unified Search** - Search across KB entries + all project documentation (46+ entries)
|
|
45
|
+
|
|
46
|
+
### Knowledge Sources
|
|
47
|
+
|
|
48
|
+
The system indexes knowledge from two locations:
|
|
49
|
+
|
|
50
|
+
1. **`.agent/knowledge-base/`** - KB entries (bugs, features, architecture)
|
|
51
|
+
2. **`docs/`** - All project documentation (guides, reports, architecture docs)
|
|
52
|
+
|
|
53
|
+
This provides **7x more searchable knowledge** than KB entries alone!
|
|
54
|
+
|
|
55
|
+
## Available Scripts
|
|
56
|
+
|
|
57
|
+
### Cross-Platform CLI
|
|
58
|
+
|
|
59
|
+
**Entry Points:**
|
|
60
|
+
- `kb` - Bash script (Linux/macOS/Git Bash)
|
|
61
|
+
- `kb.bat` - Windows batch script
|
|
62
|
+
- `kb_cli.py` - Python CLI (all platforms)
|
|
63
|
+
|
|
64
|
+
**Library Modules:**
|
|
65
|
+
- `lib/kb_common.py` - Common utilities
|
|
66
|
+
- `lib/kb_search.py` - Search functionality
|
|
67
|
+
- `lib/kb_add.py` - Add entries
|
|
68
|
+
- `lib/kb_index.py` - Index generation
|
|
69
|
+
- `lib/kb_stats.py` - Statistics
|
|
70
|
+
- `lib/kb_list.py` - List entries
|
|
71
|
+
- `lib/kb_compound.py` - Neo4j integration
|
|
72
|
+
|
|
73
|
+
## 📚 Available Scripts
|
|
74
|
+
|
|
75
|
+
### 1. `kb` / `kb.bat` - Main Interface
|
|
76
|
+
Central command-line interface for all KB operations.
|
|
77
|
+
|
|
78
|
+
**Windows:**
|
|
79
|
+
```cmd
|
|
80
|
+
bin\kb.bat [command] [args]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Linux/macOS:**
|
|
84
|
+
```bash
|
|
85
|
+
./bin/kb [command] [args]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## 🔍 Commands
|
|
89
|
+
|
|
90
|
+
### 1. Search Knowledge Base
|
|
91
|
+
|
|
92
|
+
Search for entries by keyword:
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
# Search for a term
|
|
96
|
+
.\bin\kb.ps1 search "react hydration"
|
|
97
|
+
|
|
98
|
+
# Search in specific category
|
|
99
|
+
.\bin\kb-search.ps1 "oauth" -Category "features"
|
|
100
|
+
|
|
101
|
+
# Filter by priority
|
|
102
|
+
.\bin\kb-search.ps1 "bug" -Priority "critical"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**What it does:**
|
|
106
|
+
- Searches INDEX.md first
|
|
107
|
+
- Then searches all KB entry files
|
|
108
|
+
- Shows matching entries with context
|
|
109
|
+
- Displays file paths and metadata
|
|
110
|
+
|
|
111
|
+
### 2. Add New Entry
|
|
112
|
+
|
|
113
|
+
Interactive wizard to create a new KB entry:
|
|
114
|
+
|
|
115
|
+
```powershell
|
|
116
|
+
.\bin\kb.ps1 add
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**What it does:**
|
|
120
|
+
- Prompts for title, category, priority, tags
|
|
121
|
+
- Generates unique filename with date and ID
|
|
122
|
+
- Creates entry from template
|
|
123
|
+
- Places in correct folder
|
|
124
|
+
- Opens file in default editor
|
|
125
|
+
|
|
126
|
+
**Categories:**
|
|
127
|
+
1. bug - Bug fixes
|
|
128
|
+
2. feature - Complex features
|
|
129
|
+
3. architecture - Architecture decisions
|
|
130
|
+
4. security - Security fixes
|
|
131
|
+
5. performance - Performance optimizations
|
|
132
|
+
6. platform - Platform-specific issues
|
|
133
|
+
|
|
134
|
+
**Priorities:**
|
|
135
|
+
1. critical - System breaking
|
|
136
|
+
2. high - Major issues
|
|
137
|
+
3. medium - Moderate issues
|
|
138
|
+
4. low - Minor issues
|
|
139
|
+
|
|
140
|
+
### 3. Update Index
|
|
141
|
+
|
|
142
|
+
Regenerate INDEX.md with all entries:
|
|
143
|
+
|
|
144
|
+
```powershell
|
|
145
|
+
.\bin\kb.ps1 index
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**What it does:**
|
|
149
|
+
- Scans all KB entries
|
|
150
|
+
- Extracts metadata (title, category, priority, tags)
|
|
151
|
+
- Groups by category, priority, and date
|
|
152
|
+
- Generates searchable INDEX.md
|
|
153
|
+
- Shows statistics
|
|
154
|
+
|
|
155
|
+
**Run this after:**
|
|
156
|
+
- Adding new entries
|
|
157
|
+
- Updating existing entries
|
|
158
|
+
- Reorganizing KB structure
|
|
159
|
+
|
|
160
|
+
### 4. Show Statistics
|
|
161
|
+
|
|
162
|
+
Display KB statistics and metrics:
|
|
163
|
+
|
|
164
|
+
```powershell
|
|
165
|
+
.\bin\kb.ps1 stats
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**What it shows:**
|
|
169
|
+
- Total entries
|
|
170
|
+
- Breakdown by category
|
|
171
|
+
- Breakdown by priority
|
|
172
|
+
- Total attempts
|
|
173
|
+
- Time saved
|
|
174
|
+
- Recent activity
|
|
175
|
+
- Growth trend
|
|
176
|
+
|
|
177
|
+
### 5. List Entries
|
|
178
|
+
|
|
179
|
+
List all entries or filter by category:
|
|
180
|
+
|
|
181
|
+
```powershell
|
|
182
|
+
# List all entries
|
|
183
|
+
.\bin\kb.ps1 list
|
|
184
|
+
|
|
185
|
+
# List by category
|
|
186
|
+
.\bin\kb.ps1 list bugs
|
|
187
|
+
.\bin\kb.ps1 list features
|
|
188
|
+
.\bin\kb.ps1 list architecture
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 6. Show Recent Entries
|
|
192
|
+
|
|
193
|
+
Display recently added/modified entries:
|
|
194
|
+
|
|
195
|
+
```powershell
|
|
196
|
+
# Show last 10 entries (default)
|
|
197
|
+
.\bin\kb.ps1 recent
|
|
198
|
+
|
|
199
|
+
# Show last 5 entries
|
|
200
|
+
.\bin\kb.ps1 recent 5
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 7. Compound Mode (Neo4j Integration)
|
|
204
|
+
|
|
205
|
+
Enhanced commands that integrate file system with Neo4j brain:
|
|
206
|
+
|
|
207
|
+
```powershell
|
|
208
|
+
# Compound search (file + Neo4j)
|
|
209
|
+
.\bin\kb.ps1 compound search "authentication"
|
|
210
|
+
|
|
211
|
+
# Compound add (create + sync to Neo4j)
|
|
212
|
+
.\bin\kb.ps1 compound add
|
|
213
|
+
|
|
214
|
+
# Compound sync (full sync to Neo4j)
|
|
215
|
+
.\bin\kb.ps1 compound sync
|
|
216
|
+
|
|
217
|
+
# Compound query (intelligent Neo4j queries)
|
|
218
|
+
.\bin\kb.ps1 compound query "React"
|
|
219
|
+
|
|
220
|
+
# Compound stats (system health)
|
|
221
|
+
.\bin\kb.ps1 compound stats
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**What compound mode does:**
|
|
225
|
+
- Searches both file system AND Neo4j graph
|
|
226
|
+
- Automatically syncs entries to Neo4j brain
|
|
227
|
+
- Maps relationships between skills and technologies
|
|
228
|
+
- Provides intelligent contextual queries
|
|
229
|
+
- Shows compound system health
|
|
230
|
+
|
|
231
|
+
**See:** `docs/NEO4J-COMPOUND-INTEGRATION.md` for complete guide
|
|
232
|
+
|
|
233
|
+
### 8. Help
|
|
234
|
+
|
|
235
|
+
Show help and usage:
|
|
236
|
+
|
|
237
|
+
```powershell
|
|
238
|
+
.\bin\kb.ps1 help
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## 🚀 Quick Start Workflow
|
|
242
|
+
|
|
243
|
+
### Before Solving a Problem
|
|
244
|
+
|
|
245
|
+
```powershell
|
|
246
|
+
# 1. Compound search (file + Neo4j brain)
|
|
247
|
+
.\bin\kb.ps1 compound search "your problem"
|
|
248
|
+
|
|
249
|
+
# 2. If found, read the solution
|
|
250
|
+
# 3. If not found, solve it yourself
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### After Solving a Hard Problem
|
|
254
|
+
|
|
255
|
+
```powershell
|
|
256
|
+
# 1. Add entry with compound mode (auto-syncs to Neo4j)
|
|
257
|
+
.\bin\kb.ps1 compound add
|
|
258
|
+
|
|
259
|
+
# 2. Fill in the details in the opened file
|
|
260
|
+
|
|
261
|
+
# 3. Entry is automatically synced to Neo4j brain
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Weekly Maintenance
|
|
265
|
+
|
|
266
|
+
```powershell
|
|
267
|
+
# Check compound system health
|
|
268
|
+
.\bin\kb.ps1 compound stats
|
|
269
|
+
|
|
270
|
+
# Full sync to Neo4j
|
|
271
|
+
.\bin\kb.ps1 compound sync
|
|
272
|
+
|
|
273
|
+
# Review recent entries
|
|
274
|
+
.\bin\kb.ps1 recent 20
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## 📊 Example Usage
|
|
278
|
+
|
|
279
|
+
### Scenario 1: React Hydration Error
|
|
280
|
+
|
|
281
|
+
```powershell
|
|
282
|
+
# Search first
|
|
283
|
+
PS> .\bin\kb.ps1 search "react hydration"
|
|
284
|
+
|
|
285
|
+
🔍 Searching Knowledge Base for: 'react hydration'
|
|
286
|
+
|
|
287
|
+
✅ Found in INDEX:
|
|
288
|
+
KB-2026-01-01-001-react-hydration-error.md
|
|
289
|
+
|
|
290
|
+
✅ Found: React Hydration Mismatch Error
|
|
291
|
+
File: .agent/knowledge-base/bugs/high/KB-2026-01-01-001-react-hydration-error.md
|
|
292
|
+
Category: bug | Priority: high
|
|
293
|
+
Context:
|
|
294
|
+
## Problem
|
|
295
|
+
React shows "Hydration failed" error in production
|
|
296
|
+
|
|
297
|
+
📊 Search Results: 1 entries found
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Scenario 2: Add OAuth Implementation
|
|
301
|
+
|
|
302
|
+
```powershell
|
|
303
|
+
# Add new entry
|
|
304
|
+
PS> .\bin\kb.ps1 add
|
|
305
|
+
|
|
306
|
+
📝 Knowledge Base - Add New Entry
|
|
307
|
+
|
|
308
|
+
Title: OAuth 2.0 Implementation with Google
|
|
309
|
+
Category (1-6): 2
|
|
310
|
+
Priority (1-4): 2
|
|
311
|
+
Tags: oauth, google, authentication
|
|
312
|
+
Attempts: 4
|
|
313
|
+
Time saved: 3 hours
|
|
314
|
+
|
|
315
|
+
✅ Entry Created Successfully!
|
|
316
|
+
|
|
317
|
+
📄 File: .agent/knowledge-base/features/KB-2026-01-02-001-oauth-google.md
|
|
318
|
+
|
|
319
|
+
# Update index
|
|
320
|
+
PS> .\bin\kb.ps1 index
|
|
321
|
+
|
|
322
|
+
✅ INDEX.md Updated Successfully!
|
|
323
|
+
📊 Total Entries: 15
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Scenario 3: Check KB Health
|
|
327
|
+
|
|
328
|
+
```powershell
|
|
329
|
+
PS> .\bin\kb.ps1 stats
|
|
330
|
+
|
|
331
|
+
📊 Knowledge Base Statistics
|
|
332
|
+
|
|
333
|
+
📚 Total Entries: 15
|
|
334
|
+
|
|
335
|
+
📁 By Category:
|
|
336
|
+
bug : 6 entries (40%)
|
|
337
|
+
██████████████████████
|
|
338
|
+
feature : 5 entries (33.3%)
|
|
339
|
+
████████████████
|
|
340
|
+
architecture : 2 entries (13.3%)
|
|
341
|
+
██████
|
|
342
|
+
security : 2 entries (13.3%)
|
|
343
|
+
██████
|
|
344
|
+
|
|
345
|
+
⚠️ By Priority:
|
|
346
|
+
🔴 critical : 2 entries (13.3%)
|
|
347
|
+
🟠 high : 5 entries (33.3%)
|
|
348
|
+
🟡 medium : 6 entries (40%)
|
|
349
|
+
🟢 low : 2 entries (13.3%)
|
|
350
|
+
|
|
351
|
+
📈 Compound Learning Metrics:
|
|
352
|
+
Total Attempts: 45
|
|
353
|
+
Avg Attempts per Entry: 3.0
|
|
354
|
+
Total Time Saved: ~38 hours
|
|
355
|
+
Projected Time Saved (2x reuse): ~76 hours
|
|
356
|
+
|
|
357
|
+
💡 Compound Effect:
|
|
358
|
+
Each entry makes future work easier!
|
|
359
|
+
Keep documenting to compound your knowledge! 🚀
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## 🎯 Best Practices
|
|
363
|
+
|
|
364
|
+
### When to Search
|
|
365
|
+
- ✅ Before starting any complex task
|
|
366
|
+
- ✅ When encountering an error
|
|
367
|
+
- ✅ When implementing a known pattern
|
|
368
|
+
- ✅ During code review
|
|
369
|
+
|
|
370
|
+
### When to Add
|
|
371
|
+
- ✅ Bug took 3+ attempts to fix
|
|
372
|
+
- ✅ Solution was non-obvious
|
|
373
|
+
- ✅ Issue likely to recur
|
|
374
|
+
- ✅ Pattern applies to multiple features
|
|
375
|
+
- ✅ Security vulnerability fixed
|
|
376
|
+
- ✅ Performance optimization achieved
|
|
377
|
+
|
|
378
|
+
### When to Update Index
|
|
379
|
+
- ✅ After adding new entries
|
|
380
|
+
- ✅ After updating existing entries
|
|
381
|
+
- ✅ Weekly maintenance
|
|
382
|
+
- ✅ Before sharing KB with team
|
|
383
|
+
|
|
384
|
+
## 🔧 Script Details
|
|
385
|
+
|
|
386
|
+
### File Naming Convention
|
|
387
|
+
|
|
388
|
+
Entries are named: `KB-YYYY-MM-DD-###-title-slug.md`
|
|
389
|
+
|
|
390
|
+
Example: `KB-2026-01-02-001-react-hydration-error.md`
|
|
391
|
+
|
|
392
|
+
- `YYYY-MM-DD` - Date created
|
|
393
|
+
- `###` - Sequential ID for that day
|
|
394
|
+
- `title-slug` - URL-friendly title
|
|
395
|
+
|
|
396
|
+
### Folder Structure
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
.agent/knowledge-base/
|
|
400
|
+
├── bugs/
|
|
401
|
+
│ ├── critical/
|
|
402
|
+
│ ├── high/
|
|
403
|
+
│ ├── medium/
|
|
404
|
+
│ └── low/
|
|
405
|
+
├── features/
|
|
406
|
+
│ ├── authentication/
|
|
407
|
+
│ ├── performance/
|
|
408
|
+
│ ├── integration/
|
|
409
|
+
│ └── ui-ux/
|
|
410
|
+
├── architecture/
|
|
411
|
+
├── security/
|
|
412
|
+
├── performance/
|
|
413
|
+
└── platform-specific/
|
|
414
|
+
├── web/
|
|
415
|
+
├── mobile/
|
|
416
|
+
├── desktop/
|
|
417
|
+
└── cli/
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### Entry Template
|
|
421
|
+
|
|
422
|
+
Each entry includes:
|
|
423
|
+
- YAML frontmatter (metadata)
|
|
424
|
+
- Problem description
|
|
425
|
+
- What didn't work
|
|
426
|
+
- Solution that worked
|
|
427
|
+
- Code examples
|
|
428
|
+
- Prevention tips
|
|
429
|
+
- Related patterns
|
|
430
|
+
|
|
431
|
+
## 📚 Documentation
|
|
432
|
+
|
|
433
|
+
- **Simple Guide:** `.agent/knowledge-base/HOW-IT-WORKS.md`
|
|
434
|
+
- **Visual Guide:** `docs/KNOWLEDGE-BASE-GUIDE.md`
|
|
435
|
+
- **Quick Reference:** `docs/KNOWLEDGE-BASE-SIMPLE.md`
|
|
436
|
+
- **Full README:** `.agent/knowledge-base/README.md`
|
|
437
|
+
|
|
438
|
+
## 🐛 Troubleshooting
|
|
439
|
+
|
|
440
|
+
### Script Won't Run
|
|
441
|
+
|
|
442
|
+
```powershell
|
|
443
|
+
# Enable script execution
|
|
444
|
+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Search Not Finding Entries
|
|
448
|
+
|
|
449
|
+
- Check spelling
|
|
450
|
+
- Try different keywords
|
|
451
|
+
- Use broader terms
|
|
452
|
+
- Check if entry exists: `.\bin\kb.ps1 list`
|
|
453
|
+
|
|
454
|
+
### Index Not Updating
|
|
455
|
+
|
|
456
|
+
- Ensure entries have proper YAML frontmatter
|
|
457
|
+
- Check file naming convention
|
|
458
|
+
- Run: `.\bin\kb.ps1 index` manually
|
|
459
|
+
|
|
460
|
+
## 💡 Tips
|
|
461
|
+
|
|
462
|
+
1. **Search First** - Always search before solving
|
|
463
|
+
2. **Document Immediately** - Add entry right after solving
|
|
464
|
+
3. **Use Tags** - Add relevant tags for better searchability
|
|
465
|
+
4. **Update Index** - Run `kb.ps1 index` regularly
|
|
466
|
+
5. **Review Stats** - Check `kb.ps1 stats` weekly
|
|
467
|
+
6. **Share Knowledge** - Tell team about useful entries
|
|
468
|
+
|
|
469
|
+
## 🎓 Learning Path
|
|
470
|
+
|
|
471
|
+
### Week 1: Consumer
|
|
472
|
+
```powershell
|
|
473
|
+
.\bin\kb.ps1 search "your problem"
|
|
474
|
+
.\bin\kb.ps1 list
|
|
475
|
+
.\bin\kb.ps1 recent
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Week 2: Contributor
|
|
479
|
+
```powershell
|
|
480
|
+
.\bin\kb.ps1 add
|
|
481
|
+
.\bin\kb.ps1 index
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Week 3: Curator
|
|
485
|
+
```powershell
|
|
486
|
+
.\bin\kb.ps1 stats
|
|
487
|
+
# Update old entries
|
|
488
|
+
.\bin\kb.ps1 index
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## 🚀 Advanced Usage
|
|
492
|
+
|
|
493
|
+
### Batch Operations
|
|
494
|
+
|
|
495
|
+
```powershell
|
|
496
|
+
# Search multiple terms
|
|
497
|
+
$terms = @("react", "oauth", "performance")
|
|
498
|
+
foreach ($term in $terms) {
|
|
499
|
+
.\bin\kb.ps1 search $term
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
# List all categories
|
|
503
|
+
$categories = @("bugs", "features", "architecture")
|
|
504
|
+
foreach ($cat in $categories) {
|
|
505
|
+
.\bin\kb.ps1 list $cat
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Integration with Git
|
|
510
|
+
|
|
511
|
+
```powershell
|
|
512
|
+
# After adding entry
|
|
513
|
+
.\bin\kb.ps1 add
|
|
514
|
+
.\bin\kb.ps1 index
|
|
515
|
+
git add .agent/knowledge-base/
|
|
516
|
+
git commit -m "docs: add KB entry for OAuth implementation"
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
**Version:** 1.0.0
|
|
522
|
+
**Created:** 2026-01-02
|
|
523
|
+
**Platform:** Windows PowerShell
|
|
524
|
+
|
|
525
|
+
#knowledge-base #scripts #automation #compound-learning
|
package/bin/cli.js
CHANGED
|
@@ -1,104 +1,79 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
|
-
import path from 'path';
|
|
2
|
+
import { spawn } from 'child_process';
|
|
5
3
|
import { fileURLToPath } from 'url';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const { options, args: filteredArgs } = parseArgs(args);
|
|
36
|
-
const command = filteredArgs[0];
|
|
37
|
-
|
|
38
|
-
// Handle help flags
|
|
39
|
-
if (command === '-h' || command === '--help' || command === 'help') {
|
|
40
|
-
showHelp(packageJson);
|
|
41
|
-
process.exit(0);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Handle version flags
|
|
45
|
-
if (command === '-v' || command === '--version' || command === 'version') {
|
|
46
|
-
showVersion(packageJson);
|
|
47
|
-
process.exit(0);
|
|
48
|
-
}
|
|
4
|
+
import { dirname, join, resolve } from 'path';
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const rootDir = resolve(__dirname, '..');
|
|
9
|
+
|
|
10
|
+
const commands = {
|
|
11
|
+
'release': 'tools/release/release.py',
|
|
12
|
+
'kb': 'bin/kb_cli.py',
|
|
13
|
+
'agent': 'tools/run.py',
|
|
14
|
+
'validate': 'tools/validation/validate.py',
|
|
15
|
+
'health': 'tools/validation/health-check.py',
|
|
16
|
+
'setup': 'tools/setup/init.py'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const args = process.argv.slice(2);
|
|
20
|
+
const command = args[0];
|
|
21
|
+
|
|
22
|
+
function printUsage() {
|
|
23
|
+
console.log("Usage: agentic-sdlc <command> [args]");
|
|
24
|
+
console.log("Commands:");
|
|
25
|
+
console.log(" release Manage releases (args: release, preview, changelog, version)");
|
|
26
|
+
console.log(" workflow Run workflows (args: cycle, housekeeping, etc.)");
|
|
27
|
+
console.log(" kb Knowledge Base tools");
|
|
28
|
+
console.log(" agent Run default agent");
|
|
29
|
+
console.log(" validate Validate system");
|
|
30
|
+
console.log(" health Check health");
|
|
31
|
+
console.log(" setup Initialize project");
|
|
32
|
+
}
|
|
49
33
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
break;
|
|
34
|
+
if (!command || command === '--help' || command === '-h') {
|
|
35
|
+
printUsage();
|
|
36
|
+
process.exit(command ? 0 : 1);
|
|
37
|
+
}
|
|
55
38
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
let scriptPath = commands[command];
|
|
40
|
+
let scriptArgs = args.slice(1);
|
|
41
|
+
|
|
42
|
+
// Special handling for workflows
|
|
43
|
+
if (command === 'workflow') {
|
|
44
|
+
const sub = args[1];
|
|
45
|
+
if (sub) {
|
|
46
|
+
scriptPath = `tools/workflows/${sub}.py`;
|
|
47
|
+
scriptArgs = args.slice(2);
|
|
48
|
+
} else {
|
|
49
|
+
console.error("Please specify a workflow (e.g., cycle, housekeeping)");
|
|
61
50
|
process.exit(1);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
break;
|
|
65
|
-
|
|
66
|
-
case 'list':
|
|
67
|
-
await listTemplates(templatePath);
|
|
68
|
-
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
69
53
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
|
77
|
-
await setupIDE(templatePath, ideName, options);
|
|
78
|
-
break;
|
|
54
|
+
if (!scriptPath) {
|
|
55
|
+
console.error(`Unknown command: ${command}`);
|
|
56
|
+
printUsage();
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
79
59
|
|
|
80
|
-
|
|
81
|
-
await initKnowledgeBase(templatePath, options);
|
|
82
|
-
break;
|
|
60
|
+
const fullPath = join(rootDir, scriptPath);
|
|
83
61
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
62
|
+
if (!fs.existsSync(fullPath)) {
|
|
63
|
+
console.error(`Script not found: ${scriptPath}`);
|
|
64
|
+
process.exit(1);
|
|
89
65
|
}
|
|
90
66
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
log.error(err.message);
|
|
95
|
-
process.exit(1);
|
|
67
|
+
const pythonProcess = spawn('python', [fullPath, ...scriptArgs], {
|
|
68
|
+
stdio: 'inherit',
|
|
69
|
+
cwd: rootDir // Execute from project root
|
|
96
70
|
});
|
|
97
71
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
log.error(err.message);
|
|
101
|
-
process.exit(1);
|
|
72
|
+
pythonProcess.on('exit', (code) => {
|
|
73
|
+
process.exit(code ?? 0);
|
|
102
74
|
});
|
|
103
75
|
|
|
104
|
-
|
|
76
|
+
pythonProcess.on('error', (err) => {
|
|
77
|
+
console.error('Failed to start python process:', err);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
});
|