@techwavedev/agi-agent-kit 1.1.7 → 1.2.1

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.

Potentially problematic release.


This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.

Files changed (111) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +190 -12
  3. package/bin/init.js +30 -2
  4. package/package.json +6 -3
  5. package/templates/base/AGENTS.md +54 -23
  6. package/templates/base/README.md +325 -0
  7. package/templates/base/directives/memory_integration.md +95 -0
  8. package/templates/base/execution/memory_manager.py +309 -0
  9. package/templates/base/execution/session_boot.py +218 -0
  10. package/templates/base/execution/session_init.py +320 -0
  11. package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
  12. package/templates/base/skill-creator/scripts/init_skill.py +18 -135
  13. package/templates/skills/ec/README.md +31 -0
  14. package/templates/skills/ec/aws/SKILL.md +1020 -0
  15. package/templates/skills/ec/aws/defaults.yaml +13 -0
  16. package/templates/skills/ec/aws/references/common_patterns.md +80 -0
  17. package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
  18. package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
  19. package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
  20. package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
  21. package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
  22. package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
  23. package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
  24. package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
  25. package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
  26. package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
  27. package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
  28. package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
  29. package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
  30. package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
  31. package/templates/skills/ec/consul/SKILL.md +427 -0
  32. package/templates/skills/ec/consul/references/acl_setup.md +168 -0
  33. package/templates/skills/ec/consul/references/ha_config.md +196 -0
  34. package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
  35. package/templates/skills/ec/consul/references/upgrades.md +213 -0
  36. package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
  37. package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
  38. package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
  39. package/templates/skills/ec/documentation/SKILL.md +351 -0
  40. package/templates/skills/ec/documentation/references/best_practices.md +201 -0
  41. package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
  42. package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
  43. package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
  44. package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
  45. package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
  46. package/templates/skills/ec/gitlab/SKILL.md +529 -0
  47. package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
  48. package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
  49. package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
  50. package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
  51. package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
  52. package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
  53. package/templates/skills/ec/jira/SKILL.md +484 -0
  54. package/templates/skills/ec/jira/references/jql_reference.md +148 -0
  55. package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
  56. package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
  57. package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
  58. package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
  59. package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
  60. package/templates/skills/ec/jira/scripts/log_work.py +154 -0
  61. package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
  62. package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
  63. package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
  64. package/templates/skills/ec/karpenter/SKILL.md +301 -0
  65. package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
  66. package/templates/skills/ec/karpenter/references/migration.md +396 -0
  67. package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
  68. package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
  69. package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
  70. package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
  71. package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
  72. package/templates/skills/ec/opensearch/SKILL.md +720 -0
  73. package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
  74. package/templates/skills/ec/opensearch/references/operator.md +532 -0
  75. package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
  76. package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
  77. package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
  78. package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
  79. package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
  80. package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
  81. package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
  82. package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
  83. package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
  84. package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
  85. package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
  86. package/templates/skills/knowledge/design-md/README.md +0 -34
  87. package/templates/skills/knowledge/design-md/SKILL.md +0 -193
  88. package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
  89. package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
  90. package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
  91. package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
  92. package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
  93. package/templates/skills/knowledge/react-components/README.md +0 -36
  94. package/templates/skills/knowledge/react-components/SKILL.md +0 -53
  95. package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
  96. package/templates/skills/knowledge/react-components/package-lock.json +0 -231
  97. package/templates/skills/knowledge/react-components/package.json +0 -16
  98. package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
  99. package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
  100. package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
  101. package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
  102. package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
  103. package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
  104. package/templates/skills/knowledge/self-update/SKILL.md +0 -60
  105. package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
  106. package/templates/skills/knowledge/stitch-loop/README.md +0 -54
  107. package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
  108. package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
  109. package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
  110. package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
  111. package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
@@ -0,0 +1,307 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Code Analysis for Documentation
4
+
5
+ Analyzes Python files to extract documentation-relevant information
6
+ including docstrings, function signatures, and usage examples.
7
+
8
+ Usage:
9
+ python analyze_code.py --file <path> [options]
10
+
11
+ Arguments:
12
+ --file File to analyze (required)
13
+ --output Output format: summary, full, json (default: summary)
14
+
15
+ Exit Codes:
16
+ 0 - Success
17
+ 1 - Invalid arguments
18
+ 2 - File not found
19
+ 3 - Parse error
20
+ """
21
+
22
+ import argparse
23
+ import ast
24
+ import json
25
+ import sys
26
+ from pathlib import Path
27
+ from typing import Dict, List, Optional, Any
28
+
29
+
30
+ class CodeAnalyzer(ast.NodeVisitor):
31
+ """AST visitor to extract documentation-relevant information."""
32
+
33
+ def __init__(self):
34
+ self.module_docstring = None
35
+ self.classes = []
36
+ self.functions = []
37
+ self.imports = []
38
+ self.constants = []
39
+
40
+ def visit_Module(self, node):
41
+ """Extract module-level docstring."""
42
+ self.module_docstring = ast.get_docstring(node)
43
+ self.generic_visit(node)
44
+
45
+ def visit_Import(self, node):
46
+ """Track imports."""
47
+ for alias in node.names:
48
+ self.imports.append(alias.name)
49
+
50
+ def visit_ImportFrom(self, node):
51
+ """Track from imports."""
52
+ module = node.module or ''
53
+ for alias in node.names:
54
+ self.imports.append(f"{module}.{alias.name}")
55
+
56
+ def visit_ClassDef(self, node):
57
+ """Extract class information."""
58
+ class_info = {
59
+ 'name': node.name,
60
+ 'docstring': ast.get_docstring(node) or '',
61
+ 'methods': [],
62
+ 'bases': [self._get_name(base) for base in node.bases],
63
+ 'lineno': node.lineno
64
+ }
65
+
66
+ for item in node.body:
67
+ if isinstance(item, ast.FunctionDef):
68
+ method_info = self._extract_function(item)
69
+ class_info['methods'].append(method_info)
70
+
71
+ self.classes.append(class_info)
72
+
73
+ def visit_FunctionDef(self, node):
74
+ """Extract function information (module-level only)."""
75
+ # Skip methods (handled in visit_ClassDef)
76
+ if isinstance(node, ast.FunctionDef):
77
+ # Check if this is a top-level function
78
+ func_info = self._extract_function(node)
79
+ self.functions.append(func_info)
80
+
81
+ def visit_Assign(self, node):
82
+ """Extract module-level constants."""
83
+ for target in node.targets:
84
+ if isinstance(target, ast.Name):
85
+ if target.id.isupper(): # Convention: constants are UPPERCASE
86
+ self.constants.append({
87
+ 'name': target.id,
88
+ 'lineno': node.lineno
89
+ })
90
+
91
+ def _extract_function(self, node: ast.FunctionDef) -> Dict:
92
+ """Extract function/method information."""
93
+ args = []
94
+ for arg in node.args.args:
95
+ arg_info = {'name': arg.arg}
96
+ if arg.annotation:
97
+ arg_info['type'] = self._get_annotation(arg.annotation)
98
+ args.append(arg_info)
99
+
100
+ # Get return type
101
+ return_type = None
102
+ if node.returns:
103
+ return_type = self._get_annotation(node.returns)
104
+
105
+ # Get decorators
106
+ decorators = []
107
+ for decorator in node.decorator_list:
108
+ decorators.append(self._get_name(decorator))
109
+
110
+ return {
111
+ 'name': node.name,
112
+ 'docstring': ast.get_docstring(node) or '',
113
+ 'args': args,
114
+ 'return_type': return_type,
115
+ 'decorators': decorators,
116
+ 'lineno': node.lineno,
117
+ 'is_async': isinstance(node, ast.AsyncFunctionDef)
118
+ }
119
+
120
+ def _get_name(self, node) -> str:
121
+ """Get the name from an AST node."""
122
+ if isinstance(node, ast.Name):
123
+ return node.id
124
+ elif isinstance(node, ast.Attribute):
125
+ return f"{self._get_name(node.value)}.{node.attr}"
126
+ elif isinstance(node, ast.Call):
127
+ return self._get_name(node.func)
128
+ return str(node)
129
+
130
+ def _get_annotation(self, node) -> str:
131
+ """Get type annotation as string."""
132
+ if isinstance(node, ast.Name):
133
+ return node.id
134
+ elif isinstance(node, ast.Constant):
135
+ return str(node.value)
136
+ elif isinstance(node, ast.Subscript):
137
+ return f"{self._get_name(node.value)}[{self._get_annotation(node.slice)}]"
138
+ elif isinstance(node, ast.Tuple):
139
+ return ', '.join(self._get_annotation(el) for el in node.elts)
140
+ return ast.unparse(node) if hasattr(ast, 'unparse') else '...'
141
+
142
+
143
+ def analyze_file(file_path: Path) -> Dict[str, Any]:
144
+ """
145
+ Analyze a Python file and extract documentation info.
146
+
147
+ Returns:
148
+ Dict with module info, classes, functions, etc.
149
+ """
150
+ try:
151
+ content = file_path.read_text()
152
+ tree = ast.parse(content)
153
+ except SyntaxError as e:
154
+ return {'error': f'Syntax error: {e}', 'file': str(file_path)}
155
+ except Exception as e:
156
+ return {'error': str(e), 'file': str(file_path)}
157
+
158
+ analyzer = CodeAnalyzer()
159
+ analyzer.visit(tree)
160
+
161
+ return {
162
+ 'file': str(file_path),
163
+ 'module_docstring': analyzer.module_docstring,
164
+ 'classes': analyzer.classes,
165
+ 'functions': analyzer.functions,
166
+ 'imports': list(set(analyzer.imports)),
167
+ 'constants': analyzer.constants,
168
+ 'line_count': len(content.split('\n'))
169
+ }
170
+
171
+
172
+ def format_summary(analysis: Dict) -> str:
173
+ """Format analysis as a brief summary."""
174
+ if 'error' in analysis:
175
+ return f"❌ Error analyzing {analysis['file']}: {analysis['error']}"
176
+
177
+ lines = [
178
+ f"📄 **{Path(analysis['file']).name}**",
179
+ ""
180
+ ]
181
+
182
+ if analysis['module_docstring']:
183
+ # First line of docstring
184
+ first_line = analysis['module_docstring'].split('\n')[0].strip()
185
+ lines.append(f"> {first_line}")
186
+ lines.append("")
187
+
188
+ lines.append(f"- **Lines:** {analysis['line_count']}")
189
+ lines.append(f"- **Classes:** {len(analysis['classes'])}")
190
+ lines.append(f"- **Functions:** {len(analysis['functions'])}")
191
+ lines.append(f"- **Constants:** {len(analysis['constants'])}")
192
+
193
+ if analysis['classes']:
194
+ lines.append("")
195
+ lines.append("**Classes:**")
196
+ for cls in analysis['classes']:
197
+ method_count = len(cls['methods'])
198
+ lines.append(f"- `{cls['name']}` ({method_count} methods)")
199
+
200
+ if analysis['functions']:
201
+ lines.append("")
202
+ lines.append("**Functions:**")
203
+ for func in analysis['functions']:
204
+ if not func['name'].startswith('_'):
205
+ args_str = ', '.join(a['name'] for a in func['args'])
206
+ lines.append(f"- `{func['name']}({args_str})`")
207
+
208
+ return '\n'.join(lines)
209
+
210
+
211
+ def format_full(analysis: Dict) -> str:
212
+ """Format analysis with full details."""
213
+ if 'error' in analysis:
214
+ return f"❌ Error: {analysis['error']}"
215
+
216
+ lines = [
217
+ f"# {Path(analysis['file']).name}",
218
+ ""
219
+ ]
220
+
221
+ if analysis['module_docstring']:
222
+ lines.append("## Module Documentation")
223
+ lines.append("")
224
+ lines.append("```")
225
+ lines.append(analysis['module_docstring'])
226
+ lines.append("```")
227
+ lines.append("")
228
+
229
+ if analysis['classes']:
230
+ lines.append("## Classes")
231
+ lines.append("")
232
+
233
+ for cls in analysis['classes']:
234
+ bases = f"({', '.join(cls['bases'])})" if cls['bases'] else ""
235
+ lines.append(f"### `class {cls['name']}{bases}`")
236
+ lines.append("")
237
+
238
+ if cls['docstring']:
239
+ lines.append(cls['docstring'].split('\n')[0])
240
+ lines.append("")
241
+
242
+ if cls['methods']:
243
+ lines.append("**Methods:**")
244
+ for method in cls['methods']:
245
+ args = ', '.join(a['name'] for a in method['args'] if a['name'] != 'self')
246
+ ret = f" -> {method['return_type']}" if method['return_type'] else ""
247
+ lines.append(f"- `{method['name']}({args}){ret}`")
248
+ lines.append("")
249
+
250
+ if analysis['functions']:
251
+ lines.append("## Functions")
252
+ lines.append("")
253
+
254
+ for func in analysis['functions']:
255
+ args = ', '.join(a['name'] for a in func['args'])
256
+ ret = f" -> {func['return_type']}" if func['return_type'] else ""
257
+ lines.append(f"### `{func['name']}({args}){ret}`")
258
+ lines.append("")
259
+
260
+ if func['docstring']:
261
+ lines.append(func['docstring'])
262
+ lines.append("")
263
+
264
+ return '\n'.join(lines)
265
+
266
+
267
+ def main():
268
+ parser = argparse.ArgumentParser(
269
+ description='Analyze Python code for documentation',
270
+ formatter_class=argparse.RawDescriptionHelpFormatter,
271
+ epilog=__doc__
272
+ )
273
+ parser.add_argument('--file', required=True, help='File to analyze')
274
+ parser.add_argument('--output', choices=['summary', 'full', 'json'],
275
+ default='summary', help='Output format')
276
+ args = parser.parse_args()
277
+
278
+ file_path = Path(args.file).resolve()
279
+
280
+ if not file_path.exists():
281
+ print(f"❌ Error: File not found: {file_path}", file=sys.stderr)
282
+ sys.exit(2)
283
+
284
+ if not file_path.suffix == '.py':
285
+ print(f"❌ Error: Not a Python file: {file_path}", file=sys.stderr)
286
+ sys.exit(1)
287
+
288
+ # Analyze
289
+ analysis = analyze_file(file_path)
290
+
291
+ if 'error' in analysis:
292
+ print(f"❌ {analysis['error']}", file=sys.stderr)
293
+ sys.exit(3)
294
+
295
+ # Format output
296
+ if args.output == 'json':
297
+ print(json.dumps(analysis, indent=2))
298
+ elif args.output == 'full':
299
+ print(format_full(analysis))
300
+ else:
301
+ print(format_summary(analysis))
302
+
303
+ sys.exit(0)
304
+
305
+
306
+ if __name__ == '__main__':
307
+ main()