aios-core 4.0.2 → 4.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.
Files changed (111) hide show
  1. package/.aios-core/cli/commands/migrate/analyze.js +6 -6
  2. package/.aios-core/cli/commands/migrate/backup.js +2 -2
  3. package/.aios-core/cli/commands/migrate/execute.js +4 -4
  4. package/.aios-core/cli/commands/migrate/index.js +5 -5
  5. package/.aios-core/cli/commands/migrate/rollback.js +6 -6
  6. package/.aios-core/cli/commands/migrate/update-imports.js +2 -2
  7. package/.aios-core/cli/commands/migrate/validate.js +2 -2
  8. package/.aios-core/cli/commands/pro/index.js +52 -0
  9. package/.aios-core/cli/index.js +1 -1
  10. package/.aios-core/core/ids/registry-updater.js +29 -3
  11. package/.aios-core/core/migration/migration-config.yaml +2 -2
  12. package/.aios-core/core/migration/module-mapping.yaml +2 -2
  13. package/.aios-core/core/registry/README.md +2 -2
  14. package/.aios-core/core/synapse/context/context-builder.js +34 -0
  15. package/.aios-core/core/synapse/diagnostics/collectors/consistency-collector.js +168 -0
  16. package/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +129 -0
  17. package/.aios-core/core/synapse/diagnostics/collectors/manifest-collector.js +82 -0
  18. package/.aios-core/core/synapse/diagnostics/collectors/output-analyzer.js +134 -0
  19. package/.aios-core/core/synapse/diagnostics/collectors/pipeline-collector.js +75 -0
  20. package/.aios-core/core/synapse/diagnostics/collectors/quality-collector.js +252 -0
  21. package/.aios-core/core/synapse/diagnostics/collectors/relevance-matrix.js +174 -0
  22. package/.aios-core/core/synapse/diagnostics/collectors/safe-read-json.js +31 -0
  23. package/.aios-core/core/synapse/diagnostics/collectors/session-collector.js +102 -0
  24. package/.aios-core/core/synapse/diagnostics/collectors/timing-collector.js +126 -0
  25. package/.aios-core/core/synapse/diagnostics/collectors/uap-collector.js +83 -0
  26. package/.aios-core/core/synapse/diagnostics/report-formatter.js +484 -0
  27. package/.aios-core/core/synapse/diagnostics/synapse-diagnostics.js +95 -0
  28. package/.aios-core/core/synapse/engine.js +73 -20
  29. package/.aios-core/core/synapse/runtime/hook-runtime.js +60 -0
  30. package/.aios-core/core-config.yaml +6 -0
  31. package/.aios-core/data/agent-config-requirements.yaml +2 -2
  32. package/.aios-core/data/aios-kb.md +4 -4
  33. package/.aios-core/data/entity-registry.yaml +5 -5
  34. package/.aios-core/development/agents/architect.md +10 -10
  35. package/.aios-core/development/agents/devops.md +93 -50
  36. package/.aios-core/development/agents/qa.md +94 -40
  37. package/.aios-core/development/agents/ux-design-expert.md +25 -25
  38. package/.aios-core/development/scripts/activation-runtime.js +63 -0
  39. package/.aios-core/development/scripts/generate-greeting.js +9 -8
  40. package/.aios-core/development/scripts/unified-activation-pipeline.js +102 -2
  41. package/.aios-core/development/tasks/{db-expansion-pack-integration.md → db-squad-integration.md} +5 -5
  42. package/.aios-core/development/tasks/{integrate-expansion-pack.md → integrate-squad.md} +2 -2
  43. package/.aios-core/development/tasks/next.md +3 -3
  44. package/.aios-core/development/tasks/pr-automation.md +2 -2
  45. package/.aios-core/development/tasks/publish-npm.md +257 -0
  46. package/.aios-core/development/tasks/release-management.md +4 -4
  47. package/.aios-core/development/tasks/setup-github.md +1 -1
  48. package/.aios-core/development/tasks/squad-creator-migrate.md +1 -1
  49. package/.aios-core/development/tasks/squad-creator-sync-ide-command.md +14 -14
  50. package/.aios-core/development/tasks/update-aios.md +1 -1
  51. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +1 -1
  52. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +5 -5
  53. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +21 -21
  54. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +25 -25
  55. package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +4 -4
  56. package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +3 -3
  57. package/.aios-core/docs/standards/STANDARDS-INDEX.md +13 -13
  58. package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +1 -1
  59. package/.aios-core/framework-config.yaml +4 -0
  60. package/.aios-core/infrastructure/scripts/codex-skills-sync/index.js +182 -0
  61. package/.aios-core/infrastructure/scripts/codex-skills-sync/validate.js +172 -0
  62. package/.aios-core/infrastructure/scripts/ide-sync/README.md +14 -0
  63. package/.aios-core/infrastructure/scripts/ide-sync/index.js +6 -0
  64. package/.aios-core/infrastructure/scripts/tool-resolver.js +4 -4
  65. package/.aios-core/infrastructure/scripts/validate-paths.js +142 -0
  66. package/.aios-core/infrastructure/templates/aios-sync.yaml.template +11 -11
  67. package/.aios-core/infrastructure/templates/github-workflows/README.md +1 -1
  68. package/.aios-core/install-manifest.yaml +190 -106
  69. package/.aios-core/local-config.yaml.template +2 -0
  70. package/.aios-core/product/README.md +2 -2
  71. package/.aios-core/product/data/integration-patterns.md +1 -1
  72. package/.aios-core/product/templates/ide-rules/cline-rules.md +1 -1
  73. package/.aios-core/product/templates/ide-rules/codex-rules.md +65 -0
  74. package/.aios-core/product/templates/ide-rules/copilot-rules.md +1 -1
  75. package/.aios-core/product/templates/ide-rules/roo-rules.md +1 -1
  76. package/.aios-core/user-guide.md +15 -14
  77. package/.aios-core/workflow-intelligence/engine/output-formatter.js +1 -1
  78. package/.claude/hooks/enforce-architecture-first.py +196 -0
  79. package/.claude/hooks/install-hooks.sh +41 -0
  80. package/.claude/hooks/mind-clone-governance.py +192 -0
  81. package/.claude/hooks/pre-commit-mmos-guard.sh +99 -0
  82. package/.claude/hooks/pre-commit-version-check.sh +156 -0
  83. package/.claude/hooks/read-protection.py +151 -0
  84. package/.claude/hooks/slug-validation.py +176 -0
  85. package/.claude/hooks/sql-governance.py +182 -0
  86. package/.claude/hooks/synapse-engine.js +9 -20
  87. package/.claude/hooks/write-path-validation.py +194 -0
  88. package/README.md +44 -14
  89. package/bin/aios-init.js +255 -184
  90. package/bin/aios-minimal.js +2 -2
  91. package/bin/aios.js +19 -19
  92. package/package.json +7 -4
  93. package/packages/aios-pro-cli/bin/aios-pro.js +75 -2
  94. package/packages/aios-pro-cli/package.json +5 -1
  95. package/packages/aios-pro-cli/src/recover.js +100 -0
  96. package/packages/installer/src/__tests__/performance-benchmark.js +382 -0
  97. package/packages/installer/src/config/ide-configs.js +12 -1
  98. package/packages/installer/src/config/templates/core-config-template.js +2 -2
  99. package/packages/installer/src/installer/aios-core-installer.js +2 -2
  100. package/packages/installer/src/installer/file-hasher.js +97 -0
  101. package/packages/installer/src/installer/post-install-validator.js +41 -1
  102. package/packages/installer/src/pro/pro-scaffolder.js +335 -0
  103. package/packages/installer/src/utils/aios-colors.js +2 -2
  104. package/packages/installer/src/wizard/feedback.js +1 -1
  105. package/packages/installer/src/wizard/ide-config-generator.js +2 -2
  106. package/packages/installer/src/wizard/index.js +58 -19
  107. package/packages/installer/src/wizard/pro-setup.js +547 -0
  108. package/packages/installer/src/wizard/questions.js +20 -14
  109. package/packages/installer/src/wizard/validators.js +1 -1
  110. package/scripts/package-synapse.js +323 -0
  111. package/scripts/validate-package-completeness.js +317 -0
@@ -0,0 +1,257 @@
1
+ ---
2
+ id: publish-npm
3
+ name: npm Publishing Pipeline (Preview to Latest)
4
+ agent: devops
5
+ category: release
6
+ complexity: high
7
+ tools:
8
+ - github-cli
9
+ - git
10
+ checklists:
11
+ - release-checklist.md
12
+ ---
13
+
14
+ # npm Publishing Pipeline: Preview to Latest
15
+
16
+ ## Purpose
17
+
18
+ Safe, validated npm publishing using a two-phase release strategy:
19
+ 1. **Preview**: Publish to `preview` dist-tag for testing
20
+ 2. **Promote**: After validation, promote `preview` to `latest`
21
+
22
+ This prevents broken releases reaching users (like v4.0.0-v4.0.4 incident).
23
+
24
+ ## Commands
25
+
26
+ ### `*publish-preview` - Publish as Preview
27
+
28
+ Publishes a new version to npm under the `preview` dist-tag.
29
+
30
+ #### Workflow
31
+
32
+ ```
33
+ 1. PRE-FLIGHT CHECKS
34
+ - Verify: branch = main, working tree clean
35
+ - Verify: git is up-to-date with remote (git fetch + compare)
36
+
37
+ 2. QUALITY GATES
38
+ - npm run lint
39
+ - npm run typecheck
40
+ - npm test
41
+
42
+ 3. PACKAGE VALIDATION
43
+ - npm run validate:package
44
+ (runs scripts/validate-package-completeness.js)
45
+ - Confirms: hooks, rules, bin, core config present
46
+ - Confirms: pro/ NOT in tarball
47
+
48
+ 4. VERSION BUMP
49
+ - Ask user: patch | minor | major
50
+ - npm version {type} --no-git-tag-version
51
+ - git add package.json package-lock.json
52
+ - git commit -m "chore(release): bump version to {new_version}"
53
+
54
+ 5. PUBLISH
55
+ - npm publish --tag preview
56
+ - Verify: npm view aios-core@preview version === {new_version}
57
+
58
+ 6. SMOKE TEST
59
+ - Create temp directory
60
+ - npm init -y
61
+ - npm install aios-core@preview
62
+ - Verify critical files exist in node_modules/aios-core/:
63
+ - .claude/hooks/synapse-engine.js
64
+ - .aios-core/core-config.yaml
65
+ - bin/aios.js
66
+ - Clean up temp directory
67
+
68
+ 7. PUSH VERSION COMMIT
69
+ - git push origin main
70
+
71
+ 8. REPORT
72
+ - "v{X.Y.Z} published as preview"
73
+ - "Test with: npm install aios-core@preview"
74
+ - "When ready: *promote-latest"
75
+ ```
76
+
77
+ #### Pre-conditions
78
+
79
+ - [ ] On `main` branch
80
+ - [ ] Working tree clean (no uncommitted changes)
81
+ - [ ] All quality gates pass (lint, typecheck, test)
82
+ - [ ] Package validation passes (validate-package-completeness.js)
83
+ - [ ] npm auth configured (`npm whoami` succeeds)
84
+
85
+ #### Post-conditions
86
+
87
+ - [ ] New version published to npm with `preview` tag
88
+ - [ ] `npm view aios-core@preview` returns new version
89
+ - [ ] Smoke test passes (critical files present in installed package)
90
+ - [ ] Version bump committed and pushed to main
91
+
92
+ ---
93
+
94
+ ### `*promote-latest` - Promote Preview to Latest
95
+
96
+ Promotes a tested `preview` version to the `latest` dist-tag.
97
+
98
+ #### Workflow
99
+
100
+ ```
101
+ 1. VERIFY PREVIEW EXISTS
102
+ - npm view aios-core@preview version
103
+ - If no preview: HALT with "No preview version found"
104
+
105
+ 2. CONFIRM WITH USER
106
+ - Display: "Promote v{X.Y.Z} from preview to latest?"
107
+ - Show current latest: npm view aios-core@latest version
108
+ - Require explicit confirmation
109
+
110
+ 3. PROMOTE
111
+ - npm dist-tag add aios-core@{version} latest
112
+
113
+ 4. VERIFY
114
+ - npm view aios-core@latest version === {version}
115
+ - If mismatch: HALT with error
116
+
117
+ 5. TAG & RELEASE
118
+ - git tag v{version}
119
+ - git push origin v{version}
120
+ - gh release create v{version} --generate-notes --latest
121
+
122
+ 6. REPORT
123
+ - "v{X.Y.Z} promoted to latest"
124
+ - Release URL
125
+ - "Install with: npm install aios-core"
126
+ ```
127
+
128
+ #### Pre-conditions
129
+
130
+ - [ ] Preview version exists (`npm view aios-core@preview`)
131
+ - [ ] User has tested the preview version
132
+ - [ ] npm auth configured
133
+ - [ ] GitHub CLI authenticated (`gh auth status`)
134
+
135
+ #### Post-conditions
136
+
137
+ - [ ] `npm view aios-core@latest` returns promoted version
138
+ - [ ] Git tag `v{version}` created and pushed
139
+ - [ ] GitHub Release created with auto-generated notes
140
+
141
+ ---
142
+
143
+ ### `*test-install` - Test Installation in Clean Environment
144
+
145
+ Tests package installation from a specific dist-tag in a clean temporary directory.
146
+
147
+ #### Workflow
148
+
149
+ ```
150
+ 1. SETUP
151
+ - Create temporary directory
152
+ - npm init -y
153
+
154
+ 2. INSTALL
155
+ - npm install aios-core@{tag} (default: latest)
156
+ - Record: install time, exit code, warnings
157
+
158
+ 3. VERIFY FILES
159
+ - Check node_modules/aios-core/ contains:
160
+ - .aios-core/core-config.yaml
161
+ - .aios-core/constitution.md
162
+ - .aios-core/development/agents/ (non-empty)
163
+ - .aios-core/development/tasks/ (non-empty)
164
+ - .claude/hooks/synapse-engine.js
165
+ - .claude/hooks/precompact-session-digest.js
166
+ - .claude/rules/ (non-empty)
167
+ - bin/aios.js
168
+ - bin/aios-minimal.js
169
+ - Check node_modules/aios-core/ does NOT contain:
170
+ - pro/
171
+ - .env
172
+ - .git/
173
+ - tests/
174
+
175
+ 4. TEST INSTALLER (optional, if --full flag)
176
+ - npx aios-core install --preset minimal
177
+ - Verify: .aios-core/ created
178
+ - Verify: .claude/hooks/ created
179
+ - Verify: .claude/rules/ created
180
+
181
+ 5. CLEANUP
182
+ - Remove temporary directory
183
+
184
+ 6. REPORT
185
+ - Package version installed
186
+ - All critical files: present/missing
187
+ - Excluded content: clean/leaked
188
+ - Overall: PASS/FAIL
189
+ ```
190
+
191
+ #### Parameters
192
+
193
+ - `tag`: dist-tag to test (default: `latest`)
194
+ - `--full`: Also test `npx aios-core install`
195
+
196
+ ---
197
+
198
+ ## Rollback Procedure
199
+
200
+ If a broken version reaches `latest`:
201
+
202
+ ```bash
203
+ # 1. Identify previous good version
204
+ npm view aios-core versions --json
205
+
206
+ # 2. Point latest back to previous version
207
+ npm dist-tag add aios-core@{previous-good-version} latest
208
+
209
+ # 3. Deprecate broken version with message
210
+ npm deprecate aios-core@{broken-version} "Known issues, use v{previous-good-version}"
211
+
212
+ # 4. Verify
213
+ npm view aios-core@latest version
214
+ ```
215
+
216
+ **Important:** `npm deprecate` shows a warning on install but does NOT prevent installation.
217
+ To fully block a version, use `npm unpublish aios-core@{version}` (within 72h of publish only).
218
+
219
+ ---
220
+
221
+ ## Configuration Reference
222
+
223
+ See `core-config.yaml` section `npm_registry` for:
224
+ - Required files list
225
+ - Excluded paths list
226
+ - Smoke test configuration
227
+ - Auth strategy
228
+
229
+ ---
230
+
231
+ ## Error Handling
232
+
233
+ | Error | Cause | Resolution |
234
+ |-------|-------|------------|
235
+ | `npm ERR! 403` | Auth issue | Run `npm login`, check token permissions |
236
+ | `npm ERR! 402` | Paid feature | Ensure package is public (`--access public`) |
237
+ | Smoke test fails | Files missing from tarball | Fix `files` array in package.json, re-validate |
238
+ | promote fails | Version not on preview | Run `*publish-preview` first |
239
+ | Tag already exists | Re-publishing same version | Bump version or use `--force` (with caution) |
240
+
241
+ ---
242
+
243
+ ## Metadata
244
+
245
+ ```yaml
246
+ story: INS-2 (Release Pipeline: Preview to Latest)
247
+ version: 1.0.0
248
+ dependencies:
249
+ - release-management.md
250
+ - github-devops-pre-push-quality-gate.md
251
+ tags:
252
+ - npm
253
+ - release
254
+ - publishing
255
+ - preview
256
+ created: 2026-02-13
257
+ ```
@@ -77,14 +77,14 @@ To automate the complete software release process, including:
77
77
 
78
78
  - **git_tag**: `string`
79
79
  - **Description**: Git tag created
80
- - **Example**: `"v2.1.3"`
80
+ - **Example**: `"v4.0.4.3"`
81
81
 
82
82
  - **changelog**: `string`
83
83
  - **Description**: Generated CHANGELOG.md content for this release
84
84
 
85
85
  - **release_url**: `string`
86
86
  - **Description**: URL to GitHub/GitLab Release
87
- - **Example**: `"https://github.com/user/repo/releases/tag/v2.1.3"`
87
+ - **Example**: `"https://github.com/user/repo/releases/tag/v4.0.4.3"`
88
88
 
89
89
  - **published_packages**: `array<object>`
90
90
  - **Description**: Published packages with URLs
@@ -120,8 +120,8 @@ To automate the complete software release process, including:
120
120
  ```
121
121
 
122
122
  3. **Analyze Commits Since Last Release**
123
- - Get last version tag (e.g., `v2.1.2`)
124
- - Get commits since last tag: `git log v2.1.2..HEAD`
123
+ - Get last version tag (e.g., `v4.0.4.2`)
124
+ - Get commits since last tag: `git log v4.0.4.2..HEAD`
125
125
  - Parse commit messages (Conventional Commits)
126
126
 
127
127
  4. **Determine Version Bump**
@@ -866,7 +866,7 @@ Write-Host "✅ Setup report saved to .aios/devops-setup-report.yaml"
866
866
  - [GitHub Actions Documentation](https://docs.github.com/en/actions)
867
867
  - [GitHub Branch Protection API](https://docs.github.com/en/rest/branches/branch-protection)
868
868
  - [CodeRabbit Documentation](https://docs.coderabbit.ai/)
869
- - [Story 5.10 - GitHub DevOps Setup](docs/stories/v2.1/sprint-5/story-5.10-github-devops-user-projects.md)
869
+ - [Story 5.10 - GitHub DevOps Setup](docs/stories/v4.0.4/sprint-5/story-5.10-github-devops-user-projects.md)
870
870
 
871
871
  ---
872
872
 
@@ -37,7 +37,7 @@ Migrates legacy squad formats to AIOS 2.1 standard.
37
37
  # Migrate with detailed output
38
38
  *migrate-squad ./squads/my-squad --verbose
39
39
 
40
- # Migrate expansion pack
40
+ # Migrate squad
41
41
  *migrate-squad ./expansion-packs/my-pack --verbose
42
42
  ```
43
43
 
@@ -122,7 +122,7 @@ active_ides:
122
122
  # - gemini # .gemini/
123
123
 
124
124
  # Mapeamento de diretório → prefixo de comando
125
- pack_aliases:
125
+ squad_aliases:
126
126
  legal: Legal
127
127
  copy: Copy
128
128
  hr: HR
@@ -134,7 +134,7 @@ sync_mappings:
134
134
  source: 'squads/*/agents/'
135
135
  destinations:
136
136
  claude:
137
- - path: '.claude/commands/{pack}/agents/'
137
+ - path: '.claude/commands/{squad_alias}/agents/'
138
138
  format: 'md'
139
139
  cursor:
140
140
  - path: '.cursor/rules/'
@@ -142,9 +142,9 @@ sync_mappings:
142
142
  wrapper: 'cursor-rule'
143
143
  ```
144
144
 
145
- ### Pack Aliases
145
+ ### Squad Aliases
146
146
 
147
- O `pack_aliases` mapeia o nome do diretório do squad para o prefixo usado nos comandos:
147
+ O `squad_aliases` mapeia o nome do diretório do squad para o prefixo usado nos comandos:
148
148
 
149
149
  | Diretório | Alias | Comando Claude |
150
150
  | --------------- | ------- | --------------------------- |
@@ -163,7 +163,7 @@ O `pack_aliases` mapeia o nome do diretório do squad para o prefixo usado nos c
163
163
  │ ↓ │
164
164
  │ 2. Load .aios-sync.yaml │
165
165
  │ ↓ (not found → create default) │
166
- │ 3. Resolve pack alias
166
+ │ 3. Resolve squad alias
167
167
  │ ↓ │
168
168
  │ 4. Locate source files in squads/ │
169
169
  │ ↓ (not found → error) │
@@ -243,7 +243,7 @@ A description é extraída de:
243
243
  Sincroniza um arquivo de agent:
244
244
 
245
245
  - Source: `squads/{squad}/agents/{name}.md`
246
- - Claude: `.claude/commands/{Pack}/agents/{name}.md`
246
+ - Claude: `.claude/commands/{SquadAlias}/agents/{name}.md`
247
247
  - Cursor: `.cursor/rules/{name}.mdc`
248
248
 
249
249
  ### Task (`*command task {name}`)
@@ -251,14 +251,14 @@ Sincroniza um arquivo de agent:
251
251
  Sincroniza um arquivo de task:
252
252
 
253
253
  - Source: `squads/{squad}/tasks/{name}.md`
254
- - Claude: `.claude/commands/{Pack}/tasks/{name}.md`
254
+ - Claude: `.claude/commands/{SquadAlias}/tasks/{name}.md`
255
255
 
256
256
  ### Workflow (`*command workflow {name}`)
257
257
 
258
258
  Sincroniza um arquivo de workflow:
259
259
 
260
260
  - Source: `squads/{squad}/workflows/{name}.yaml`
261
- - Claude: `.claude/commands/{Pack}/workflows/{name}.yaml`
261
+ - Claude: `.claude/commands/{SquadAlias}/workflows/{name}.yaml`
262
262
 
263
263
  ### Squad (`*command squad {name}`)
264
264
 
@@ -276,7 +276,7 @@ Sincroniza TODOS os componentes de um squad:
276
276
  | Error | Causa | Solução |
277
277
  | ---------------------- | ------------------------------- | --------------------------- |
278
278
  | `Source not found` | Arquivo não existe em squads/ | Verifique o nome e tipo |
279
- | `Pack alias not found` | Squad não está em pack_aliases | Adicione ao .aios-sync.yaml |
279
+ | `Squad alias not found` | Squad não está em squad_aliases | Adicione ao .aios-sync.yaml |
280
280
  | `File exists` | Destino já existe | Use --force ou escolha ação |
281
281
  | `IDE not active` | IDE não está em active_ides | Ative no .aios-sync.yaml |
282
282
  | `Invalid YAML` | Arquivo fonte com YAML inválido | Corrija o arquivo fonte |
@@ -300,7 +300,7 @@ if (!validTypes.includes(type)) {
300
300
  // 3. Carregar configuração
301
301
  const syncConfig = loadYaml('.aios-sync.yaml');
302
302
  const activeIdes = syncConfig.active_ides || ['claude'];
303
- const packAliases = syncConfig.pack_aliases || {};
303
+ const squadAliases = syncConfig.squad_aliases || syncConfig.pack_aliases || {};
304
304
 
305
305
  // 4. Localizar source
306
306
  let sourceFiles = [];
@@ -317,14 +317,14 @@ if (type === 'squad') {
317
317
  sourceFiles = [sourceFile];
318
318
  }
319
319
 
320
- // 5. Determinar pack alias
320
+ // 5. Determinar squad alias
321
321
  const squadName = extractSquadName(sourceFiles[0]);
322
- const packAlias = packAliases[squadName] || capitalize(squadName);
322
+ const squadAlias = squadAliases[squadName] || capitalize(squadName);
323
323
 
324
324
  // 6. Verificar existentes
325
325
  for (const file of sourceFiles) {
326
326
  for (const ide of activeIdes) {
327
- const destPath = getDestPath(ide, packAlias, file);
327
+ const destPath = getDestPath(ide, squadAlias, file);
328
328
  if (fs.existsSync(destPath) && !flags.force) {
329
329
  const action = await askUser(`${destPath} exists. Overwrite?`);
330
330
  if (action === 'skip') continue;
@@ -337,7 +337,7 @@ if (flags.dryRun) {
337
337
  output('DRY RUN - Would sync:');
338
338
  for (const file of sourceFiles) {
339
339
  for (const ide of activeIdes) {
340
- output(` ${file} → ${getDestPath(ide, packAlias, file)}`);
340
+ output(` ${file} → ${getDestPath(ide, squadAlias, file)}`);
341
341
  }
342
342
  }
343
343
  return;
@@ -146,6 +146,6 @@ git checkout -- .aios-core/
146
146
  | Version | Date | Changes |
147
147
  |---------|------|---------|
148
148
  | 4.0.0 | 2026-01-31 | **SIMPLIFIED:** Git-native approach, 15-line bash script replaces 847-line JS |
149
- | 3.1.0 | 2026-01-30 | Dynamic protection for expansion pack commands |
149
+ | 3.1.0 | 2026-01-30 | Dynamic protection for squad commands |
150
150
  | 3.0.0 | 2026-01-29 | YOLO mode with rsync |
151
151
  | 1.0.0 | 2026-01-29 | Initial version (verbose, interactive) |
@@ -68,7 +68,7 @@ console.log(status.tip('Press Enter to continue'));
68
68
 
69
69
  ### Welcome Screen
70
70
  ```javascript
71
- console.log(headings.h1('🎉 Welcome to AIOS v2.1 Installer!'));
71
+ console.log(headings.h1('🎉 Welcome to AIOS v4.0.4 Installer!'));
72
72
  console.log(colors.info('Let\'s configure your project...\n'));
73
73
  ```
74
74
 
@@ -1,4 +1,4 @@
1
- # AIOS Color Palette v2.1
1
+ # AIOS Color Palette v4.0.4
2
2
 
3
3
  **Version:** 2.1.0
4
4
  **Created:** 2025-01-20
@@ -66,7 +66,7 @@ For special effects, animations, and branding moments:
66
66
  ```javascript
67
67
  const chalk = require('chalk');
68
68
 
69
- // AIOS Color Palette v2.1
69
+ // AIOS Color Palette v4.0.4
70
70
  const colors = {
71
71
  // Core Brand Colors
72
72
  primary: chalk.hex('#8B5CF6'), // ClickUp-inspired purple
@@ -162,7 +162,7 @@ module.exports = {
162
162
  - Example: Welcome screens, major section headers
163
163
 
164
164
  ```javascript
165
- console.log(colors.brandPrimary('🎉 AIOS v2.1 Installer'));
165
+ console.log(colors.brandPrimary('🎉 AIOS v4.0.4 Installer'));
166
166
  ```
167
167
 
168
168
  **Level 2: Primary Content**
@@ -193,7 +193,7 @@ console.log(colors.info('💡 Tip: You can change this later'));
193
193
  **Installer & Wizards:**
194
194
  ```javascript
195
195
  // Welcome
196
- console.log(colors.brandPrimary('\n🎉 Welcome to AIOS v2.1\n'));
196
+ console.log(colors.brandPrimary('\n🎉 Welcome to AIOS v4.0.4\n'));
197
197
  console.log(colors.info('Let\'s get your project set up...\n'));
198
198
 
199
199
  // Questions
@@ -341,7 +341,7 @@ For future design system integration:
341
341
  ## 🔗 Related Documents
342
342
 
343
343
  - [AIOS-LIVRO-DE-OURO-V2.1](./AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md) - Complete AIOS standards
344
- - [Story 1.2](../stories/v2.1/sprint-1/story-1.2-interactive-wizard-foundation.md) - Interactive Wizard (first implementation)
344
+ - [Story 1.2](../stories/v4.0.4/sprint-1/story-1.2-interactive-wizard-foundation.md) - Interactive Wizard (first implementation)
345
345
  - [ClickUp Brand Guidelines](https://clickup.com/brand) - Primary color reference
346
346
 
347
347
  ---
@@ -1,4 +1,4 @@
1
- # AIOS Framework - Livro de Ouro v2.1 (Complete)
1
+ # AIOS Framework - Livro de Ouro v4.0.4 (Complete)
2
2
 
3
3
  ## O Sistema Operacional Definitivo para Orquestração de Agentes IA
4
4
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  ## 📣 IMPORTANTE: Sobre Este Documento
19
19
 
20
- Este documento é a **versão consolidada v2.1** que incorpora todas as mudanças dos Sprints 2-5:
20
+ Este documento é a **versão consolidada v4.0.4** que incorpora todas as mudanças dos Sprints 2-5:
21
21
 
22
22
  - ✅ **Modular Architecture** (4 módulos: core, development, product, infrastructure)
23
23
  - ✅ **Squad System** (nova terminologia, substituindo "Expansion Pack")
@@ -34,13 +34,13 @@ Este documento é a **versão consolidada v2.1** que incorpora todas as mudança
34
34
 
35
35
  ---
36
36
 
37
- ## 📜 Open Source vs. Serviço - Business Model v2.1
37
+ ## 📜 Open Source vs. Serviço - Business Model v4.0.4
38
38
 
39
- ### O Que Mudou de v2.0 para v2.1
39
+ ### O Que Mudou de v2.0 para v4.0.4
40
40
 
41
- **IMPORTANTE: v2.1 alterou fundamentalmente o business model!**
41
+ **IMPORTANTE: v4.0.4 alterou fundamentalmente o business model!**
42
42
 
43
- | Componente | v2.0 | v2.1 | Rationale |
43
+ | Componente | v2.0 | v4.0.4 | Rationale |
44
44
  | ------------------------ | ----------- | --------------- | -------------------------- |
45
45
  | **11 Agents** | ✅ Open | ✅ Open | Core functionality |
46
46
  | **Workers (97+)** | ❌ Closed | ✅ **OPEN** | Commodity, network effects |
@@ -106,7 +106,7 @@ Este documento é a **versão consolidada v2.1** que incorpora todas as mudança
106
106
  | LangChain | ✅ Complete | ❌ None (commodity) |
107
107
  | CrewAI | ✅ Complete | ❌ None (commodity) |
108
108
  | AutoGen | ✅ Complete | ❌ None (commodity) |
109
- | **AIOS v2.1** | ✅ **Complete** | ✅ **Clones (DNA Mental™)** ⭐ |
109
+ | **AIOS v4.0.4** | ✅ **Complete** | ✅ **Clones (DNA Mental™)** ⭐ |
110
110
 
111
111
  **Analogia:** Linux é open source, mas Red Hat Enterprise Linux adiciona suporte e otimizações. Ambos são Linux, mas o valor agregado varia. AIOS funciona igual.
112
112
 
@@ -119,7 +119,7 @@ Este não é um documento para ser lido do início ao fim. É um **sistema de ap
119
119
  - 🚀 **Layer 0: DISCOVERY** - Descubra seu caminho (5 min)
120
120
  - 🎯 **Layer 1: UNDERSTANDING** - 5 essays que ensinam o modelo mental (75 min)
121
121
  - 🎨 **Layer 2: COMPONENT LIBRARY** - Catálogo completo de componentes
122
- - 📋 **Layer 3: USAGE GUIDE** - Como usar AIOS v2.1 no seu contexto
122
+ - 📋 **Layer 3: USAGE GUIDE** - Como usar AIOS v4.0.4 no seu contexto
123
123
  - 📚 **Layer 4: COMPLETE REFERENCE** - Especificação técnica completa
124
124
  - 🔄 **META: EVOLUTION** - Como contribuir e evoluir o framework
125
125
 
@@ -129,7 +129,7 @@ Este não é um documento para ser lido do início ao fim. É um **sistema de ap
129
129
 
130
130
  # 🚀 LAYER 0: DISCOVERY ROUTER
131
131
 
132
- ## Bem-vindo ao AIOS v2.1 - Vamos Encontrar Seu Caminho
132
+ ## Bem-vindo ao AIOS v4.0.4 - Vamos Encontrar Seu Caminho
133
133
 
134
134
  ### Learning Tracks Disponíveis
135
135
 
@@ -192,7 +192,7 @@ AIOS fornece **orquestração estruturada**:
192
192
 
193
193
  ---
194
194
 
195
- ## Essay 3: Business Model v2.1
195
+ ## Essay 3: Business Model v4.0.4
196
196
 
197
197
  ### Por Que Workers São Open-Source Agora?
198
198
 
@@ -212,7 +212,7 @@ AIOS fornece **orquestração estruturada**:
212
212
 
213
213
  ## Essay 4: Agent System
214
214
 
215
- ### Os 11 Agents v2.1
215
+ ### Os 11 Agents v4.0.4
216
216
 
217
217
  | Agent | ID | Archetype | Responsabilidade |
218
218
  | --------- | --------------- | ------------ | ----------------------- |
@@ -288,7 +288,7 @@ responsavel_type: Clone # Year 2
288
288
 
289
289
  # 🎨 LAYER 2: COMPONENT LIBRARY
290
290
 
291
- ## Arquitetura Modular v2.1
291
+ ## Arquitetura Modular v4.0.4
292
292
 
293
293
  ### Os 4 Módulos
294
294
 
@@ -342,7 +342,7 @@ Regras:
342
342
 
343
343
  ---
344
344
 
345
- ## Squad System (Novo em v2.1)
345
+ ## Squad System (Novo em v4.0.4)
346
346
 
347
347
  ### Terminologia
348
348
 
@@ -600,7 +600,7 @@ npm install @aios/mcp-presets
600
600
 
601
601
  # 📋 LAYER 3: USAGE GUIDE
602
602
 
603
- ## Quick Start v2.1
603
+ ## Quick Start v4.0.4
604
604
 
605
605
  ### Installation (5 minutes)
606
606
 
@@ -609,7 +609,7 @@ npm install @aios/mcp-presets
609
609
  $ npx @SynkraAI/aios@latest init
610
610
 
611
611
  # Existing project (Brownfield)
612
- $ npx @SynkraAI/aios migrate v2.0-to-v2.1
612
+ $ npx @SynkraAI/aios migrate v2.0-to-v4.0.4
613
613
  ```
614
614
 
615
615
  ### First Steps
@@ -700,7 +700,7 @@ $ aios workflow brownfield-integration --target=./existing-project
700
700
 
701
701
  # 📚 LAYER 4: COMPLETE REFERENCE
702
702
 
703
- ## Source Tree v2.1 (Current)
703
+ ## Source Tree v4.0.4 (Current)
704
704
 
705
705
  ```
706
706
  @synkra/aios-core/ # Root project
@@ -733,7 +733,7 @@ $ aios workflow brownfield-integration --target=./existing-project
733
733
 
734
734
  ├── docs/ # Project docs
735
735
  │ ├── stories/ # Development stories
736
- │ │ └── v2.1/ # v2.1 stories
736
+ │ │ └── v4.0.4/ # v4.0.4 stories
737
737
  │ │ ├── sprint-1/
738
738
  │ │ ├── sprint-2/
739
739
  │ │ ├── sprint-3/
@@ -785,7 +785,7 @@ $ aios workflow brownfield-integration --target=./existing-project
785
785
 
786
786
  ### Installation
787
787
 
788
- | Metric | v2.0 | v2.1 | Improvement |
788
+ | Metric | v2.0 | v4.0.4 | Improvement |
789
789
  | --------------- | ---------- | --------- | --------------- |
790
790
  | Time to install | 2-4 hours | 5 minutes | **96% faster** |
791
791
  | Steps required | 15+ manual | 1 command | **93% simpler** |
@@ -793,7 +793,7 @@ $ aios workflow brownfield-integration --target=./existing-project
793
793
 
794
794
  ### Development Speed
795
795
 
796
- | Metric | v2.0 | v2.1 | Improvement |
796
+ | Metric | v2.0 | v4.0.4 | Improvement |
797
797
  | --------------------- | -------- | ---------- | ----------------- |
798
798
  | Find reusable Worker | N/A | 30 seconds | **∞** |
799
799
  | Quality issues caught | 20% | 80% | **4x** |
@@ -801,7 +801,7 @@ $ aios workflow brownfield-integration --target=./existing-project
801
801
 
802
802
  ### Quality
803
803
 
804
- | Metric | v2.0 | v2.1 |
804
+ | Metric | v2.0 | v4.0.4 |
805
805
  | ------------------- | ---------- | ------------- |
806
806
  | Quality Gate Layers | 1 (manual) | 3 (automated) |
807
807
  | Auto-caught issues | 0% | 80% |
@@ -834,4 +834,4 @@ $ aios workflow brownfield-integration --target=./existing-project
834
834
 
835
835
  ---
836
836
 
837
- _Este documento consolida AIOS-LIVRO-DE-OURO.md (v2.0) + deltas v2.1 em um único documento completo._
837
+ _Este documento consolida AIOS-LIVRO-DE-OURO.md (v2.0) + deltas v4.0.4 em um único documento completo._