@antoneeo/agentic-sdlc-skill 1.0.8 → 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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  Tutte le modifiche significative a questa skill saranno documentate in questo file.
4
4
 
5
+ ## [1.1.0] - 2026-05-10
6
+ ### Fixed
7
+ - Fixed path inconsistencies in the generated `CLAUDE.md`, `GEMINI.md`, and `.cursorrules` protocols. Added full paths (`ai_docs/strategic/`) to all document references to ensure AI agents (like Claude) can correctly find and update them.
8
+ - Cleaned up encoding issues in initialization scripts.
9
+
10
+ ## [1.0.9] - 2026-05-10
11
+ ### Added
12
+ - New **Smart Discovery** system during project initialization.
13
+ - Official support for **Codex AI** via automatic `.codex/hooks.json` injection.
14
+ - Support for **Cursor** and **Windsurf** via `.cursorrules`.
15
+ - Binary command `agentic-sdlc-init` for use via `npx`.
16
+ - `postinstall` script for global AI CLI detection (Claude, Gemini, Codex).
17
+ - Full English localization for all user-facing messages and scripts.
18
+
19
+ ### Changed
20
+ - Updated `init.js` to support the new `ai_docs/` directory structure defined in v1.0.8.
21
+
5
22
  ## [1.0.8] - 2026-05-10
6
23
  ### Aggiunto
7
24
  - Skill evoluta in "Hybrid Edition": integrazione opzionale con **devPNT** (server MCP) per governance avanzata tramite database e piani gerarchici.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-sdlc-skill",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Protocollo SDLC Documentation-First per Gemini CLI.",
5
5
  "author": "Antonio Pinto (https://github.com/Antoneeo)"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antoneeo/agentic-sdlc-skill",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Protocollo SDLC Documentation-First per Gemini CLI. Gestisce audit, analisi, sviluppo e chiusura feature con documentazione sincronizzata.",
5
5
  "keywords": [
6
6
  "gemini-cli",
@@ -14,6 +14,12 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
+ "bin": {
18
+ "agentic-sdlc-init": "scripts/init.js"
19
+ },
20
+ "scripts": {
21
+ "postinstall": "node scripts/postinstall.js"
22
+ },
17
23
  "files": [
18
24
  "skills",
19
25
  "gemini-extension.json",
package/scripts/init.js CHANGED
@@ -1,93 +1,147 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
+ const { execSync } = require('child_process');
5
6
 
6
7
  const cwd = process.cwd();
7
8
 
8
- // 1. Definizione dei percorsi
9
+ // Helper for command checking
10
+ function checkCommand(cmd) {
11
+ try {
12
+ execSync(`${cmd} --version`, { stdio: 'ignore' });
13
+ return true;
14
+ } catch (e) {
15
+ return false;
16
+ }
17
+ }
18
+
19
+ // 1. Path definitions
9
20
  const directories = [
10
- path.join(cwd, 'docs'),
11
- path.join(cwd, 'docs', 'solutions')
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')
12
26
  ];
13
27
 
14
28
  const files = {
15
- architecture: path.join(cwd, 'docs', 'architecture.md'),
16
- existingFeatures: path.join(cwd, 'docs', 'existing_features.md'),
17
- featuresHistory: path.join(cwd, 'docs', 'features_history.md'),
29
+ architecture: path.join(cwd, 'ai_docs', 'strategic', 'architecture.md'),
30
+ existingFeatures: path.join(cwd, 'ai_docs', 'strategic', 'existing_features.md'),
31
+ featuresHistory: path.join(cwd, 'ai_docs', 'strategic', 'features_history.md'),
32
+ auditPlan: path.join(cwd, 'ai_docs', 'audit', 'audit_plan.md'),
33
+ handoff: path.join(cwd, 'ai_docs', 'audit', 'handoff.md'),
18
34
  claudeConfig: path.join(cwd, 'CLAUDE.md'),
19
- geminiConfig: path.join(cwd, 'GEMINI.md')
35
+ geminiConfig: path.join(cwd, 'GEMINI.md'),
36
+ codexHooks: path.join(cwd, '.codex', 'hooks.json'),
37
+ cursorRules: path.join(cwd, '.cursorrules')
20
38
  };
21
39
 
22
- // 2. Il contenuto del Protocollo (System Prompt)
23
- const protocolContent = `# Protocollo Operativo "Agentic SDLC"
24
-
25
- Sei un ingegnere del software senior che segue rigorosamente un processo "Documentation-First". Non implementare MAI codice senza aver completato i passaggi documentali precedenti. Utilizza i tool a tua disposizione (lettura file, scrittura file, esecuzione comandi) per rispettare le seguenti fasi.
26
-
27
- ## 1. Fase di Audit e Allineamento
28
- Prima di rispondere a qualsiasi richiesta operativa:
29
- - Controlla l'esistenza della cartella \`/docs\`.
30
- - Se \`/docs\` non esiste o mancano i documenti fondamentali, creali analizzando il codice sorgente:
31
- 1. \`docs/architecture.md\`: Deve contenere Stack Tecnologico, Struttura delle Directory e Pattern architetturali principali.
32
- 2. \`docs/existing_features.md\`: Elenco puntato delle funzionalità già presenti.
33
- 3. \`docs/features_history.md\`: Deve essere aggiornato rigorosamente con questo schema:
34
- | ID | Nome Feature | Stato | Data Inizio | Data Fine | Doc. Analisi | Note |
35
-
36
- ## 2. Fase di Analisi della Richiesta
37
- Per ogni nuova feature:
38
- - Crea \`docs/solutions/ANALYSIS_[nome_feature].md\` (Obiettivo, Impatto, Piano, Strategia Test).
39
- - Aggiungi una riga in \`docs/features_history.md\` con stato \`[PLANNED]\`.
40
-
41
- ## 3. Fase di Sviluppo e Test
42
- Solo dopo la Fase 2:
43
- 1. Aggiorna lo stato a \`[IN_PROGRESS]\`.
44
- 2. Implementa il codice.
45
- 3. **Obbligatorio:** Scrivi i test automatici (pattern AAA).
46
- 4. Esegui i test. Se falliscono, correggi e riesegui finché Exit Code non è 0.
47
-
48
- ## 4. Fase di Chiusura
49
- A completamento:
50
- - Aggiorna \`architecture.md\` e \`existing_features.md\` se necessario.
51
- - Aggiorna \`docs/features_history.md\` impostando lo stato a \`[COMPLETED]\`.
40
+ // 2. Operational Protocol (System Prompt)
41
+ const protocolContent = `# "Agentic SDLC" Operational Protocol
42
+
43
+ You are a senior software engineer strictly following a "Documentation-First" process. NEVER implement code without completing the preceding documentation steps. Use your tools (file read/write, shell execution) to adhere to the following phases.
44
+
45
+ ## 1. Audit and Alignment Phase
46
+ Before responding to any operational request:
47
+ - Check for the existence of the \`ai_docs/\` folder.
48
+ - If \`ai_docs/\` is missing or essential documents are absent, create them by analyzing the source code:
49
+ 1. \`ai_docs/strategic/architecture.md\`: Tech Stack, Directory Structure, Architecture Patterns.
50
+ 2. \`ai_docs/strategic/existing_features.md\`: List of current features.
51
+ 3. \`ai_docs/strategic/features_history.md\`: Feature history table (ID, Name, Status, Dates).
52
+ 4. \`ai_docs/audit/audit_plan.md\`: Codebase analysis plan in batches.
53
+
54
+ ## 2. Request Analysis Phase
55
+ For every new feature request:
56
+ - Create \`ai_docs/solutions/ANALYSIS_[feature_name].md\` (Objective, Impact, Action Plan, Test Strategy).
57
+ - Add an entry in \`ai_docs/strategic/features_history.md\` with status \`[PLANNED]\`.
58
+
59
+ ## 3. Development and Testing Phase
60
+ Only after Phase 2 is complete:
61
+ 1. Update feature status to \`[IN_PROGRESS]\` in \`ai_docs/strategic/features_history.md\`.
62
+ 2. Implement code surgically following the plan.
63
+ 3. **Mandatory:** Write automated tests following the **AAA (Arrange, Act, Assert)** pattern.
64
+ 4. Execute tests. If they fail, fix and re-run until Exit Code is 0.
65
+
66
+ ## 4. Closing Phase
67
+ Upon feature completion:
68
+ - Update \`ai_docs/strategic/architecture.md\` and \`ai_docs/strategic/existing_features.md\` if necessary.
69
+ - Update \`ai_docs/strategic/features_history.md\` setting status to \`[COMPLETED]\`.
52
70
  `;
53
71
 
54
- // Contenuto per l'inizializzazione della tabella
55
- const historyBoilerplate = `# Storico Features
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
56
88
 
57
- | ID | Nome Feature | Stato | Data Inizio | Data Fine | Doc. Analisi | Note |
89
+ | ID | Feature Name | Status | Start Date | End Date | Analysis Doc | Notes |
58
90
  |:---|:---|:---|:---|:---|:---|:---|
59
- | 000 | Init Progetto | [COMPLETED] | - | - | - | Inizializzazione automatica |
91
+ | 000 | Project Init | [COMPLETED] | - | - | - | Automatic initialization |
60
92
  `;
61
93
 
62
- console.log('🚀 Inizializzazione del workflow Agentic SDLC...');
94
+ console.log('🚀 Initializing Agentic SDLC workflow (Discovery Mode)...');
63
95
 
64
- // 3. Creazione delle cartelle
96
+ // 3. Directory creation
65
97
  directories.forEach(dir => {
66
98
  if (!fs.existsSync(dir)) {
67
99
  fs.mkdirSync(dir, { recursive: true });
68
- console.log(`📁 Creata directory: ${path.relative(cwd, dir)}`);
100
+ console.log(`📁 Created directory: ${path.relative(cwd, dir)}`);
69
101
  }
70
102
  });
71
103
 
72
- // 4. Scrittura dei file di base se non esistono
104
+ // 4. Basic file writing
73
105
  const writeIfNotExists = (filePath, content, description) => {
74
106
  if (!fs.existsSync(filePath)) {
75
107
  fs.writeFileSync(filePath, content, 'utf8');
76
- console.log(`📄 Creato file: ${path.relative(cwd, filePath)} (${description})`);
108
+ console.log(`📄 Created file: ${path.relative(cwd, filePath)} (${description})`);
109
+ return true;
77
110
  } else {
78
- console.log(`⏭️ Ignorato: ${path.relative(cwd, filePath)} esiste già.`);
111
+ console.log(`⏭️ Skipped: ${path.relative(cwd, filePath)} already exists.`);
112
+ return false;
79
113
  }
80
114
  };
81
115
 
82
- writeIfNotExists(files.architecture, '# Architettura del Progetto\n\n- Stack:\n- Pattern:\n', 'Boilerplate Architettura');
83
- writeIfNotExists(files.existingFeatures, '# Funzionalità Esistenti\n\n- \n', 'Boilerplate Funzionalità');
84
- writeIfNotExists(files.featuresHistory, historyBoilerplate, 'Tabella Storico');
85
-
86
- // 5. Scrittura delle configurazioni per le CLI (Claude e Gemini)
87
- writeIfNotExists(files.claudeConfig, protocolContent, 'Regole per Claude Code');
88
- writeIfNotExists(files.geminiConfig, protocolContent, 'Regole per Gemini CLI');
89
-
90
- console.log('\n✅ Setup completato con successo!');
91
- console.log('💡 Istruzioni d\'uso:');
92
- console.log(' - Claude Code rileverà automaticamente CLAUDE.md al prossimo avvio.');
93
- console.log(' - Per Gemini CLI, usa il file GEMINI.md come system prompt passandolo col flag appropriato (es: --system-prompt-file GEMINI.md).');
116
+ writeIfNotExists(files.architecture, '# Project Architecture\n\n- Stack:\n- Patterns:\n', 'Architecture Boilerplate');
117
+ writeIfNotExists(files.existingFeatures, '# Existing Features\n\n- \n', 'Features Boilerplate');
118
+ writeIfNotExists(files.featuresHistory, historyBoilerplate, 'History Table');
119
+ writeIfNotExists(files.auditPlan, '# Audit Plan\n\n| Directory/File | Status | Notes |\n|:---|:---|:---|\n| / | [PENDING] | Initial analysis |\n', 'Audit Plan');
120
+
121
+ // 5. Client Discovery and Configuration
122
+ console.log('\n--- Environment Analysis ---');
123
+
124
+ if (checkCommand('claude')) {
125
+ console.log(' Claude Code detected.');
126
+ writeIfNotExists(files.claudeConfig, protocolContent, 'Claude Configuration');
127
+ }
128
+
129
+ if (checkCommand('gemini')) {
130
+ console.log('✅ Gemini CLI detected.');
131
+ writeIfNotExists(files.geminiConfig, protocolContent, 'Gemini Configuration');
132
+ }
133
+
134
+ if (checkCommand('codex')) {
135
+ console.log('✅ Codex AI detected.');
136
+ writeIfNotExists(files.codexHooks, codexHooksContent, 'Codex AI Hooks');
137
+ }
138
+
139
+ // Cursor/Windsurf (always recommended)
140
+ writeIfNotExists(files.cursorRules, protocolContent, 'Cursor/Windsurf Rules');
141
+
142
+ console.log('\n✅ Setup completed successfully!');
143
+ 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.');
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require('child_process');
4
+
5
+ function checkCommand(cmd) {
6
+ try {
7
+ execSync(`${cmd} --version`, { stdio: 'ignore' });
8
+ return true;
9
+ } catch (e) {
10
+ return false;
11
+ }
12
+ }
13
+
14
+ console.log('\n--- Agentic SDLC Skill Discovery ---');
15
+
16
+ const agents = [
17
+ { name: 'Claude Code', cmd: 'claude' },
18
+ { name: 'Gemini CLI', cmd: 'gemini' },
19
+ { name: 'Codex AI', cmd: 'codex' }
20
+ ];
21
+
22
+ let detected = false;
23
+ agents.forEach(agent => {
24
+ if (checkCommand(agent.cmd)) {
25
+ console.log(`✅ Detected: ${agent.name}`);
26
+ detected = true;
27
+ }
28
+ });
29
+
30
+ if (!detected) {
31
+ console.log('ℹ️ No specific AI CLI detected globally, but you can still use the skill.');
32
+ }
33
+
34
+ console.log('\nTo initialize a project with the SDLC protocol, run:');
35
+ console.log('👉 npx agentic-sdlc-init');
36
+ console.log('------------------------------------\n');