@amrhas82/agentic-kit 1.0.0 → 1.1.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.
@@ -0,0 +1,159 @@
1
+ /**
2
+ * session-start.js
3
+ *
4
+ * This hook runs at the start of every Claude Code session.
5
+ * It ensures all skills defined in the active variant are loaded and available.
6
+ *
7
+ * Purpose:
8
+ * - Load variant-specific skills automatically
9
+ * - Register agents for auto-invocation
10
+ * - Initialize any session-specific resources
11
+ * - Provide session startup feedback
12
+ */
13
+
14
+ const fs = require('fs');
15
+ const path = require('path');
16
+
17
+ /**
18
+ * Load and activate skills for the current variant
19
+ */
20
+ function loadSkills(skillsDir, skillsList) {
21
+ const loadedSkills = [];
22
+
23
+ if (!skillsList || skillsList.length === 0) {
24
+ console.log('ℹ️ No skills to load for this variant');
25
+ return loadedSkills;
26
+ }
27
+
28
+ skillsList.forEach(skill => {
29
+ try {
30
+ const skillPath = path.join(skillsDir, skill.path);
31
+
32
+ if (fs.existsSync(skillPath)) {
33
+ loadedSkills.push({
34
+ id: skill.id,
35
+ name: skill.name,
36
+ path: skill.path,
37
+ status: 'loaded'
38
+ });
39
+ console.log(`✅ Loaded skill: ${skill.name}`);
40
+ } else {
41
+ console.warn(`⚠️ Skill not found: ${skill.name} at ${skillPath}`);
42
+ }
43
+ } catch (error) {
44
+ console.error(`❌ Failed to load skill ${skill.name}:`, error.message);
45
+ }
46
+ });
47
+
48
+ return loadedSkills;
49
+ }
50
+
51
+ /**
52
+ * Initialize agents for the session
53
+ */
54
+ function initializeAgents(agentsDir, agentsList) {
55
+ const activeAgents = [];
56
+
57
+ agentsList.forEach(agent => {
58
+ try {
59
+ const agentPath = path.join(agentsDir, agent.path);
60
+
61
+ if (fs.existsSync(agentPath)) {
62
+ activeAgents.push({
63
+ id: agent.id,
64
+ name: agent.name,
65
+ status: 'ready'
66
+ });
67
+ }
68
+ } catch (error) {
69
+ console.error(`❌ Failed to initialize agent ${agent.name}:`, error.message);
70
+ }
71
+ });
72
+
73
+ return activeAgents;
74
+ }
75
+
76
+ /**
77
+ * Display session start banner
78
+ */
79
+ function displayBanner(variant, agentCount, skillCount) {
80
+ const variantColors = {
81
+ lite: '\x1b[32m', // Green
82
+ standard: '\x1b[34m', // Blue
83
+ pro: '\x1b[35m' // Magenta
84
+ };
85
+
86
+ const color = variantColors[variant] || '\x1b[36m'; // Default cyan
87
+ const reset = '\x1b[0m';
88
+ const bold = '\x1b[1m';
89
+
90
+ console.log(`
91
+ ${bold}${color}╔═══════════════════════════════════════════════╗${reset}
92
+ ${bold}${color}║ Agentic Kit - ${variant.charAt(0).toUpperCase() + variant.slice(1)} Variant${' '.repeat(Math.max(0, 17 - variant.length))}║${reset}
93
+ ${bold}${color}╚═══════════════════════════════════════════════╝${reset}
94
+
95
+ ✨ Session started successfully!
96
+
97
+ 📊 Active Components:
98
+ • Agents: ${agentCount}
99
+ • Skills: ${skillCount}
100
+
101
+ 💡 Quick Start:
102
+ • Invoke agents: ${color}@Master:${reset} help
103
+ • See agents: ${color}@Master:${reset} *help
104
+ • Documentation: Check README.md
105
+
106
+ ${bold}Ready to assist with your development tasks!${reset}
107
+ `);
108
+ }
109
+
110
+ /**
111
+ * Main session start handler
112
+ */
113
+ function onSessionStart(context) {
114
+ try {
115
+ // Get variant from context or default to standard
116
+ const variant = context.variant || 'standard';
117
+ const manifest = context.manifest || {};
118
+
119
+ const agentsList = manifest.agents || [];
120
+ const skillsList = manifest.skills || [];
121
+
122
+ // Load skills
123
+ const loadedSkills = loadSkills(context.skillsPath || './skills', skillsList);
124
+
125
+ // Initialize agents
126
+ const activeAgents = initializeAgents(context.agentsPath || './agents', agentsList);
127
+
128
+ // Display banner
129
+ displayBanner(variant, activeAgents.length, loadedSkills.length);
130
+
131
+ // Return session context
132
+ return {
133
+ variant,
134
+ agents: activeAgents,
135
+ skills: loadedSkills,
136
+ timestamp: new Date().toISOString(),
137
+ status: 'ready'
138
+ };
139
+
140
+ } catch (error) {
141
+ console.error('❌ Session start failed:', error.message);
142
+ console.log('⚠️ Plugin may not function correctly. Please restart or reinstall.');
143
+
144
+ return {
145
+ status: 'error',
146
+ error: error.message
147
+ };
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Module exports
153
+ */
154
+ module.exports = {
155
+ onSessionStart,
156
+ loadSkills,
157
+ initializeAgents,
158
+ displayBanner
159
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amrhas82/agentic-kit",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Comprehensive toolkit for AI-driven software development with 13 specialized agents and 14 powerful skills. Available in 3 variants: Lite (3 agents, no skills), Standard (13 agents, 8 skills), Pro (13 agents, 14 skills)",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -10,7 +10,10 @@
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "validate": "node ./validate-package.js",
13
- "prepublishOnly": "npm run validate"
13
+ "prepublishOnly": "npm run validate",
14
+ "publish:npm": "npm publish --registry https://registry.npmjs.org --access public",
15
+ "publish:github": "npm publish --registry https://npm.pkg.github.com",
16
+ "publish:both": "npm run publish:npm && npm run publish:github"
14
17
  },
15
18
  "keywords": [
16
19
  "claude",
@@ -39,6 +42,10 @@
39
42
  "url": "https://github.com/amrhas82/agentic-kit/issues"
40
43
  },
41
44
  "homepage": "https://github.com/amrhas82/agentic-kit#readme",
45
+ "publishConfig": {
46
+ "registry": "https://registry.npmjs.org",
47
+ "access": "public"
48
+ },
42
49
  "engines": {
43
50
  "node": ">=14.0.0"
44
51
  },
@@ -32,10 +32,10 @@ teams:
32
32
  icon: "\u26A1"
33
33
  description: Only the bare minimum for the IDE PO scrum-master dev qa cycle.
34
34
  agents:
35
- - po
35
+ - product-owner
36
36
  - scrum-master
37
- - dev
38
- - qa
37
+ - full-stack-dev
38
+ - qa-test-architect
39
39
  workflows: null
40
40
  team-no-ui:
41
41
  bundle: