abm-ks 0.1.0 → 0.1.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 +17 -0
- package/README.md +3 -3
- package/docs/guides/getting-started.md +1 -1
- package/package.json +4 -4
- package/src/core/agents/abm-master.agent.yaml +2 -2
- package/src/core/workflows/help/instructions.md +1 -1
- package/src/modules/abm/workflows/4-documentation/readme-generation/readme-template.md +1 -1
- package/tests/test-report.json +31 -0
- package/tools/abm-ks-npx-wrapper.js +1 -1
- package/tools/cli/abm-ks-cli.js +2 -2
- package/tools/cli/commands/help.js +3 -3
- package/tools/installer/lib/config-collector.js +71 -0
- package/tools/installer/lib/installer.js +172 -41
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.
|
|
|
5
5
|
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
|
|
6
6
|
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
|
7
7
|
|
|
8
|
+
## [0.1.1] - 2025-01-15
|
|
9
|
+
|
|
10
|
+
### Adicionado
|
|
11
|
+
- **Team Selection**: Opção de instalar equipes opcionais (Brainstorming, Documentation)
|
|
12
|
+
- **Language Filter**: Instala apenas templates da linguagem selecionada (Python, NetLogo, ou C++)
|
|
13
|
+
- Pergunta sobre equipes opcionais durante instalação
|
|
14
|
+
- Resumo mostra equipes e templates selecionados
|
|
15
|
+
|
|
16
|
+
### Corrigido
|
|
17
|
+
- Versão correta exibida no banner (era 0.1.0-alpha.1)
|
|
18
|
+
- URL da documentação atualizado para github.com/muriloms/abm-ks
|
|
19
|
+
- Comandos atualizados: `*init` em vez de `*workflow-init`
|
|
20
|
+
|
|
21
|
+
### Melhorado
|
|
22
|
+
- Instalação mais rápida ao baixar apenas templates necessários
|
|
23
|
+
- Estrutura de diretórios criada baseada na linguagem selecionada
|
|
24
|
+
|
|
8
25
|
## [0.1.0] - 2025-01-15
|
|
9
26
|
|
|
10
27
|
### 🎉 Release Inicial
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Framework de agentes especializados para desenvolvimento de modelos baseados em agentes (ABM)**
|
|
4
4
|
|
|
5
|
-
[](https://github.com/muriloms/abm-ks)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](#testes)
|
|
8
8
|
|
|
@@ -98,7 +98,7 @@ npx abm-ks install
|
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
100
|
# Clone o repositório
|
|
101
|
-
git clone https://github.com/
|
|
101
|
+
git clone https://github.com/muriloms/abm-ks.git
|
|
102
102
|
|
|
103
103
|
# Entre no diretório
|
|
104
104
|
cd abm-ks
|
|
@@ -450,6 +450,6 @@ Este projeto está licenciado sob a [MIT License](LICENSE).
|
|
|
450
450
|
|
|
451
451
|
**ABM-KS v0.1.0** | Feito com ❤️ para a comunidade de modelagem
|
|
452
452
|
|
|
453
|
-
[Documentação](docs/) · [Issues](https://github.com/
|
|
453
|
+
[Documentação](docs/) · [Issues](https://github.com/muriloms/abm-ks/issues) · [Discussões](https://github.com/muriloms/abm-ks/discussions)
|
|
454
454
|
|
|
455
455
|
</div>
|
|
@@ -4,7 +4,7 @@ Welcome to ABM-KS! This guide will help you create your first agent-based model.
|
|
|
4
4
|
|
|
5
5
|
## What is ABM-KS?
|
|
6
6
|
|
|
7
|
-
ABM-KS (Agent-Based
|
|
7
|
+
ABM-KS (Agent-Based Modeling Knowledge System) is an AI-powered assistant that guides you through the entire process of creating agent-based models:
|
|
8
8
|
|
|
9
9
|
- 💡 **Conceptualization** - Define your model's purpose
|
|
10
10
|
- 🏗️ **Design** - Plan agents and behaviors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abm-ks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Agent-Based Modeling Knowledge System - Framework de agentes especializados para desenvolvimento de modelos baseados em agentes (ABM)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "tools/abm-ks-npx-wrapper.js",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/
|
|
41
|
+
"url": "git+https://github.com/muriloms/abm-ks.git"
|
|
42
42
|
},
|
|
43
43
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/
|
|
44
|
+
"url": "https://github.com/muriloms/abm-ks/issues"
|
|
45
45
|
},
|
|
46
|
-
"homepage": "https://github.com/
|
|
46
|
+
"homepage": "https://github.com/muriloms/abm-ks#readme",
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
@@ -18,7 +18,7 @@ agent:
|
|
|
18
18
|
persona:
|
|
19
19
|
role: >
|
|
20
20
|
You are the ABM Master, the primary orchestrator for the ABM-KS
|
|
21
|
-
(Agent-Based
|
|
21
|
+
(Agent-Based Modeling Knowledge System) framework. You guide researchers and
|
|
22
22
|
developers through the complete lifecycle of agent-based model development,
|
|
23
23
|
from conceptualization to publication-ready documentation.
|
|
24
24
|
|
|
@@ -153,7 +153,7 @@ agent:
|
|
|
153
153
|
activation_message: |
|
|
154
154
|
# 🎯 ABM Master Activated
|
|
155
155
|
|
|
156
|
-
Welcome to **ABM-KS** (Agent-Based
|
|
156
|
+
Welcome to **ABM-KS** (Agent-Based Modeling Knowledge System)!
|
|
157
157
|
|
|
158
158
|
I'm your guide through the ABM development process. I'll help you:
|
|
159
159
|
- Design scientifically rigorous models
|
|
@@ -550,7 +550,7 @@ When user runs `*help faq`:
|
|
|
550
550
|
## General
|
|
551
551
|
|
|
552
552
|
### What is ABM-KS?
|
|
553
|
-
ABM-KS (Agent-Based
|
|
553
|
+
ABM-KS (Agent-Based Modeling Knowledge System) is an AI assistant that guides you through creating agent-based models, from concept to documentation.
|
|
554
554
|
|
|
555
555
|
### What platforms are supported?
|
|
556
556
|
- 🐍 **Python** (Mesa framework)
|
|
@@ -258,4 +258,4 @@ This project is licensed under the {{license}} License - see [LICENSE](LICENSE)
|
|
|
258
258
|
|
|
259
259
|
---
|
|
260
260
|
|
|
261
|
-
*This model was developed using [ABM-KS](https://github.com/
|
|
261
|
+
*This model was developed using [ABM-KS](https://github.com/muriloms/abm-ks), the Agent-Based Modeling Knowledge System.*
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timestamp": "2026-01-16T13:20:06.039Z",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"results": {
|
|
5
|
+
"structure": {
|
|
6
|
+
"passed": 265,
|
|
7
|
+
"failed": 0,
|
|
8
|
+
"status": "passed"
|
|
9
|
+
},
|
|
10
|
+
"yaml": {
|
|
11
|
+
"passed": 54,
|
|
12
|
+
"failed": 0,
|
|
13
|
+
"status": "passed"
|
|
14
|
+
},
|
|
15
|
+
"integration": {
|
|
16
|
+
"passed": 7,
|
|
17
|
+
"failed": 0,
|
|
18
|
+
"status": "passed"
|
|
19
|
+
},
|
|
20
|
+
"e2e": {
|
|
21
|
+
"passed": 5,
|
|
22
|
+
"failed": 0,
|
|
23
|
+
"status": "passed"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"summary": {
|
|
27
|
+
"totalPassed": 331,
|
|
28
|
+
"totalFailed": 0,
|
|
29
|
+
"allPassed": true
|
|
30
|
+
}
|
|
31
|
+
}
|
package/tools/cli/abm-ks-cli.js
CHANGED
|
@@ -16,7 +16,7 @@ const __dirname = dirname(__filename);
|
|
|
16
16
|
|
|
17
17
|
// Package info
|
|
18
18
|
export const PACKAGE_NAME = 'abm-ks';
|
|
19
|
-
export const VERSION = '0.1.
|
|
19
|
+
export const VERSION = '0.1.1';
|
|
20
20
|
|
|
21
21
|
// ANSI color codes
|
|
22
22
|
export const colors = {
|
|
@@ -47,7 +47,7 @@ ${colors.cyan}${colors.bright}
|
|
|
47
47
|
║ ██║ ██║██████╔╝██║ ╚═╝ ██║ ██║ ██╗███████║ ║
|
|
48
48
|
║ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ║
|
|
49
49
|
║ ║
|
|
50
|
-
║
|
|
50
|
+
║ Agent-Based Modeling Knowledge System v${VERSION} ║
|
|
51
51
|
║ ║
|
|
52
52
|
╚═══════════════════════════════════════════════════════════╝
|
|
53
53
|
${colors.reset}`);
|
|
@@ -25,17 +25,17 @@ ${colors.bright}Options:${colors.reset}
|
|
|
25
25
|
|
|
26
26
|
${colors.bright}Examples:${colors.reset}
|
|
27
27
|
${colors.dim}# Install ABM-KS in your project${colors.reset}
|
|
28
|
-
npx ${PACKAGE_NAME}
|
|
28
|
+
npx ${PACKAGE_NAME} install
|
|
29
29
|
|
|
30
30
|
${colors.dim}# Show version${colors.reset}
|
|
31
31
|
npx ${PACKAGE_NAME} --version
|
|
32
32
|
|
|
33
33
|
${colors.bright}Documentation:${colors.reset}
|
|
34
|
-
https://github.com/
|
|
34
|
+
https://github.com/abm-ks/abm-ks
|
|
35
35
|
|
|
36
36
|
${colors.bright}After Installation:${colors.reset}
|
|
37
37
|
Activate the ABM Master agent in your AI IDE and run:
|
|
38
|
-
${colors.cyan}*
|
|
38
|
+
${colors.cyan}*init${colors.reset}
|
|
39
39
|
`);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -23,6 +23,14 @@ import {
|
|
|
23
23
|
getTimestamp
|
|
24
24
|
} from './utils.js';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Team options for optional modules
|
|
28
|
+
*/
|
|
29
|
+
const TEAM_OPTIONS = [
|
|
30
|
+
{ value: 'brainstorm', label: 'Brainstorming Team', hint: 'ideation, literature review, hypothesis generation', checked: false },
|
|
31
|
+
{ value: 'documentation', label: 'Documentation Team', hint: 'academic papers, technical manuals, analysis protocols', checked: false },
|
|
32
|
+
];
|
|
33
|
+
|
|
26
34
|
/**
|
|
27
35
|
* Configuration Collector Class
|
|
28
36
|
*/
|
|
@@ -52,6 +60,10 @@ export class ConfigCollector {
|
|
|
52
60
|
await this.collectPlatform();
|
|
53
61
|
await this.collectExperience();
|
|
54
62
|
|
|
63
|
+
// Collect team selection (optional modules)
|
|
64
|
+
section('Team Selection');
|
|
65
|
+
await this.collectTeams();
|
|
66
|
+
|
|
55
67
|
// Collect IDE settings
|
|
56
68
|
section('IDE Configuration');
|
|
57
69
|
await this.collectIDEs();
|
|
@@ -153,6 +165,55 @@ export class ConfigCollector {
|
|
|
153
165
|
);
|
|
154
166
|
this.config.pythonFramework = framework;
|
|
155
167
|
}
|
|
168
|
+
|
|
169
|
+
// Store which template languages to install based on platform
|
|
170
|
+
this.config.templateLanguages = this.getTemplateLanguages(platform);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get template languages based on platform selection
|
|
175
|
+
*/
|
|
176
|
+
getTemplateLanguages(platform) {
|
|
177
|
+
switch (platform) {
|
|
178
|
+
case 'python':
|
|
179
|
+
return ['python'];
|
|
180
|
+
case 'netlogo':
|
|
181
|
+
return ['netlogo'];
|
|
182
|
+
case 'cpp':
|
|
183
|
+
return ['cpp'];
|
|
184
|
+
case 'multi':
|
|
185
|
+
return ['python', 'netlogo', 'cpp'];
|
|
186
|
+
default:
|
|
187
|
+
return ['python'];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Collect optional team modules
|
|
193
|
+
*/
|
|
194
|
+
async collectTeams() {
|
|
195
|
+
logger.info('Core and ABM Development teams are always included.');
|
|
196
|
+
logger.newline();
|
|
197
|
+
|
|
198
|
+
const includeOptional = await confirm(
|
|
199
|
+
'Include optional teams (Brainstorming, Documentation)?',
|
|
200
|
+
false
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
if (includeOptional) {
|
|
204
|
+
const selectedTeams = await multiSelect(
|
|
205
|
+
'Select optional teams to install:',
|
|
206
|
+
TEAM_OPTIONS
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
this.config.optionalTeams = selectedTeams;
|
|
210
|
+
this.config.includeBrainstorm = selectedTeams.includes('brainstorm');
|
|
211
|
+
this.config.includeDocumentation = selectedTeams.includes('documentation');
|
|
212
|
+
} else {
|
|
213
|
+
this.config.optionalTeams = [];
|
|
214
|
+
this.config.includeBrainstorm = false;
|
|
215
|
+
this.config.includeDocumentation = false;
|
|
216
|
+
}
|
|
156
217
|
}
|
|
157
218
|
|
|
158
219
|
/**
|
|
@@ -236,10 +297,17 @@ export class ConfigCollector {
|
|
|
236
297
|
const experienceLabel = EXPERIENCE_LEVELS.find(e => e.value === this.config.experience)?.label || this.config.experience;
|
|
237
298
|
const trackInfo = TRACKS[this.config.track];
|
|
238
299
|
|
|
300
|
+
// Build teams string
|
|
301
|
+
let teamsStr = 'Core, ABM Development';
|
|
302
|
+
if (this.config.includeBrainstorm) teamsStr += ', Brainstorming';
|
|
303
|
+
if (this.config.includeDocumentation) teamsStr += ', Documentation';
|
|
304
|
+
|
|
239
305
|
summaryBox('Installation Summary', {
|
|
240
306
|
'Project': this.config.projectName,
|
|
241
307
|
'Domain': domainLabel,
|
|
242
308
|
'Platform': platformLabel,
|
|
309
|
+
'Templates': this.config.templateLanguages.join(', '),
|
|
310
|
+
'Teams': teamsStr,
|
|
243
311
|
'Experience': experienceLabel,
|
|
244
312
|
'Track': `${trackInfo.name} (${trackInfo.estimatedTime})`,
|
|
245
313
|
'IDEs': this.config.ides.join(', '),
|
|
@@ -269,6 +337,9 @@ export class ConfigCollector {
|
|
|
269
337
|
if (this.config.ides.length === 0) {
|
|
270
338
|
this.config.ides = ['cursor'];
|
|
271
339
|
}
|
|
340
|
+
this.config.optionalTeams = [];
|
|
341
|
+
this.config.includeBrainstorm = false;
|
|
342
|
+
this.config.includeDocumentation = false;
|
|
272
343
|
|
|
273
344
|
this.determineTrack();
|
|
274
345
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Main installer class that orchestrates the installation process
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { existsSync, rmSync, writeFileSync } from 'fs';
|
|
8
|
-
import { join } from 'path';
|
|
7
|
+
import { existsSync, rmSync, writeFileSync, readdirSync } from 'fs';
|
|
8
|
+
import { join, basename } from 'path';
|
|
9
9
|
import logger from './logger.js';
|
|
10
10
|
import { Spinner, getTimestamp } from './utils.js';
|
|
11
11
|
import {
|
|
@@ -50,16 +50,19 @@ export class Installer {
|
|
|
50
50
|
// Step 3: Copy core module
|
|
51
51
|
await this.installCoreModule();
|
|
52
52
|
|
|
53
|
-
// Step 4: Copy ABM module
|
|
53
|
+
// Step 4: Copy ABM module (with language filter)
|
|
54
54
|
await this.installAbmModule();
|
|
55
55
|
|
|
56
|
-
// Step 5:
|
|
56
|
+
// Step 5: Install optional teams
|
|
57
|
+
await this.installOptionalTeams();
|
|
58
|
+
|
|
59
|
+
// Step 6: Create configuration files
|
|
57
60
|
await this.createConfigFiles();
|
|
58
61
|
|
|
59
|
-
// Step
|
|
62
|
+
// Step 7: Create status file
|
|
60
63
|
await this.createStatusFile();
|
|
61
64
|
|
|
62
|
-
// Step
|
|
65
|
+
// Step 8: Configure IDEs
|
|
63
66
|
await this.configureIDEs();
|
|
64
67
|
|
|
65
68
|
// Show results
|
|
@@ -116,10 +119,23 @@ export class Installer {
|
|
|
116
119
|
// Project directories
|
|
117
120
|
`${PATHS.docsDir}/planning`,
|
|
118
121
|
`${PATHS.docsDir}/odd`,
|
|
119
|
-
`${PATHS.srcDir}/netlogo`,
|
|
120
|
-
`${PATHS.srcDir}/python`,
|
|
121
|
-
`${PATHS.srcDir}/cpp`,
|
|
122
122
|
];
|
|
123
|
+
|
|
124
|
+
// Add source directories based on selected languages
|
|
125
|
+
const templateLanguages = this.config.templateLanguages || ['python'];
|
|
126
|
+
for (const lang of templateLanguages) {
|
|
127
|
+
directories.push(`${PATHS.srcDir}/${lang}`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Add directories for optional teams
|
|
131
|
+
if (this.config.includeBrainstorm) {
|
|
132
|
+
directories.push(`${PATHS.installDir}/brainstorm/agents`);
|
|
133
|
+
directories.push(`${PATHS.installDir}/brainstorm/workflows`);
|
|
134
|
+
}
|
|
135
|
+
if (this.config.includeDocumentation) {
|
|
136
|
+
directories.push(`${PATHS.installDir}/documentation/agents`);
|
|
137
|
+
directories.push(`${PATHS.installDir}/documentation/workflows`);
|
|
138
|
+
}
|
|
123
139
|
|
|
124
140
|
const created = createDirectories(this.targetDir, directories);
|
|
125
141
|
this.results.created.push(...created);
|
|
@@ -154,7 +170,7 @@ export class Installer {
|
|
|
154
170
|
}
|
|
155
171
|
|
|
156
172
|
/**
|
|
157
|
-
* Step 4: Install ABM module
|
|
173
|
+
* Step 4: Install ABM module with language filter
|
|
158
174
|
*/
|
|
159
175
|
async installAbmModule() {
|
|
160
176
|
this.spinner.start('Installing ABM module...');
|
|
@@ -167,9 +183,30 @@ export class Installer {
|
|
|
167
183
|
return;
|
|
168
184
|
}
|
|
169
185
|
|
|
170
|
-
//
|
|
186
|
+
// Get selected template languages
|
|
187
|
+
const templateLanguages = this.config.templateLanguages || ['python', 'netlogo', 'cpp'];
|
|
188
|
+
|
|
189
|
+
// Copy ABM module files with template filtering
|
|
171
190
|
const result = copyDir(abmPath, destAbmPath, {
|
|
172
|
-
filter: (
|
|
191
|
+
filter: (filePath, name) => {
|
|
192
|
+
// Skip hidden files
|
|
193
|
+
if (name.startsWith('.')) return false;
|
|
194
|
+
|
|
195
|
+
// Filter templates by language
|
|
196
|
+
if (filePath.includes('/templates/models/')) {
|
|
197
|
+
const pathParts = filePath.split('/');
|
|
198
|
+
const modelsIndex = pathParts.indexOf('models');
|
|
199
|
+
if (modelsIndex !== -1 && modelsIndex + 1 < pathParts.length) {
|
|
200
|
+
const lang = pathParts[modelsIndex + 1];
|
|
201
|
+
// Always include if it's the models directory itself or a selected language
|
|
202
|
+
if (['python', 'netlogo', 'cpp'].includes(lang)) {
|
|
203
|
+
return templateLanguages.includes(lang);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return true;
|
|
209
|
+
},
|
|
173
210
|
});
|
|
174
211
|
|
|
175
212
|
this.results.copied.push(...result.copied);
|
|
@@ -179,30 +216,105 @@ export class Installer {
|
|
|
179
216
|
}
|
|
180
217
|
|
|
181
218
|
/**
|
|
182
|
-
* Step 5:
|
|
219
|
+
* Step 5: Install optional team modules
|
|
220
|
+
*/
|
|
221
|
+
async installOptionalTeams() {
|
|
222
|
+
// Install Brainstorming team if selected
|
|
223
|
+
if (this.config.includeBrainstorm) {
|
|
224
|
+
await this.installBrainstormModule();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Install Documentation team if selected
|
|
228
|
+
if (this.config.includeDocumentation) {
|
|
229
|
+
await this.installDocumentationModule();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Install Brainstorming team module
|
|
235
|
+
*/
|
|
236
|
+
async installBrainstormModule() {
|
|
237
|
+
this.spinner.start('Installing Brainstorming team...');
|
|
238
|
+
|
|
239
|
+
const brainstormPath = moduleManager.getModulePath('brainstorm');
|
|
240
|
+
const destPath = join(this.installDir, 'brainstorm');
|
|
241
|
+
|
|
242
|
+
if (!existsSync(brainstormPath)) {
|
|
243
|
+
this.spinner.warn('Brainstorming module not found');
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const result = copyDir(brainstormPath, destPath, {
|
|
248
|
+
filter: (path, name) => !name.startsWith('.'),
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
this.results.copied.push(...result.copied);
|
|
252
|
+
this.results.errors.push(...result.errors);
|
|
253
|
+
|
|
254
|
+
this.spinner.success(`Brainstorming team installed (${result.copied.length} files)`);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Install Documentation team module
|
|
259
|
+
*/
|
|
260
|
+
async installDocumentationModule() {
|
|
261
|
+
this.spinner.start('Installing Documentation team...');
|
|
262
|
+
|
|
263
|
+
const docPath = moduleManager.getModulePath('documentation');
|
|
264
|
+
const destPath = join(this.installDir, 'documentation');
|
|
265
|
+
|
|
266
|
+
if (!existsSync(docPath)) {
|
|
267
|
+
this.spinner.warn('Documentation module not found');
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const result = copyDir(docPath, destPath, {
|
|
272
|
+
filter: (path, name) => !name.startsWith('.'),
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
this.results.copied.push(...result.copied);
|
|
276
|
+
this.results.errors.push(...result.errors);
|
|
277
|
+
|
|
278
|
+
this.spinner.success(`Documentation team installed (${result.copied.length} files)`);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Step 6: Create configuration files
|
|
183
283
|
*/
|
|
184
284
|
async createConfigFiles() {
|
|
185
285
|
this.spinner.start('Creating configuration files...');
|
|
186
286
|
|
|
287
|
+
// Build modules list
|
|
288
|
+
const modules = ['core', 'abm'];
|
|
289
|
+
if (this.config.includeBrainstorm) modules.push('brainstorm');
|
|
290
|
+
if (this.config.includeDocumentation) modules.push('documentation');
|
|
291
|
+
|
|
187
292
|
// Create manifest.yaml
|
|
188
293
|
const manifestPath = join(this.installDir, '_config', 'manifest.yaml');
|
|
189
294
|
const manifest = {
|
|
190
295
|
abm_ks: {
|
|
191
|
-
version: '0.1.0
|
|
296
|
+
version: '0.1.0',
|
|
192
297
|
installed_at: getTimestamp(),
|
|
193
|
-
modules:
|
|
298
|
+
modules: modules,
|
|
194
299
|
},
|
|
195
300
|
project: {
|
|
196
301
|
name: this.config.projectName,
|
|
197
302
|
domain: this.config.domain,
|
|
198
303
|
platform: this.config.platform,
|
|
199
304
|
track: this.config.track,
|
|
305
|
+
template_languages: this.config.templateLanguages || ['python'],
|
|
200
306
|
},
|
|
201
307
|
preferences: {
|
|
202
308
|
experience: this.config.experience,
|
|
203
309
|
generate_odd: this.config.generateODD,
|
|
204
310
|
include_examples: this.config.includeExamples,
|
|
205
311
|
},
|
|
312
|
+
teams: {
|
|
313
|
+
core: true,
|
|
314
|
+
abm: true,
|
|
315
|
+
brainstorm: this.config.includeBrainstorm || false,
|
|
316
|
+
documentation: this.config.includeDocumentation || false,
|
|
317
|
+
},
|
|
206
318
|
};
|
|
207
319
|
|
|
208
320
|
writeYamlFile(manifestPath, manifest, {
|
|
@@ -239,13 +351,26 @@ export class Installer {
|
|
|
239
351
|
}
|
|
240
352
|
|
|
241
353
|
/**
|
|
242
|
-
* Step
|
|
354
|
+
* Step 7: Create workflow status file
|
|
243
355
|
*/
|
|
244
356
|
async createStatusFile() {
|
|
245
357
|
this.spinner.start('Creating workflow status file...');
|
|
246
358
|
|
|
247
359
|
const statusPath = join(this.targetDir, PATHS.statusFile);
|
|
248
360
|
|
|
361
|
+
// Build phases based on installed teams
|
|
362
|
+
const phases = {
|
|
363
|
+
phase_1: { status: 'pending', workflows: {} },
|
|
364
|
+
phase_2: { status: 'pending', workflows: {} },
|
|
365
|
+
phase_3: { status: 'pending', workflows: {} },
|
|
366
|
+
phase_4: { status: 'pending', workflows: {} },
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// Add phase 0 if brainstorming team is included
|
|
370
|
+
if (this.config.includeBrainstorm) {
|
|
371
|
+
phases.phase_0 = { status: 'pending', workflows: {} };
|
|
372
|
+
}
|
|
373
|
+
|
|
249
374
|
const status = {
|
|
250
375
|
project: {
|
|
251
376
|
name: this.config.projectName,
|
|
@@ -255,28 +380,11 @@ export class Installer {
|
|
|
255
380
|
track: this.config.track,
|
|
256
381
|
},
|
|
257
382
|
current: {
|
|
258
|
-
phase: 1,
|
|
383
|
+
phase: this.config.includeBrainstorm ? 0 : 1,
|
|
259
384
|
workflow: null,
|
|
260
385
|
status: 'not_started',
|
|
261
386
|
},
|
|
262
|
-
progress:
|
|
263
|
-
phase_1: {
|
|
264
|
-
status: 'pending',
|
|
265
|
-
workflows: {},
|
|
266
|
-
},
|
|
267
|
-
phase_2: {
|
|
268
|
-
status: 'pending',
|
|
269
|
-
workflows: {},
|
|
270
|
-
},
|
|
271
|
-
phase_3: {
|
|
272
|
-
status: 'pending',
|
|
273
|
-
workflows: {},
|
|
274
|
-
},
|
|
275
|
-
phase_4: {
|
|
276
|
-
status: 'pending',
|
|
277
|
-
workflows: {},
|
|
278
|
-
},
|
|
279
|
-
},
|
|
387
|
+
progress: phases,
|
|
280
388
|
history: [],
|
|
281
389
|
};
|
|
282
390
|
|
|
@@ -289,7 +397,7 @@ export class Installer {
|
|
|
289
397
|
}
|
|
290
398
|
|
|
291
399
|
/**
|
|
292
|
-
* Step
|
|
400
|
+
* Step 8: Configure IDEs
|
|
293
401
|
*/
|
|
294
402
|
async configureIDEs() {
|
|
295
403
|
if (!this.config.ides || this.config.ides.length === 0) {
|
|
@@ -337,6 +445,17 @@ export class Installer {
|
|
|
337
445
|
const rulesDir = join(this.targetDir, '.cursor', 'rules');
|
|
338
446
|
ensureDir(rulesDir);
|
|
339
447
|
|
|
448
|
+
// Build agent paths based on installed teams
|
|
449
|
+
let agentPaths = `- \`_abm-ks/core/agents/\` - Core agents
|
|
450
|
+
- \`_abm-ks/abm/agents/\` - ABM Development agents`;
|
|
451
|
+
|
|
452
|
+
if (this.config.includeBrainstorm) {
|
|
453
|
+
agentPaths += `\n- \`_abm-ks/brainstorm/agents/\` - Brainstorming agents`;
|
|
454
|
+
}
|
|
455
|
+
if (this.config.includeDocumentation) {
|
|
456
|
+
agentPaths += `\n- \`_abm-ks/documentation/agents/\` - Documentation agents`;
|
|
457
|
+
}
|
|
458
|
+
|
|
340
459
|
const rulesContent = `# ABM-KS Agent Rules for Cursor
|
|
341
460
|
# Generated by ABM-KS installer
|
|
342
461
|
|
|
@@ -348,12 +467,11 @@ This is an Agent-Based Model project using ABM-KS framework.
|
|
|
348
467
|
|
|
349
468
|
## Agent Activation
|
|
350
469
|
To activate ABM-KS agents, read the agent files in:
|
|
351
|
-
|
|
352
|
-
- \`_abm-ks/abm/agents/\` - Specialized agents
|
|
470
|
+
${agentPaths}
|
|
353
471
|
|
|
354
472
|
## Workflow Commands
|
|
355
|
-
- \`*
|
|
356
|
-
- \`*
|
|
473
|
+
- \`*init\` - Start/restart project initialization
|
|
474
|
+
- \`*status\` - Check current progress
|
|
357
475
|
- \`*help\` - Show available commands
|
|
358
476
|
|
|
359
477
|
## Status File
|
|
@@ -451,6 +569,17 @@ steps:
|
|
|
451
569
|
}
|
|
452
570
|
logger.outdent();
|
|
453
571
|
|
|
572
|
+
// Build teams list
|
|
573
|
+
let teamsInstalled = 'Core, ABM Development';
|
|
574
|
+
if (this.config.includeBrainstorm) teamsInstalled += ', Brainstorming';
|
|
575
|
+
if (this.config.includeDocumentation) teamsInstalled += ', Documentation';
|
|
576
|
+
|
|
577
|
+
logger.newline();
|
|
578
|
+
logger.subheader('Installed Teams');
|
|
579
|
+
logger.indent();
|
|
580
|
+
logger.bullet(teamsInstalled);
|
|
581
|
+
logger.outdent();
|
|
582
|
+
|
|
454
583
|
logger.newline();
|
|
455
584
|
logger.subheader('Project Structure');
|
|
456
585
|
logger.tree(`${this.config.projectName}/`);
|
|
@@ -459,6 +588,8 @@ steps:
|
|
|
459
588
|
logger.indent();
|
|
460
589
|
logger.tree('core/agents/', false);
|
|
461
590
|
logger.tree('abm/workflows/', false);
|
|
591
|
+
if (this.config.includeBrainstorm) logger.tree('brainstorm/', false);
|
|
592
|
+
if (this.config.includeDocumentation) logger.tree('documentation/', false);
|
|
462
593
|
logger.tree('_config/', true);
|
|
463
594
|
logger.outdent();
|
|
464
595
|
logger.tree('docs/', false);
|
|
@@ -471,7 +602,7 @@ steps:
|
|
|
471
602
|
logger.indent();
|
|
472
603
|
logger.arrow('Open your AI IDE (Cursor, Claude Code, etc.)');
|
|
473
604
|
logger.arrow('Activate the ABM Master agent');
|
|
474
|
-
logger.arrow('Run `*
|
|
605
|
+
logger.arrow('Run `*init` to start your project');
|
|
475
606
|
logger.outdent();
|
|
476
607
|
|
|
477
608
|
logger.newline();
|