claude-flow-novice 2.10.9 → 2.11.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.
Files changed (177) hide show
  1. package/.claude/commands/README.md +157 -0
  2. package/.claude/hooks/cfn-invoke-post-edit.sh +1 -1
  3. package/.claude/skills/cfn-backlog-management/SKILL.md +199 -0
  4. package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  5. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -21
  6. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +312 -0
  7. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +480 -115
  8. package/claude-assets/hooks/cfn-invoke-post-edit.sh +1 -1
  9. package/claude-assets/skills/cfn-backlog-management/SKILL.md +199 -0
  10. package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  11. package/dist/cli/config-manager.js +109 -91
  12. package/dist/cli/config-manager.js.map +1 -1
  13. package/package.json +3 -2
  14. package/scripts/init-project.js +38 -3
  15. package/claude-assets/commands/agents/README.md +0 -10
  16. package/claude-assets/commands/agents/agent-capabilities.md +0 -21
  17. package/claude-assets/commands/agents/agent-coordination.md +0 -28
  18. package/claude-assets/commands/agents/agent-spawning.md +0 -28
  19. package/claude-assets/commands/agents/agent-types.md +0 -26
  20. package/claude-assets/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  21. package/claude-assets/commands/analysis/README.md +0 -9
  22. package/claude-assets/commands/analysis/bottleneck-detect.md +0 -162
  23. package/claude-assets/commands/analysis/performance-bottlenecks.md +0 -59
  24. package/claude-assets/commands/analysis/performance-report.md +0 -25
  25. package/claude-assets/commands/analysis/token-efficiency.md +0 -45
  26. package/claude-assets/commands/analysis/token-usage.md +0 -25
  27. package/claude-assets/commands/automation/README.md +0 -9
  28. package/claude-assets/commands/automation/auto-agent.md +0 -122
  29. package/claude-assets/commands/automation/self-healing.md +0 -106
  30. package/claude-assets/commands/automation/session-memory.md +0 -90
  31. package/claude-assets/commands/automation/smart-agents.md +0 -73
  32. package/claude-assets/commands/automation/smart-spawn.md +0 -25
  33. package/claude-assets/commands/automation/workflow-select.md +0 -25
  34. package/claude-assets/commands/claude-md.js +0 -237
  35. package/claude-assets/commands/claude-soul.js +0 -28
  36. package/claude-assets/commands/cli-integration.js +0 -216
  37. package/claude-assets/commands/coordination/README.md +0 -9
  38. package/claude-assets/commands/coordination/agent-spawn.md +0 -25
  39. package/claude-assets/commands/coordination/coordination-system.md +0 -88
  40. package/claude-assets/commands/coordination/init.md +0 -44
  41. package/claude-assets/commands/coordination/orchestrate.md +0 -43
  42. package/claude-assets/commands/coordination/spawn.md +0 -45
  43. package/claude-assets/commands/coordination/swarm-init.md +0 -85
  44. package/claude-assets/commands/coordination/task-orchestrate.md +0 -25
  45. package/claude-assets/commands/github/README.md +0 -11
  46. package/claude-assets/commands/github/code-review-swarm.md +0 -514
  47. package/claude-assets/commands/github/code-review.md +0 -25
  48. package/claude-assets/commands/github/github-modes.md +0 -147
  49. package/claude-assets/commands/github/github-swarm.md +0 -121
  50. package/claude-assets/commands/github/issue-tracker.md +0 -292
  51. package/claude-assets/commands/github/issue-triage.md +0 -25
  52. package/claude-assets/commands/github/multi-repo-swarm.md +0 -519
  53. package/claude-assets/commands/github/pr-enhance.md +0 -26
  54. package/claude-assets/commands/github/pr-manager.md +0 -170
  55. package/claude-assets/commands/github/project-board-sync.md +0 -471
  56. package/claude-assets/commands/github/release-manager.md +0 -338
  57. package/claude-assets/commands/github/release-swarm.md +0 -544
  58. package/claude-assets/commands/github/repo-analyze.md +0 -25
  59. package/claude-assets/commands/github/repo-architect.md +0 -367
  60. package/claude-assets/commands/github/swarm-issue.md +0 -482
  61. package/claude-assets/commands/github/swarm-pr.md +0 -285
  62. package/claude-assets/commands/github/sync-coordinator.md +0 -301
  63. package/claude-assets/commands/github/workflow-automation.md +0 -442
  64. package/claude-assets/commands/github.js +0 -638
  65. package/claude-assets/commands/hive-mind/README.md +0 -17
  66. package/claude-assets/commands/hive-mind/hive-mind-consensus.md +0 -8
  67. package/claude-assets/commands/hive-mind/hive-mind-init.md +0 -18
  68. package/claude-assets/commands/hive-mind/hive-mind-memory.md +0 -8
  69. package/claude-assets/commands/hive-mind/hive-mind-metrics.md +0 -8
  70. package/claude-assets/commands/hive-mind/hive-mind-resume.md +0 -8
  71. package/claude-assets/commands/hive-mind/hive-mind-sessions.md +0 -8
  72. package/claude-assets/commands/hive-mind/hive-mind-spawn.md +0 -21
  73. package/claude-assets/commands/hive-mind/hive-mind-status.md +0 -8
  74. package/claude-assets/commands/hive-mind/hive-mind-stop.md +0 -8
  75. package/claude-assets/commands/hive-mind/hive-mind-wizard.md +0 -8
  76. package/claude-assets/commands/hive-mind/hive-mind.md +0 -27
  77. package/claude-assets/commands/hooks/README.md +0 -11
  78. package/claude-assets/commands/hooks/overview.md +0 -58
  79. package/claude-assets/commands/hooks/post-edit.md +0 -117
  80. package/claude-assets/commands/hooks/post-task.md +0 -112
  81. package/claude-assets/commands/hooks/pre-edit.md +0 -113
  82. package/claude-assets/commands/hooks/pre-task.md +0 -111
  83. package/claude-assets/commands/hooks/session-end.md +0 -118
  84. package/claude-assets/commands/hooks/session-start.md +0 -9
  85. package/claude-assets/commands/hooks/setup.md +0 -103
  86. package/claude-assets/commands/hooks.js +0 -651
  87. package/claude-assets/commands/index.js +0 -119
  88. package/claude-assets/commands/memory/README.md +0 -9
  89. package/claude-assets/commands/memory/memory-bank.md +0 -58
  90. package/claude-assets/commands/memory/memory-persist.md +0 -25
  91. package/claude-assets/commands/memory/memory-search.md +0 -25
  92. package/claude-assets/commands/memory/memory-usage.md +0 -25
  93. package/claude-assets/commands/memory/neural.md +0 -47
  94. package/claude-assets/commands/memory/usage.md +0 -46
  95. package/claude-assets/commands/monitoring/README.md +0 -9
  96. package/claude-assets/commands/monitoring/agent-metrics.md +0 -25
  97. package/claude-assets/commands/monitoring/agents.md +0 -44
  98. package/claude-assets/commands/monitoring/real-time-view.md +0 -25
  99. package/claude-assets/commands/monitoring/status.md +0 -46
  100. package/claude-assets/commands/monitoring/swarm-monitor.md +0 -25
  101. package/claude-assets/commands/neural.js +0 -572
  102. package/claude-assets/commands/optimization/README.md +0 -9
  103. package/claude-assets/commands/optimization/auto-topology.md +0 -62
  104. package/claude-assets/commands/optimization/cache-manage.md +0 -25
  105. package/claude-assets/commands/optimization/parallel-execute.md +0 -25
  106. package/claude-assets/commands/optimization/parallel-execution.md +0 -50
  107. package/claude-assets/commands/optimization/topology-optimize.md +0 -25
  108. package/claude-assets/commands/pair/README.md +0 -261
  109. package/claude-assets/commands/pair/commands.md +0 -546
  110. package/claude-assets/commands/pair/config.md +0 -510
  111. package/claude-assets/commands/pair/examples.md +0 -512
  112. package/claude-assets/commands/pair/modes.md +0 -348
  113. package/claude-assets/commands/pair/session.md +0 -407
  114. package/claude-assets/commands/pair/start.md +0 -209
  115. package/claude-assets/commands/parse-epic.js +0 -180
  116. package/claude-assets/commands/performance.js +0 -582
  117. package/claude-assets/commands/register-all-commands.js +0 -320
  118. package/claude-assets/commands/register-claude-md.js +0 -82
  119. package/claude-assets/commands/register-claude-soul.js +0 -80
  120. package/claude-assets/commands/sparc/analyzer.md +0 -52
  121. package/claude-assets/commands/sparc/architect.md +0 -53
  122. package/claude-assets/commands/sparc/batch-executor.md +0 -54
  123. package/claude-assets/commands/sparc/coder.md +0 -54
  124. package/claude-assets/commands/sparc/debugger.md +0 -54
  125. package/claude-assets/commands/sparc/designer.md +0 -53
  126. package/claude-assets/commands/sparc/documenter.md +0 -54
  127. package/claude-assets/commands/sparc/innovator.md +0 -54
  128. package/claude-assets/commands/sparc/memory-manager.md +0 -54
  129. package/claude-assets/commands/sparc/optimizer.md +0 -54
  130. package/claude-assets/commands/sparc/orchestrator.md +0 -132
  131. package/claude-assets/commands/sparc/researcher.md +0 -54
  132. package/claude-assets/commands/sparc/reviewer.md +0 -54
  133. package/claude-assets/commands/sparc/sparc-modes.md +0 -174
  134. package/claude-assets/commands/sparc/swarm-coordinator.md +0 -54
  135. package/claude-assets/commands/sparc/tdd.md +0 -54
  136. package/claude-assets/commands/sparc/tester.md +0 -54
  137. package/claude-assets/commands/sparc/workflow-manager.md +0 -54
  138. package/claude-assets/commands/sparc.js +0 -110
  139. package/claude-assets/commands/stream-chain/pipeline.md +0 -121
  140. package/claude-assets/commands/stream-chain/run.md +0 -70
  141. package/claude-assets/commands/swarm/README.md +0 -15
  142. package/claude-assets/commands/swarm/analysis.md +0 -95
  143. package/claude-assets/commands/swarm/development.md +0 -96
  144. package/claude-assets/commands/swarm/examples.md +0 -168
  145. package/claude-assets/commands/swarm/maintenance.md +0 -102
  146. package/claude-assets/commands/swarm/optimization.md +0 -117
  147. package/claude-assets/commands/swarm/research.md +0 -136
  148. package/claude-assets/commands/swarm/swarm-analysis.md +0 -8
  149. package/claude-assets/commands/swarm/swarm-background.md +0 -8
  150. package/claude-assets/commands/swarm/swarm-init.md +0 -19
  151. package/claude-assets/commands/swarm/swarm-modes.md +0 -8
  152. package/claude-assets/commands/swarm/swarm-monitor.md +0 -8
  153. package/claude-assets/commands/swarm/swarm-spawn.md +0 -19
  154. package/claude-assets/commands/swarm/swarm-status.md +0 -8
  155. package/claude-assets/commands/swarm/swarm-strategies.md +0 -8
  156. package/claude-assets/commands/swarm/swarm.md +0 -27
  157. package/claude-assets/commands/swarm/testing.md +0 -131
  158. package/claude-assets/commands/swarm.js +0 -423
  159. package/claude-assets/commands/testing/playwright-e2e.md +0 -288
  160. package/claude-assets/commands/training/README.md +0 -9
  161. package/claude-assets/commands/training/model-update.md +0 -25
  162. package/claude-assets/commands/training/neural-patterns.md +0 -74
  163. package/claude-assets/commands/training/neural-train.md +0 -25
  164. package/claude-assets/commands/training/pattern-learn.md +0 -25
  165. package/claude-assets/commands/training/specialization.md +0 -63
  166. package/claude-assets/commands/truth/start.md +0 -143
  167. package/claude-assets/commands/validate-commands.js +0 -223
  168. package/claude-assets/commands/verify/check.md +0 -50
  169. package/claude-assets/commands/verify/start.md +0 -128
  170. package/claude-assets/commands/workflow.js +0 -606
  171. package/claude-assets/commands/workflows/README.md +0 -9
  172. package/claude-assets/commands/workflows/development.md +0 -78
  173. package/claude-assets/commands/workflows/research.md +0 -63
  174. package/claude-assets/commands/workflows/workflow-create.md +0 -25
  175. package/claude-assets/commands/workflows/workflow-execute.md +0 -25
  176. package/claude-assets/commands/workflows/workflow-export.md +0 -25
  177. package/claude-assets/hooks/post-edit.config.json +0 -23
@@ -0,0 +1,199 @@
1
+ ---
2
+ skill_id: cfn-backlog-management
3
+ name: CFN Backlog Management
4
+ version: 1.0.0
5
+ category: coordination
6
+ tags: [backlog, documentation, sprint-planning, technical-debt]
7
+ dependencies: []
8
+ ---
9
+
10
+ # CFN Backlog Management Skill
11
+
12
+ ## Purpose
13
+ Systematically capture and track backlogged items during CFN sprints to prevent work from being forgotten. Provides centralized documentation of deferred tasks with context, rationale, and proposed solutions.
14
+
15
+ ## Problem Solved
16
+ During CFN Loop execution, agents frequently identify improvements, optimizations, or edge cases that should be addressed but are out of scope for the current sprint. Without systematic capture, these items are lost in chat history or forgotten entirely.
17
+
18
+ ## When to Use
19
+ - **During CFN sprints** when identifying work that should be deferred
20
+ - **After consensus** when validators identify future improvements
21
+ - **During retrospectives** when documenting technical debt
22
+ - **Architecture reviews** when noting long-term refactoring needs
23
+
24
+ ## Interface
25
+
26
+ ### Primary Script: `add-backlog-item.sh`
27
+
28
+ **Required Parameters:**
29
+ - `--item`: Brief description of backlogged work (1-2 sentences)
30
+ - `--why`: Rationale for deferring (why not now?)
31
+ - `--solution`: Proposed implementation approach
32
+
33
+ **Optional Parameters:**
34
+ - `--sprint`: Sprint identifier (default: auto-detected from context)
35
+ - `--priority`: P0-P3 (default: P2)
36
+ - `--tags`: Comma-separated tags (e.g., "optimization,redis,testing")
37
+ - `--category`: Feature/Bug/Technical-Debt/Optimization (default: Technical-Debt)
38
+
39
+ **Usage:**
40
+ ```bash
41
+ ./.claude/skills/cfn-backlog-management/add-backlog-item.sh \
42
+ --sprint "Sprint 10" \
43
+ --item "Implement Redis connection pooling for multi-agent coordination" \
44
+ --why "Current single-connection model causes bottlenecks with 10+ agents, but Sprint 10 scope limited to 3-agent validation" \
45
+ --solution "Use ioredis library with configurable pool size (min: 5, max: 20). Add pool metrics to monitoring dashboard" \
46
+ --priority "P2" \
47
+ --tags "optimization,redis,performance" \
48
+ --category "Optimization"
49
+ ```
50
+
51
+ ### Output Location
52
+ All backlog items are appended to: `readme/BACKLOG.md`
53
+
54
+ ## Backlog File Structure
55
+
56
+ ```markdown
57
+ # Claude Flow Novice - Backlog
58
+
59
+ Last Updated: 2025-10-31
60
+
61
+ ## Active Items
62
+
63
+ ### P0 - Critical
64
+ [Items requiring immediate attention in next sprint]
65
+
66
+ ### P1 - High Priority
67
+ [Items to address within 2-3 sprints]
68
+
69
+ ### P2 - Medium Priority
70
+ [Items to address when capacity allows]
71
+
72
+ ### P3 - Low Priority / Nice-to-Have
73
+ [Items for future consideration]
74
+
75
+ ## Completed Items
76
+ [Moved here when implemented, with resolution sprint noted]
77
+
78
+ ---
79
+
80
+ ## Item Template
81
+
82
+ **[PRIORITY] - [Item Title]**
83
+ - **Sprint Backlogged**: Sprint X
84
+ - **Category**: Feature/Bug/Technical-Debt/Optimization
85
+ - **Description**: What needs to be done
86
+ - **Rationale**: Why it was deferred
87
+ - **Proposed Solution**: How to implement
88
+ - **Tags**: `tag1`, `tag2`, `tag3`
89
+ - **Status**: Backlogged | In Progress | Completed
90
+ - **Date Added**: YYYY-MM-DD
91
+ ```
92
+
93
+ ## Validation Rules
94
+
95
+ The skill enforces:
96
+ 1. **All required fields present** (item, why, solution)
97
+ 2. **Item description clarity** (≥10 characters, ≤500 characters)
98
+ 3. **Rationale specificity** (must explain deferral reason, not just "out of scope")
99
+ 4. **Solution actionability** (must include concrete implementation approach)
100
+ 5. **No duplicates** (checks existing BACKLOG.md for similar items)
101
+
102
+ ## Integration with CFN Loops
103
+
104
+ ### Loop 2 Validators
105
+ When validators identify improvements outside current scope:
106
+ ```bash
107
+ # In validator agent
108
+ ./.claude/skills/cfn-backlog-management/add-backlog-item.sh \
109
+ --item "Add integration tests for Redis failure scenarios" \
110
+ --why "Current sprint validates happy path only; failure testing requires additional test infrastructure" \
111
+ --solution "Create test-redis-failures.sh with Docker-based Redis crash simulation" \
112
+ --tags "testing,redis,edge-cases"
113
+ ```
114
+
115
+ ### Product Owner Decision
116
+ When Product Owner defers work for future sprint:
117
+ ```bash
118
+ # In product-owner agent
119
+ ./.claude/skills/cfn-backlog-management/add-backlog-item.sh \
120
+ --item "Migrate coordination from Redis to etcd for production scale" \
121
+ --why "Redis sufficient for current 10-agent limit; etcd needed for 100+ agent deployments" \
122
+ --solution "Abstract coordination layer behind interface, implement etcd adapter" \
123
+ --priority "P3" \
124
+ --category "Technical-Debt"
125
+ ```
126
+
127
+ ### Coordinator Context
128
+ Coordinators can query backlog for related items before spawning agents:
129
+ ```bash
130
+ # Check if backlog contains relevant context
131
+ grep -i "redis pooling" readme/BACKLOG.md
132
+ # Use results to inform agent context injection
133
+ ```
134
+
135
+ ## Query Interface
136
+
137
+ **Search by tag:**
138
+ ```bash
139
+ grep -A 10 "Tags:.*redis" readme/BACKLOG.md
140
+ ```
141
+
142
+ **Filter by priority:**
143
+ ```bash
144
+ sed -n '/^### P1/,/^### P2/p' readme/BACKLOG.md
145
+ ```
146
+
147
+ **List all optimization items:**
148
+ ```bash
149
+ grep -B 2 "Category: Optimization" readme/BACKLOG.md
150
+ ```
151
+
152
+ ## Maintenance
153
+
154
+ **Weekly Review**: Product Owner reviews P0-P1 items for sprint planning
155
+ **Monthly Cleanup**: Archive completed items, reassess P3 priorities
156
+ **Quarterly Audit**: Remove stale items (>6 months old, no activity)
157
+
158
+ ## Best Practices
159
+
160
+ 1. **Be specific**: "Add caching" → "Implement Redis LRU cache for agent context with 1h TTL"
161
+ 2. **Explain constraints**: "Not enough time" → "Requires 8h estimation work; current sprint has 2h budget"
162
+ 3. **Provide actionable solutions**: "Fix later" → "Refactor using Strategy pattern from planning/PATTERNS.md"
163
+ 4. **Tag appropriately**: Enables filtering and sprint planning
164
+ 5. **Update status**: Move to "Completed" when resolved, note resolution sprint
165
+
166
+ ## Anti-Patterns
167
+
168
+ ❌ **Vague items**: "Improve performance" (What component? How much improvement?)
169
+ ❌ **No rationale**: "Backlog this" (Why defer? What's the blocker?)
170
+ ❌ **Solution-less**: "Fix Redis issues" (What's the approach? What research is needed?)
171
+ ❌ **Duplicate entries**: Check BACKLOG.md before adding
172
+ ❌ **Scope creep**: Backlog is for deferred work, not scope expansion
173
+
174
+ ## Example Backlog Item
175
+
176
+ ```markdown
177
+ **[P1] - Implement Adaptive Validator Scaling**
178
+ - **Sprint Backlogged**: Sprint 9 - CFN v3 Implementation
179
+ - **Category**: Optimization
180
+ - **Description**: Dynamically adjust number of Loop 2 validators (2-5) based on task complexity. Currently fixed at 3-4 validators regardless of task size.
181
+ - **Rationale**: Sprint 9 focused on dual-mode architecture validation. Adaptive scaling requires task complexity classifier (NLP or heuristic-based), estimated 12h implementation vs 4h sprint budget.
182
+ - **Proposed Solution**: Create task-classifier skill that analyzes task description (file count, domain keywords, integration points) and returns complexity score (0.0-1.0). Map score to validator count: <0.3 → 2 validators, 0.3-0.7 → 3-4 validators, >0.7 → 5 validators. Reference: CFN_LOOP_TASK_MODE.md section on adaptive validator scaling.
183
+ - **Tags**: `optimization`, `cfn-loop`, `validation`, `adaptive-scaling`
184
+ - **Status**: Backlogged
185
+ - **Date Added**: 2025-10-31
186
+ ```
187
+
188
+ ## Success Metrics
189
+
190
+ - **Backlog utilization**: ≥30% of backlog items addressed within 3 sprints
191
+ - **Item clarity**: 0 items missing required fields
192
+ - **Discovery rate**: ≥50% of technical debt captured vs lost in chat
193
+ - **Sprint planning efficiency**: Backlog queries reduce planning time by 20%
194
+
195
+ ## References
196
+
197
+ - **STRAT-025**: Explicit Deliverable Tracking (adaptive context)
198
+ - **CFN Loop Documentation**: `.claude/commands/cfn/CFN_LOOP_TASK_MODE.md`
199
+ - **Sprint Execution**: CLAUDE.md Section 6 - Sprint Context Injection
@@ -0,0 +1,210 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # cfn-backlog-management/add-backlog-item.sh
5
+ # Adds structured backlog items to readme/BACKLOG.md
6
+
7
+ # Default values
8
+ PRIORITY="P2"
9
+ CATEGORY="Technical-Debt"
10
+ SPRINT="Unknown"
11
+ TAGS=""
12
+ ITEM=""
13
+ WHY=""
14
+ SOLUTION=""
15
+
16
+ # Parse arguments
17
+ while [[ $# -gt 0 ]]; do
18
+ case $1 in
19
+ --item)
20
+ ITEM="$2"
21
+ shift 2
22
+ ;;
23
+ --why)
24
+ WHY="$2"
25
+ shift 2
26
+ ;;
27
+ --solution)
28
+ SOLUTION="$2"
29
+ shift 2
30
+ ;;
31
+ --sprint)
32
+ SPRINT="$2"
33
+ shift 2
34
+ ;;
35
+ --priority)
36
+ PRIORITY="$2"
37
+ shift 2
38
+ ;;
39
+ --tags)
40
+ TAGS="$2"
41
+ shift 2
42
+ ;;
43
+ --category)
44
+ CATEGORY="$2"
45
+ shift 2
46
+ ;;
47
+ *)
48
+ echo "Unknown argument: $1" >&2
49
+ exit 1
50
+ ;;
51
+ esac
52
+ done
53
+
54
+ # Validation
55
+ if [[ -z "$ITEM" ]]; then
56
+ echo "Error: --item is required" >&2
57
+ exit 1
58
+ fi
59
+
60
+ if [[ -z "$WHY" ]]; then
61
+ echo "Error: --why is required" >&2
62
+ exit 1
63
+ fi
64
+
65
+ if [[ -z "$SOLUTION" ]]; then
66
+ echo "Error: --solution is required" >&2
67
+ exit 1
68
+ fi
69
+
70
+ # Validate item length
71
+ ITEM_LENGTH=${#ITEM}
72
+ if (( ITEM_LENGTH < 10 )); then
73
+ echo "Error: --item must be at least 10 characters (got $ITEM_LENGTH)" >&2
74
+ exit 1
75
+ fi
76
+
77
+ if (( ITEM_LENGTH > 500 )); then
78
+ echo "Error: --item must be at most 500 characters (got $ITEM_LENGTH)" >&2
79
+ exit 1
80
+ fi
81
+
82
+ # Validate priority
83
+ if [[ ! "$PRIORITY" =~ ^P[0-3]$ ]]; then
84
+ echo "Error: --priority must be P0, P1, P2, or P3 (got: $PRIORITY)" >&2
85
+ exit 1
86
+ fi
87
+
88
+ # Validate category
89
+ VALID_CATEGORIES="Feature|Bug|Technical-Debt|Optimization"
90
+ if [[ ! "$CATEGORY" =~ ^($VALID_CATEGORIES)$ ]]; then
91
+ echo "Error: --category must be one of: Feature, Bug, Technical-Debt, Optimization (got: $CATEGORY)" >&2
92
+ exit 1
93
+ fi
94
+
95
+ # Path to backlog file
96
+ BACKLOG_FILE="readme/BACKLOG.md"
97
+ PROJECT_ROOT="/mnt/c/Users/masha/Documents/claude-flow-novice"
98
+ BACKLOG_PATH="$PROJECT_ROOT/$BACKLOG_FILE"
99
+
100
+ # Create backlog file if it doesn't exist
101
+ if [[ ! -f "$BACKLOG_PATH" ]]; then
102
+ echo "Creating $BACKLOG_FILE..."
103
+ mkdir -p "$(dirname "$BACKLOG_PATH")"
104
+ cat > "$BACKLOG_PATH" <<'EOF'
105
+ # Claude Flow Novice - Backlog
106
+
107
+ Last Updated: $(date +%Y-%m-%d)
108
+
109
+ ## Active Items
110
+
111
+ ### P0 - Critical
112
+
113
+ ### P1 - High Priority
114
+
115
+ ### P2 - Medium Priority
116
+
117
+ ### P3 - Low Priority / Nice-to-Have
118
+
119
+ ## Completed Items
120
+
121
+ ---
122
+
123
+ ## Item Template
124
+
125
+ **[PRIORITY] - [Item Title]**
126
+ - **Sprint Backlogged**: Sprint X
127
+ - **Category**: Feature/Bug/Technical-Debt/Optimization
128
+ - **Description**: What needs to be done
129
+ - **Rationale**: Why it was deferred
130
+ - **Proposed Solution**: How to implement
131
+ - **Tags**: `tag1`, `tag2`, `tag3`
132
+ - **Status**: Backlogged
133
+ - **Date Added**: YYYY-MM-DD
134
+ EOF
135
+ fi
136
+
137
+ # Check for duplicates (simple substring match)
138
+ if grep -qi "$ITEM" "$BACKLOG_PATH" 2>/dev/null; then
139
+ echo "Warning: Similar item may already exist in backlog" >&2
140
+ echo "Existing matches:" >&2
141
+ grep -i "$ITEM" "$BACKLOG_PATH" | head -3 >&2
142
+ read -p "Continue anyway? (y/n) " -n 1 -r
143
+ echo
144
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
145
+ echo "Aborted" >&2
146
+ exit 1
147
+ fi
148
+ fi
149
+
150
+ # Format tags
151
+ FORMATTED_TAGS=""
152
+ if [[ -n "$TAGS" ]]; then
153
+ IFS=',' read -ra TAG_ARRAY <<< "$TAGS"
154
+ for tag in "${TAG_ARRAY[@]}"; do
155
+ FORMATTED_TAGS="${FORMATTED_TAGS}\`${tag}\`, "
156
+ done
157
+ FORMATTED_TAGS="${FORMATTED_TAGS%, }" # Remove trailing comma
158
+ fi
159
+
160
+ # Generate item title (first 60 chars of description)
161
+ ITEM_TITLE="${ITEM:0:60}"
162
+ if (( ${#ITEM} > 60 )); then
163
+ ITEM_TITLE="${ITEM_TITLE}..."
164
+ fi
165
+
166
+ # Current date
167
+ CURRENT_DATE=$(date +%Y-%m-%d)
168
+
169
+ # Create backlog entry
170
+ BACKLOG_ENTRY=$(cat <<EOF
171
+
172
+ **[$PRIORITY] - $ITEM_TITLE**
173
+ - **Sprint Backlogged**: $SPRINT
174
+ - **Category**: $CATEGORY
175
+ - **Description**: $ITEM
176
+ - **Rationale**: $WHY
177
+ - **Proposed Solution**: $SOLUTION
178
+ - **Tags**: $FORMATTED_TAGS
179
+ - **Status**: Backlogged
180
+ - **Date Added**: $CURRENT_DATE
181
+
182
+ EOF
183
+ )
184
+
185
+ # Insert into appropriate priority section
186
+ SECTION_MARKER="### $PRIORITY"
187
+
188
+ # Use awk to insert after section marker
189
+ awk -v section="$SECTION_MARKER" -v entry="$BACKLOG_ENTRY" '
190
+ $0 ~ section {
191
+ print
192
+ print entry
193
+ next
194
+ }
195
+ {print}
196
+ ' "$BACKLOG_PATH" > "${BACKLOG_PATH}.tmp"
197
+
198
+ mv "${BACKLOG_PATH}.tmp" "$BACKLOG_PATH"
199
+
200
+ # Update "Last Updated" timestamp
201
+ sed -i "s/Last Updated: .*/Last Updated: $CURRENT_DATE/" "$BACKLOG_PATH"
202
+
203
+ echo "✅ Backlog item added successfully"
204
+ echo " Priority: $PRIORITY"
205
+ echo " Category: $CATEGORY"
206
+ echo " Sprint: $SPRINT"
207
+ echo " Location: $BACKLOG_FILE"
208
+
209
+ # Output path for scripting
210
+ echo "$BACKLOG_PATH"
@@ -1,100 +1,118 @@
1
- import * as fs from "fs/promises";
2
- import * as path from "path";
3
- import Ajv from "ajv";
4
- import * as lodash from "lodash";
5
- let ConfigManager = class ConfigManager {
6
- static _instance = null;
7
- configPath;
8
- schemaPath;
9
- ajv;
10
- constructor(){
11
- this.configPath = path.join(process.env.HOME || "", ".claude-flow-config.json");
12
- this.schemaPath = path.join(__dirname, "../../.claude/skills/config-management/config.json");
13
- this.ajv = new Ajv();
14
- }
15
- static getInstance() {
16
- if (!ConfigManager._instance) {
17
- ConfigManager._instance = new ConfigManager();
18
- }
19
- return ConfigManager._instance;
20
- }
21
- async readConfig() {
22
- try {
23
- const configContent = await fs.readFile(this.configPath, "utf-8");
24
- return JSON.parse(configContent);
25
- } catch (error) {
26
- // If config doesn't exist, create from schema
27
- return this.resetToDefaults();
28
- }
29
- }
30
- async writeConfig(config) {
31
- const schemaContent = await fs.readFile(this.schemaPath, "utf-8");
32
- const schema = JSON.parse(schemaContent);
33
- const validate = this.ajv.compile(schema);
34
- if (!validate(config)) {
35
- throw new Error("Invalid configuration: " + this.ajv.errorsText(validate.errors));
36
- }
37
- await fs.writeFile(this.configPath, JSON.stringify(config, null, 2), "utf-8");
1
+ "use strict";
2
+ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
3
+ function adopt(value) {
4
+ return value instanceof P ? value : new P(function(resolve) {
5
+ resolve(value);
6
+ });
38
7
  }
39
- async getValue(keyPath) {
40
- const config = await this.readConfig();
41
- const value = lodash.get(config, keyPath);
42
- if (value === undefined) {
43
- // Check if it's a custom key path not in the schema
44
- const customConfig = await this.readCustomConfig();
45
- return lodash.get(customConfig, keyPath);
8
+ return new (P || (P = Promise))(function(resolve, reject) {
9
+ function fulfilled(value) {
10
+ try {
11
+ step(generator.next(value));
12
+ } catch (e) {
13
+ reject(e);
14
+ }
46
15
  }
47
- return value;
48
- }
49
- async readCustomConfig() {
50
- try {
51
- const customConfigPath = path.join(process.env.HOME || "", ".claude-flow-custom-config.json");
52
- const customConfigContent = await fs.readFile(customConfigPath, "utf-8");
53
- return JSON.parse(customConfigContent);
54
- } catch (error) {
55
- // If custom config doesn't exist or can't be read, return empty object
56
- return {};
16
+ function rejected(value) {
17
+ try {
18
+ step(generator["throw"](value));
19
+ } catch (e) {
20
+ reject(e);
21
+ }
57
22
  }
58
- }
59
- async set(key, value) {
60
- const config = await this.readConfig();
61
- // Type assertion to handle full object
62
- if (typeof value === "object" && value !== null) {
63
- config[key] = value;
64
- } else {
65
- throw new Error("Invalid configuration value");
23
+ function step(result) {
24
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
66
25
  }
67
- await this.writeConfig(config);
68
- }
69
- async getAll() {
70
- return this.readConfig();
71
- }
72
- async resetToDefaults() {
73
- const schemaContent = await fs.readFile(this.schemaPath, "utf-8");
74
- const schema = JSON.parse(schemaContent);
75
- // Extract default values from the schema
76
- const defaultConfig = {
77
- redis: {
78
- host: schema.properties.redis.properties.host.default,
79
- port: schema.properties.redis.properties.port.default
80
- },
81
- agent: {
82
- default_strategy: schema.properties.agent.properties.default_strategy.default,
83
- max_concurrent_agents: schema.properties.agent.properties.max_concurrent_agents.default,
84
- log_level: schema.properties.agent.properties.log_level.default
85
- },
86
- security: {
87
- enabled: schema.properties.security.properties.enabled.default,
88
- max_retry_attempts: schema.properties.security.properties.max_retry_attempts.default
89
- }
26
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
27
+ });
28
+ };
29
+ var __generator = this && this.__generator || function(thisArg, body) {
30
+ var _ = {
31
+ label: 0,
32
+ sent: function() {
33
+ if (t[0] & 1) throw t[1];
34
+ return t[1];
35
+ },
36
+ trys: [],
37
+ ops: []
38
+ }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
39
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
40
+ return this;
41
+ }), g;
42
+ function verb(n) {
43
+ return function(v) {
44
+ return step([
45
+ n,
46
+ v
47
+ ]);
90
48
  };
91
- await this.writeConfig(defaultConfig);
92
- return defaultConfig;
93
49
  }
94
- };
95
- export default ConfigManager;
96
-
97
- //# sourceMappingURL=config-manager.js.mapop[1] : void 0,
50
+ function step(op) {
51
+ if (f) throw new TypeError("Generator is already executing.");
52
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
53
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
54
+ if (y = 0, t) op = [
55
+ op[0] & 2,
56
+ t.value
57
+ ];
58
+ switch(op[0]){
59
+ case 0:
60
+ case 1:
61
+ t = op;
62
+ break;
63
+ case 4:
64
+ _.label++;
65
+ return {
66
+ value: op[1],
67
+ done: false
68
+ };
69
+ case 5:
70
+ _.label++;
71
+ y = op[1];
72
+ op = [
73
+ 0
74
+ ];
75
+ continue;
76
+ case 7:
77
+ op = _.ops.pop();
78
+ _.trys.pop();
79
+ continue;
80
+ default:
81
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
82
+ _ = 0;
83
+ continue;
84
+ }
85
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
86
+ _.label = op[1];
87
+ break;
88
+ }
89
+ if (op[0] === 6 && _.label < t[1]) {
90
+ _.label = t[1];
91
+ t = op;
92
+ break;
93
+ }
94
+ if (t && _.label < t[2]) {
95
+ _.label = t[2];
96
+ _.ops.push(op);
97
+ break;
98
+ }
99
+ if (t[2]) _.ops.pop();
100
+ _.trys.pop();
101
+ continue;
102
+ }
103
+ op = body.call(thisArg, _);
104
+ } catch (e) {
105
+ op = [
106
+ 6,
107
+ e
108
+ ];
109
+ y = 0;
110
+ } finally{
111
+ f = t = 0;
112
+ }
113
+ if (op[0] & 5) throw op[1];
114
+ return {
115
+ value: op[0] ? op[1] : void 0,
98
116
  done: true
99
117
  };
100
118
  }