@christianmaf80/agentic-workflow 1.11.0-beta.1 → 1.13.0-beta.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/bin/cli.js CHANGED
@@ -15,7 +15,9 @@ program
15
15
  program
16
16
  .command('init')
17
17
  .description('Initialize the agentic system in the current directory')
18
- .action(initCommand);
18
+ .option('--non-interactive', 'Run without prompts (assume YES)')
19
+ .option('--bootstrap', 'Install bootstrap bundle if available')
20
+ .action((options) => initCommand(options));
19
21
 
20
22
  program
21
23
  .command('create')
@@ -4,16 +4,20 @@ import path from 'node:path';
4
4
  import { detectAgentSystem } from '../../core/migration/detector.js';
5
5
  import { resolveCorePath, resolveInstalledCorePath } from '../../core/mapping/resolver.js';
6
6
  import { performBackup } from '../../core/utils/backup.js';
7
- export async function initCommand() {
7
+ export async function initCommand(options = {}) {
8
8
  intro('Agentic Workflow Initialization');
9
9
  const cwd = process.cwd();
10
10
  const agentDir = path.join(cwd, '.agent');
11
+ const nonInteractive = Boolean(options.nonInteractive);
12
+ const useBootstrap = Boolean(options.bootstrap);
11
13
  // 1. Existing System Detection
12
14
  const systemType = await detectAgentSystem(cwd);
13
15
  if (systemType === 'legacy') {
14
- const shouldUpdate = await confirm({
15
- message: 'A legacy .agent system has been detected. Do you want to migrate it to the latest portable version?',
16
- });
16
+ const shouldUpdate = nonInteractive
17
+ ? true
18
+ : await confirm({
19
+ message: 'A legacy .agent system has been detected. Do you want to migrate it to the latest portable version?',
20
+ });
17
21
  if (!shouldUpdate || typeof shouldUpdate === 'symbol') {
18
22
  outro('Initialization cancelled by user.');
19
23
  return;
@@ -30,9 +34,11 @@ export async function initCommand() {
30
34
  }
31
35
  else if (systemType === 'current') {
32
36
  note('The system is already updated to the latest version.', 'Information');
33
- const reinit = await confirm({
34
- message: 'Do you want to force a re-initialization by reference? (A backup will be created)',
35
- });
37
+ const reinit = nonInteractive
38
+ ? true
39
+ : await confirm({
40
+ message: 'Do you want to force a re-initialization by reference? (A backup will be created)',
41
+ });
36
42
  if (!reinit || typeof reinit === 'symbol') {
37
43
  outro('Process finished.');
38
44
  return;
@@ -56,8 +62,12 @@ export async function initCommand() {
56
62
  await fs.rm(agentDir, { recursive: true, force: true });
57
63
  await fs.mkdir(agentDir, { recursive: true });
58
64
  await copyCoreToAgent(corePath, agentDir);
65
+ if (useBootstrap) {
66
+ await copyBootstrap(corePath, agentDir);
67
+ }
59
68
  s.stop('Configuration complete.');
60
- note(`Core located at: ${corePath}\nCore files installed into .agent.`, 'Installed');
69
+ const bootstrapNote = useBootstrap ? '\nBootstrap bundle installed into .agent.' : '';
70
+ note(`Core located at: ${corePath}\nCore files installed into .agent.${bootstrapNote}`, 'Installed');
61
71
  outro('Agentic System initialized successfully.');
62
72
  }
63
73
  catch (error) {
@@ -103,3 +113,13 @@ async function copyCoreToAgent(corePath, agentDir) {
103
113
  }
104
114
  }
105
115
  }
116
+ async function copyBootstrap(corePath, agentDir) {
117
+ const srcPath = path.join(corePath, 'bootstrap.md');
118
+ const destPath = path.join(agentDir, 'bootstrap.md');
119
+ try {
120
+ await fs.copyFile(srcPath, destPath);
121
+ }
122
+ catch {
123
+ // Ignore if bootstrap doesn't exist.
124
+ }
125
+ }
@@ -15,16 +15,15 @@ por alias en lugar de rutas directas.
15
15
 
16
16
  ## Aliases (YAML)
17
17
  ```yaml
18
- rules:
19
- constitution:
20
- GEMINI_location: .agent/rules/constitution/GEMINI.location.md
21
- extensio_architecture: .agent/rules/constitution/extensio-architecture.md
22
- clean_code: .agent/rules/constitution/clean-code.md
23
- drivers: .agent/rules/constitution/drivers.md
24
- modules: .agent/rules/constitution/modules.md
25
- shards: .agent/rules/constitution/shards.md
26
- pages: .agent/rules/constitution/pages.md
27
- agents_behavior: .agent/rules/constitution/agents-behavior.md
18
+ constitution:
19
+ GEMINI_location: .agent/rules/constitution/GEMINI.location.md
20
+ extensio_architecture: .agent/rules/constitution/extensio-architecture.md
21
+ clean_code: .agent/rules/constitution/clean-code.md
22
+ drivers: .agent/rules/constitution/drivers.md
23
+ modules: .agent/rules/constitution/modules.md
24
+ shards: .agent/rules/constitution/shards.md
25
+ pages: .agent/rules/constitution/pages.md
26
+ agents_behavior: .agent/rules/constitution/agents-behavior.md
28
27
  ```
29
28
 
30
29
  ## Reglas
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Workflow obligatorio de setup: verifica GEMINI.md, carga constitutions (GEMINI.location, extensio-architecture, clean-code), define el idioma de conversación y selecciona la estrategia Long/Short.
2
+ description: Workflow obligatorio de setup: verifica GEMINI.location, carga constitutions (GEMINI.location, extensio-architecture, clean-code), define el idioma de conversación y selecciona la estrategia Long/Short.
3
3
  ---
4
4
 
5
5
  ---
@@ -8,14 +8,15 @@ owner: architect-agent
8
8
  version: 4.0.0
9
9
  severity: PERMANENT
10
10
  trigger:
11
- commands: ["init", "/init"]
11
+ commands: ["init", "/init", "/agentic-init"]
12
12
  blocking: true
13
13
  ---
14
14
 
15
15
  # WORKFLOW: init
16
16
 
17
17
  ## Input (REQUIRED)
18
- - Comando del desarrollador: `init`
18
+ - Comando del desarrollador: `init` o `/agentic-init`
19
+ - Si se desea usar el bundle opcional: `--bootstrap`
19
20
 
20
21
  ## Objetivo (ONLY)
21
22
  - Activar el rol **architect-agent**.
@@ -54,9 +55,9 @@ El agente **DEBE** adherirse a estas meta-reglas de comportamiento durante TODA
54
55
  2. Cargar índices mínimos (OBLIGATORIO):
55
56
  - Antes de continuar, revisar `.agent/index.md` para comprender dominios, indices y alias.
56
57
  - Bootstrap por ruta directa (hardcodeado y único permitido):
57
- - `.agent/index.md`
58
- 2) `agent.domains.rules.index`
59
- 3) `rules.constitution.index`
58
+ 1) `.agent/index.md`
59
+ 2) `agent.domains.rules.index`
60
+ 3) `rules.constitution.index`
60
61
  - Si alguna falla → FAIL.
61
62
 
62
63
  3. Cargar en contexto las constitutions (en orden):
@@ -64,7 +64,7 @@ aliases:
64
64
  - El artefacto `init` **DEBE** contener en su bloque YAML:
65
65
  - `language.value` no vacío
66
66
  - `language.confirmed == true`
67
- - El desarrollador **DEBE haber respondido** a la pregunta de la **Sección 8 del workflow `init`**:
67
+ - El desarrollador **DEBE haber respondido** a la pregunta del **Paso 10 (PASS) del workflow `init`**:
68
68
  - definición de la tarea
69
69
  - objetivo de la tarea
70
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianmaf80/agentic-workflow",
3
- "version": "1.11.0-beta.1",
3
+ "version": "1.13.0-beta.1",
4
4
  "description": "Portable agentic workflow orchestration system with strict identity and gate discipline",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,6 +15,7 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "node scripts/clean-dist.mjs && tsc && npm run copy-assets",
18
+ "build:bootstrap": "node scripts/build-bootstrap.mjs",
18
19
  "copy-assets": "cp -r src/rules src/workflows src/templates src/artifacts src/skills src/tools src/todo src/metrics dist/ && cp src/index.md dist/index.md",
19
20
  "start": "node dist/index.js",
20
21
  "publish:npm": "npm publish --registry https://registry.npmjs.org --access public",