@antoneeo/agentic-sdlc-skill 1.1.0 → 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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,24 @@
1
1
  # Changelog - Agentic SDLC Skill
2
2
 
3
- Tutte le modifiche significative a questa skill saranno documentate in questo file.
3
+ Tutte le modifiche significative a questa skill saranno documentate in questo file.
4
+
5
+ ## [1.2.1] - 2026-05-10
6
+ ### Fixed
7
+ - `postinstall` ora registra la skill anche per Codex copiandola in `$CODEX_HOME/skills/agentic-sdlc/` oppure `~/.codex/skills/agentic-sdlc/`.
8
+ - `preuninstall` rimuove anche la copia Codex della skill.
9
+ - `agentic-sdlc-init` ora crea `AGENTS.md` per Codex invece di `.codex/hooks.json`, che Codex non carica come istruzioni di progetto.
10
+
11
+ ## [1.2.0] - 2026-05-10
12
+ ### Added
13
+ - **Auto-installazione skill nativa Claude Code**: il `postinstall` ora copia `skills/agentic-sdlc-skill/` in `~/.claude/skills/agentic-sdlc/` quando rileva il CLI `claude`. La skill diventa disponibile come `agentic-sdlc` nel tool `Skill` di Claude Code dopo riavvio.
14
+ - Nuovo script `preuninstall.js` che rimuove la skill da `~/.claude/skills/agentic-sdlc/` durante `npm uninstall`.
15
+ - Fallback `copyRecursive` per Node < 16.7 (quando `fs.cpSync` non disponibile).
16
+
17
+ ### Changed
18
+ - `package.json`: bump versione a 1.2.0, aggiunti keyword `claude-code` e `claude-skill`, descrizione aggiornata per riflettere supporto Claude Code nativo.
19
+
20
+ ### Fixed
21
+ - Risolto bug per cui il pacchetto npm non registrava la skill in Claude Code (la cartella `~/.claude/skills/` non veniva mai popolata).
4
22
 
5
23
  ## [1.1.0] - 2026-05-10
6
24
  ### Fixed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Agentic SDLC Skill for Gemini CLI
1
+ # Agentic SDLC Skill for Claude Code, Gemini CLI & Codex
2
2
 
3
- Protocollo SDLC "Documentation-First" progettato per gestire in modo rigoroso il ciclo di vita dello sviluppo software direttamente tramite Gemini CLI.
3
+ Protocollo SDLC "Documentation-First" progettato per gestire in modo rigoroso il ciclo di vita dello sviluppo software. Supporta nativamente **Claude Code** (skill auto-installata in `~/.claude/skills/`), **Gemini CLI** (extension) e **Codex AI** (skill auto-installata in `~/.codex/skills/`).
4
4
 
5
5
  ## Caratteristiche principali
6
6
  - **Documentation-First**: Obbliga alla creazione/aggiornamento della documentazione (`docs/`) prima di scrivere codice.
@@ -8,7 +8,23 @@ Protocollo SDLC "Documentation-First" progettato per gestire in modo rigoroso il
8
8
  - **Workflow Tracciabile**: Gestisce lo stato delle feature in `features_history.md`.
9
9
  - **Qualità Garantita**: Integrazione nativa di analisi, sviluppo e test.
10
10
 
11
- ## Installazione (da chiavetta USB o locale)
11
+ ## Installazione
12
+
13
+ ### Via npm (consigliato — installa per tutti i CLI rilevati)
14
+
15
+ ```bash
16
+ npm install -g @antoneeo/agentic-sdlc-skill
17
+ ```
18
+
19
+ Il `postinstall` rileva automaticamente i CLI installati e configura ciascuno:
20
+
21
+ - **Claude Code** → copia la skill in `~/.claude/skills/agentic-sdlc/`. Riavvia Claude Code; invocala via tool `Skill` come `agentic-sdlc`, o lasciala triggerare automaticamente da prompt SDLC/audit.
22
+ - **Gemini CLI** → suggerisce `gemini extensions install` (vedi sotto).
23
+ - **Codex AI** → copia la skill in `$CODEX_HOME/skills/agentic-sdlc/` oppure `~/.codex/skills/agentic-sdlc/`. Riavvia Codex per caricarla.
24
+
25
+ `npm uninstall -g @antoneeo/agentic-sdlc-skill` rimuove anche le skill da `~/.claude/skills/agentic-sdlc/` e `~/.codex/skills/agentic-sdlc/`.
26
+
27
+ ### Via Gemini CLI (alternativa locale)
12
28
 
13
29
  > **Consiglio:** Prima di installare, copia questa cartella dalla chiavetta USB sul disco fisso del tuo computer (es. in `C:\tools\agentic-sdlc-skill`). In questo modo la skill rimarrà sempre disponibile anche dopo aver rimosso la chiavetta.
14
30
 
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@antoneeo/agentic-sdlc-skill",
3
- "version": "1.1.0",
4
- "description": "Protocollo SDLC Documentation-First per Gemini CLI. Gestisce audit, analisi, sviluppo e chiusura feature con documentazione sincronizzata.",
3
+ "version": "1.2.1",
4
+ "description": "Protocollo SDLC Documentation-First per Claude Code, Gemini CLI e Codex. Auto-installa le skill native in ~/.claude/skills/ e ~/.codex/skills/. Gestisce audit, analisi, sviluppo e chiusura feature con documentazione sincronizzata.",
5
5
  "keywords": [
6
+ "claude-code",
7
+ "claude-skill",
6
8
  "gemini-cli",
7
9
  "skill",
8
10
  "sdlc",
@@ -18,7 +20,8 @@
18
20
  "agentic-sdlc-init": "scripts/init.js"
19
21
  },
20
22
  "scripts": {
21
- "postinstall": "node scripts/postinstall.js"
23
+ "postinstall": "node scripts/postinstall.js",
24
+ "preuninstall": "node scripts/preuninstall.js"
22
25
  },
23
26
  "files": [
24
27
  "skills",
@@ -29,4 +32,4 @@
29
32
  "assets",
30
33
  "scripts"
31
34
  ]
32
- }
35
+ }
package/scripts/init.js CHANGED
@@ -18,24 +18,23 @@ function checkCommand(cmd) {
18
18
 
19
19
  // 1. Path definitions
20
20
  const directories = [
21
- path.join(cwd, 'ai_docs'),
22
- path.join(cwd, 'ai_docs', 'strategic'),
23
- path.join(cwd, 'ai_docs', 'audit'),
24
- path.join(cwd, 'ai_docs', 'solutions'),
25
- path.join(cwd, '.codex')
26
- ];
21
+ path.join(cwd, 'ai_docs'),
22
+ path.join(cwd, 'ai_docs', 'strategic'),
23
+ path.join(cwd, 'ai_docs', 'audit'),
24
+ path.join(cwd, 'ai_docs', 'solutions')
25
+ ];
27
26
 
28
27
  const files = {
29
28
  architecture: path.join(cwd, 'ai_docs', 'strategic', 'architecture.md'),
30
29
  existingFeatures: path.join(cwd, 'ai_docs', 'strategic', 'existing_features.md'),
31
30
  featuresHistory: path.join(cwd, 'ai_docs', 'strategic', 'features_history.md'),
32
31
  auditPlan: path.join(cwd, 'ai_docs', 'audit', 'audit_plan.md'),
33
- handoff: path.join(cwd, 'ai_docs', 'audit', 'handoff.md'),
34
- claudeConfig: path.join(cwd, 'CLAUDE.md'),
35
- geminiConfig: path.join(cwd, 'GEMINI.md'),
36
- codexHooks: path.join(cwd, '.codex', 'hooks.json'),
37
- cursorRules: path.join(cwd, '.cursorrules')
38
- };
32
+ handoff: path.join(cwd, 'ai_docs', 'audit', 'handoff.md'),
33
+ claudeConfig: path.join(cwd, 'CLAUDE.md'),
34
+ geminiConfig: path.join(cwd, 'GEMINI.md'),
35
+ codexAgents: path.join(cwd, 'AGENTS.md'),
36
+ cursorRules: path.join(cwd, '.cursorrules')
37
+ };
39
38
 
40
39
  // 2. Operational Protocol (System Prompt)
41
40
  const protocolContent = `# "Agentic SDLC" Operational Protocol
@@ -69,22 +68,7 @@ Upon feature completion:
69
68
  - Update \`ai_docs/strategic/features_history.md\` setting status to \`[COMPLETED]\`.
70
69
  `;
71
70
 
72
- const codexHooksContent = JSON.stringify({
73
- hooks: {
74
- SessionStart: [
75
- {
76
- hooks: [
77
- {
78
- type: "command",
79
- command: `echo '${protocolContent.replace(/'/g, "'\\''")}'`
80
- }
81
- ]
82
- }
83
- ]
84
- }
85
- }, null, 2);
86
-
87
- const historyBoilerplate = `# Feature History
71
+ const historyBoilerplate = `# Feature History
88
72
 
89
73
  | ID | Feature Name | Status | Start Date | End Date | Analysis Doc | Notes |
90
74
  |:---|:---|:---|:---|:---|:---|:---|
@@ -131,17 +115,17 @@ if (checkCommand('gemini')) {
131
115
  writeIfNotExists(files.geminiConfig, protocolContent, 'Gemini Configuration');
132
116
  }
133
117
 
134
- if (checkCommand('codex')) {
135
- console.log('✅ Codex AI detected.');
136
- writeIfNotExists(files.codexHooks, codexHooksContent, 'Codex AI Hooks');
137
- }
118
+ if (checkCommand('codex')) {
119
+ console.log('✅ Codex AI detected.');
120
+ writeIfNotExists(files.codexAgents, protocolContent, 'Codex AGENTS.md');
121
+ }
138
122
 
139
123
  // Cursor/Windsurf (always recommended)
140
124
  writeIfNotExists(files.cursorRules, protocolContent, 'Cursor/Windsurf Rules');
141
125
 
142
126
  console.log('\n✅ Setup completed successfully!');
143
127
  console.log('💡 Next steps:');
144
- console.log(' 1. If using Claude Code, start it: it will read CLAUDE.md.');
145
- console.log(' 2. If using Gemini CLI, commands will use GEMINI.md.');
146
- console.log(' 3. If using Codex, session hooks will inject the protocol.');
147
- console.log(' 4. Start analyzing the codebase following ai_docs/audit/audit_plan.md.');
128
+ console.log(' 1. If using Claude Code, start it: it will read CLAUDE.md.');
129
+ console.log(' 2. If using Gemini CLI, commands will use GEMINI.md.');
130
+ console.log(' 3. If using Codex, restart/open the project so it reads AGENTS.md.');
131
+ console.log(' 4. Start analyzing the codebase following ai_docs/audit/audit_plan.md.');
@@ -1,6 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { execSync } = require('child_process');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const os = require('os');
7
+
8
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
9
+ const SKILL_SOURCE = path.join(PACKAGE_ROOT, 'skills', 'agentic-sdlc-skill');
10
+ const CLAUDE_SKILLS_DIR = path.join(os.homedir(), '.claude', 'skills');
11
+ const CLAUDE_SKILL_TARGET = path.join(CLAUDE_SKILLS_DIR, 'agentic-sdlc');
12
+ const CODEX_HOME = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
13
+ const CODEX_SKILLS_DIR = path.join(CODEX_HOME, 'skills');
14
+ const CODEX_SKILL_TARGET = path.join(CODEX_SKILLS_DIR, 'agentic-sdlc');
4
15
 
5
16
  function checkCommand(cmd) {
6
17
  try {
@@ -11,23 +22,84 @@ function checkCommand(cmd) {
11
22
  }
12
23
  }
13
24
 
14
- console.log('\n--- Agentic SDLC Skill Discovery ---');
25
+ function copyRecursive(src, dest) {
26
+ if (typeof fs.cpSync === 'function') {
27
+ fs.cpSync(src, dest, { recursive: true, force: true });
28
+ return;
29
+ }
30
+ // Fallback for Node < 16.7
31
+ if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
32
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
33
+ const s = path.join(src, entry.name);
34
+ const d = path.join(dest, entry.name);
35
+ if (entry.isDirectory()) copyRecursive(s, d);
36
+ else fs.copyFileSync(s, d);
37
+ }
38
+ }
39
+
40
+ function installClaudeSkill() {
41
+ if (!fs.existsSync(SKILL_SOURCE)) {
42
+ console.log(`⚠️ Skill source not found at ${SKILL_SOURCE}; skipping Claude Code install.`);
43
+ return false;
44
+ }
45
+ try {
46
+ fs.mkdirSync(CLAUDE_SKILLS_DIR, { recursive: true });
47
+ copyRecursive(SKILL_SOURCE, CLAUDE_SKILL_TARGET);
48
+ console.log(`📦 Installed Claude Code skill at: ${CLAUDE_SKILL_TARGET}`);
49
+ console.log(' Restart Claude Code to load it. Invoke via Skill tool as "agentic-sdlc".');
50
+ return true;
51
+ } catch (err) {
52
+ console.log(`⚠️ Failed to install Claude Code skill: ${err.message}`);
53
+ console.log(` Manual install: copy "${SKILL_SOURCE}" to "${CLAUDE_SKILL_TARGET}".`);
54
+ return false;
55
+ }
56
+ }
57
+
58
+ function installCodexSkill() {
59
+ if (!fs.existsSync(SKILL_SOURCE)) {
60
+ console.log(`⚠️ Skill source not found at ${SKILL_SOURCE}; skipping Codex install.`);
61
+ return false;
62
+ }
63
+ try {
64
+ fs.mkdirSync(CODEX_SKILLS_DIR, { recursive: true });
65
+ copyRecursive(SKILL_SOURCE, CODEX_SKILL_TARGET);
66
+ console.log(`📦 Installed Codex skill at: ${CODEX_SKILL_TARGET}`);
67
+ console.log(' Restart Codex to load it. Invoke it as "$agentic-sdlc" or by asking for Agentic SDLC.');
68
+ return true;
69
+ } catch (err) {
70
+ console.log(`⚠️ Failed to install Codex skill: ${err.message}`);
71
+ console.log(` Manual install: copy "${SKILL_SOURCE}" to "${CODEX_SKILL_TARGET}".`);
72
+ return false;
73
+ }
74
+ }
75
+
76
+ function hasCodexHome() {
77
+ return Boolean(process.env.CODEX_HOME) || fs.existsSync(CODEX_HOME);
78
+ }
79
+
80
+ console.log('\n--- Agentic SDLC Skill Discovery ---');
15
81
 
16
- const agents = [
17
- { name: 'Claude Code', cmd: 'claude' },
18
- { name: 'Gemini CLI', cmd: 'gemini' },
19
- { name: 'Codex AI', cmd: 'codex' }
20
- ];
82
+ const agents = [
83
+ { name: 'Claude Code', cmd: 'claude', onDetect: installClaudeSkill },
84
+ { name: 'Gemini CLI', cmd: 'gemini' }
85
+ ];
21
86
 
22
87
  let detected = false;
23
88
  agents.forEach(agent => {
24
89
  if (checkCommand(agent.cmd)) {
25
90
  console.log(`✅ Detected: ${agent.name}`);
26
91
  detected = true;
27
- }
28
- });
29
-
30
- if (!detected) {
92
+ if (typeof agent.onDetect === 'function') agent.onDetect();
93
+ }
94
+ });
95
+
96
+ if (checkCommand('codex') || hasCodexHome()) {
97
+ console.log(`✅ Detected: Codex AI`);
98
+ detected = true;
99
+ installCodexSkill();
100
+ }
101
+
102
+ if (!detected) {
31
103
  console.log('ℹ️ No specific AI CLI detected globally, but you can still use the skill.');
32
104
  }
33
105
 
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ const CLAUDE_SKILL_TARGET = path.join(os.homedir(), '.claude', 'skills', 'agentic-sdlc');
8
+ const CODEX_HOME = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
9
+ const CODEX_SKILL_TARGET = path.join(CODEX_HOME, 'skills', 'agentic-sdlc');
10
+
11
+ function removeSkill(target, label) {
12
+ if (!fs.existsSync(target)) return;
13
+ try {
14
+ fs.rmSync(target, { recursive: true, force: true });
15
+ console.log(`🧹 Removed ${label} skill at: ${target}`);
16
+ } catch (err) {
17
+ console.log(`⚠️ Could not remove ${target}: ${err.message}`);
18
+ }
19
+ }
20
+
21
+ removeSkill(CLAUDE_SKILL_TARGET, 'Claude Code');
22
+ removeSkill(CODEX_SKILL_TARGET, 'Codex');