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.
- package/.aios-core/cli/commands/migrate/analyze.js +6 -6
- package/.aios-core/cli/commands/migrate/backup.js +2 -2
- package/.aios-core/cli/commands/migrate/execute.js +4 -4
- package/.aios-core/cli/commands/migrate/index.js +5 -5
- package/.aios-core/cli/commands/migrate/rollback.js +6 -6
- package/.aios-core/cli/commands/migrate/update-imports.js +2 -2
- package/.aios-core/cli/commands/migrate/validate.js +2 -2
- package/.aios-core/cli/commands/pro/index.js +52 -0
- package/.aios-core/cli/index.js +1 -1
- package/.aios-core/core/ids/registry-updater.js +29 -3
- package/.aios-core/core/migration/migration-config.yaml +2 -2
- package/.aios-core/core/migration/module-mapping.yaml +2 -2
- package/.aios-core/core/registry/README.md +2 -2
- package/.aios-core/core/synapse/context/context-builder.js +34 -0
- package/.aios-core/core/synapse/diagnostics/collectors/consistency-collector.js +168 -0
- package/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +129 -0
- package/.aios-core/core/synapse/diagnostics/collectors/manifest-collector.js +82 -0
- package/.aios-core/core/synapse/diagnostics/collectors/output-analyzer.js +134 -0
- package/.aios-core/core/synapse/diagnostics/collectors/pipeline-collector.js +75 -0
- package/.aios-core/core/synapse/diagnostics/collectors/quality-collector.js +252 -0
- package/.aios-core/core/synapse/diagnostics/collectors/relevance-matrix.js +174 -0
- package/.aios-core/core/synapse/diagnostics/collectors/safe-read-json.js +31 -0
- package/.aios-core/core/synapse/diagnostics/collectors/session-collector.js +102 -0
- package/.aios-core/core/synapse/diagnostics/collectors/timing-collector.js +126 -0
- package/.aios-core/core/synapse/diagnostics/collectors/uap-collector.js +83 -0
- package/.aios-core/core/synapse/diagnostics/report-formatter.js +484 -0
- package/.aios-core/core/synapse/diagnostics/synapse-diagnostics.js +95 -0
- package/.aios-core/core/synapse/engine.js +73 -20
- package/.aios-core/core/synapse/runtime/hook-runtime.js +60 -0
- package/.aios-core/core-config.yaml +6 -0
- package/.aios-core/data/agent-config-requirements.yaml +2 -2
- package/.aios-core/data/aios-kb.md +4 -4
- package/.aios-core/data/entity-registry.yaml +5 -5
- package/.aios-core/development/agents/architect.md +10 -10
- package/.aios-core/development/agents/devops.md +93 -50
- package/.aios-core/development/agents/qa.md +94 -40
- package/.aios-core/development/agents/ux-design-expert.md +25 -25
- package/.aios-core/development/scripts/activation-runtime.js +63 -0
- package/.aios-core/development/scripts/generate-greeting.js +9 -8
- package/.aios-core/development/scripts/unified-activation-pipeline.js +102 -2
- package/.aios-core/development/tasks/{db-expansion-pack-integration.md → db-squad-integration.md} +5 -5
- package/.aios-core/development/tasks/{integrate-expansion-pack.md → integrate-squad.md} +2 -2
- package/.aios-core/development/tasks/next.md +3 -3
- package/.aios-core/development/tasks/pr-automation.md +2 -2
- package/.aios-core/development/tasks/publish-npm.md +257 -0
- package/.aios-core/development/tasks/release-management.md +4 -4
- package/.aios-core/development/tasks/setup-github.md +1 -1
- package/.aios-core/development/tasks/squad-creator-migrate.md +1 -1
- package/.aios-core/development/tasks/squad-creator-sync-ide-command.md +14 -14
- package/.aios-core/development/tasks/update-aios.md +1 -1
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +1 -1
- package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +5 -5
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +21 -21
- package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +25 -25
- package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +4 -4
- package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +3 -3
- package/.aios-core/docs/standards/STANDARDS-INDEX.md +13 -13
- package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +1 -1
- package/.aios-core/framework-config.yaml +4 -0
- package/.aios-core/infrastructure/scripts/codex-skills-sync/index.js +182 -0
- package/.aios-core/infrastructure/scripts/codex-skills-sync/validate.js +172 -0
- package/.aios-core/infrastructure/scripts/ide-sync/README.md +14 -0
- package/.aios-core/infrastructure/scripts/ide-sync/index.js +6 -0
- package/.aios-core/infrastructure/scripts/tool-resolver.js +4 -4
- package/.aios-core/infrastructure/scripts/validate-paths.js +142 -0
- package/.aios-core/infrastructure/templates/aios-sync.yaml.template +11 -11
- package/.aios-core/infrastructure/templates/github-workflows/README.md +1 -1
- package/.aios-core/install-manifest.yaml +190 -106
- package/.aios-core/local-config.yaml.template +2 -0
- package/.aios-core/product/README.md +2 -2
- package/.aios-core/product/data/integration-patterns.md +1 -1
- package/.aios-core/product/templates/ide-rules/cline-rules.md +1 -1
- package/.aios-core/product/templates/ide-rules/codex-rules.md +65 -0
- package/.aios-core/product/templates/ide-rules/copilot-rules.md +1 -1
- package/.aios-core/product/templates/ide-rules/roo-rules.md +1 -1
- package/.aios-core/user-guide.md +15 -14
- package/.aios-core/workflow-intelligence/engine/output-formatter.js +1 -1
- package/.claude/hooks/enforce-architecture-first.py +196 -0
- package/.claude/hooks/install-hooks.sh +41 -0
- package/.claude/hooks/mind-clone-governance.py +192 -0
- package/.claude/hooks/pre-commit-mmos-guard.sh +99 -0
- package/.claude/hooks/pre-commit-version-check.sh +156 -0
- package/.claude/hooks/read-protection.py +151 -0
- package/.claude/hooks/slug-validation.py +176 -0
- package/.claude/hooks/sql-governance.py +182 -0
- package/.claude/hooks/synapse-engine.js +9 -20
- package/.claude/hooks/write-path-validation.py +194 -0
- package/README.md +44 -14
- package/bin/aios-init.js +255 -184
- package/bin/aios-minimal.js +2 -2
- package/bin/aios.js +19 -19
- package/package.json +7 -4
- package/packages/aios-pro-cli/bin/aios-pro.js +75 -2
- package/packages/aios-pro-cli/package.json +5 -1
- package/packages/aios-pro-cli/src/recover.js +100 -0
- package/packages/installer/src/__tests__/performance-benchmark.js +382 -0
- package/packages/installer/src/config/ide-configs.js +12 -1
- package/packages/installer/src/config/templates/core-config-template.js +2 -2
- package/packages/installer/src/installer/aios-core-installer.js +2 -2
- package/packages/installer/src/installer/file-hasher.js +97 -0
- package/packages/installer/src/installer/post-install-validator.js +41 -1
- package/packages/installer/src/pro/pro-scaffolder.js +335 -0
- package/packages/installer/src/utils/aios-colors.js +2 -2
- package/packages/installer/src/wizard/feedback.js +1 -1
- package/packages/installer/src/wizard/ide-config-generator.js +2 -2
- package/packages/installer/src/wizard/index.js +58 -19
- package/packages/installer/src/wizard/pro-setup.js +547 -0
- package/packages/installer/src/wizard/questions.js +20 -14
- package/packages/installer/src/wizard/validators.js +1 -1
- package/scripts/package-synapse.js +323 -0
- package/scripts/validate-package-completeness.js +317 -0
|
@@ -94,46 +94,100 @@ story-file-permissions:
|
|
|
94
94
|
- CRITICAL: Your updates must be limited to appending your review results in the QA Results section only
|
|
95
95
|
# All commands require * prefix when used (e.g., *help)
|
|
96
96
|
commands:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
97
|
+
- name: help
|
|
98
|
+
visibility: [full, quick, key]
|
|
99
|
+
description: 'Show all available commands with descriptions'
|
|
100
|
+
- name: code-review
|
|
101
|
+
visibility: [full, quick]
|
|
102
|
+
args: '{scope}'
|
|
103
|
+
description: 'Run automated review (scope: uncommitted or committed)'
|
|
104
|
+
- name: review
|
|
105
|
+
visibility: [full, quick, key]
|
|
106
|
+
args: '{story}'
|
|
107
|
+
description: 'Comprehensive story review with gate decision'
|
|
108
|
+
- name: review-build
|
|
109
|
+
visibility: [full]
|
|
110
|
+
args: '{story}'
|
|
111
|
+
description: '10-phase structured QA review (Epic 6) - outputs qa_report.md'
|
|
112
|
+
- name: gate
|
|
113
|
+
visibility: [full, quick]
|
|
114
|
+
args: '{story}'
|
|
115
|
+
description: 'Create quality gate decision'
|
|
116
|
+
- name: nfr-assess
|
|
117
|
+
visibility: [full, quick]
|
|
118
|
+
args: '{story}'
|
|
119
|
+
description: 'Validate non-functional requirements'
|
|
120
|
+
- name: risk-profile
|
|
121
|
+
visibility: [full, quick]
|
|
122
|
+
args: '{story}'
|
|
123
|
+
description: 'Generate risk assessment matrix'
|
|
124
|
+
- name: create-fix-request
|
|
125
|
+
visibility: [full]
|
|
126
|
+
args: '{story}'
|
|
127
|
+
description: 'Generate QA_FIX_REQUEST.md for @dev with issues to fix'
|
|
128
|
+
- name: validate-libraries
|
|
129
|
+
visibility: [full]
|
|
130
|
+
args: '{story}'
|
|
131
|
+
description: 'Validate third-party library usage via Context7'
|
|
132
|
+
- name: security-check
|
|
133
|
+
visibility: [full, quick]
|
|
134
|
+
args: '{story}'
|
|
135
|
+
description: 'Run 8-point security vulnerability scan'
|
|
136
|
+
- name: validate-migrations
|
|
137
|
+
visibility: [full]
|
|
138
|
+
args: '{story}'
|
|
139
|
+
description: 'Validate database migrations for schema changes'
|
|
140
|
+
- name: evidence-check
|
|
141
|
+
visibility: [full]
|
|
142
|
+
args: '{story}'
|
|
143
|
+
description: 'Verify evidence-based QA requirements'
|
|
144
|
+
- name: false-positive-check
|
|
145
|
+
visibility: [full]
|
|
146
|
+
args: '{story}'
|
|
147
|
+
description: 'Critical thinking verification for bug fixes'
|
|
148
|
+
- name: console-check
|
|
149
|
+
visibility: [full]
|
|
150
|
+
args: '{story}'
|
|
151
|
+
description: 'Browser console error detection'
|
|
152
|
+
- name: test-design
|
|
153
|
+
visibility: [full, quick]
|
|
154
|
+
args: '{story}'
|
|
155
|
+
description: 'Create comprehensive test scenarios'
|
|
156
|
+
- name: trace
|
|
157
|
+
visibility: [full, quick]
|
|
158
|
+
args: '{story}'
|
|
159
|
+
description: 'Map requirements to tests (Given-When-Then)'
|
|
160
|
+
- name: create-suite
|
|
161
|
+
visibility: [full]
|
|
162
|
+
args: '{story}'
|
|
163
|
+
description: 'Create test suite for story (Authority: QA owns test suites)'
|
|
164
|
+
- name: critique-spec
|
|
165
|
+
visibility: [full]
|
|
166
|
+
args: '{story}'
|
|
167
|
+
description: 'Review and critique specification for completeness and clarity'
|
|
168
|
+
- name: backlog-add
|
|
169
|
+
visibility: [full]
|
|
170
|
+
args: '{story} {type} {priority} {title}'
|
|
171
|
+
description: 'Add item to story backlog'
|
|
172
|
+
- name: backlog-update
|
|
173
|
+
visibility: [full]
|
|
174
|
+
args: '{item_id} {status}'
|
|
175
|
+
description: 'Update backlog item status'
|
|
176
|
+
- name: backlog-review
|
|
177
|
+
visibility: [full, quick]
|
|
178
|
+
description: 'Generate backlog review for sprint planning'
|
|
179
|
+
- name: session-info
|
|
180
|
+
visibility: [full, quick]
|
|
181
|
+
description: 'Show current session details (agent history, commands)'
|
|
182
|
+
- name: guide
|
|
183
|
+
visibility: [full, quick, key]
|
|
184
|
+
description: 'Show comprehensive usage guide for this agent'
|
|
185
|
+
- name: yolo
|
|
186
|
+
visibility: [full, quick, key]
|
|
187
|
+
description: 'Toggle permission mode (cycle: ask > auto > explore)'
|
|
188
|
+
- name: exit
|
|
189
|
+
visibility: [full, quick, key]
|
|
190
|
+
description: 'Exit QA mode'
|
|
137
191
|
dependencies:
|
|
138
192
|
data:
|
|
139
193
|
- technical-preferences.md
|
|
@@ -9,9 +9,9 @@ CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your
|
|
|
9
9
|
```yaml
|
|
10
10
|
IDE-FILE-RESOLUTION:
|
|
11
11
|
- FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
|
|
12
|
-
- Dependencies map to aios-core/{type}/{name}
|
|
12
|
+
- Dependencies map to .aios-core/development/{type}/{name}
|
|
13
13
|
- type=folder (tasks|templates|checklists|data|workflows|etc...), name=file-name
|
|
14
|
-
- Example: audit-codebase.md → aios-core/tasks/audit-codebase.md
|
|
14
|
+
- Example: audit-codebase.md → .aios-core/development/tasks/audit-codebase.md
|
|
15
15
|
- IMPORTANT: Only load these files when user requests specific command execution
|
|
16
16
|
|
|
17
17
|
REQUEST-RESOLUTION:
|
|
@@ -85,38 +85,38 @@ agent:
|
|
|
85
85
|
Use DIRECT Read() with exact paths. NO Search/Grep.
|
|
86
86
|
|
|
87
87
|
Phase 1 Commands:
|
|
88
|
-
*research → Read("aios-core/tasks/ux-user-research.md")
|
|
89
|
-
*wireframe → Read("aios-core/tasks/ux-create-wireframe.md")
|
|
90
|
-
*generate-ui-prompt → Read("aios-core/tasks/generate-ai-frontend-prompt.md")
|
|
91
|
-
*create-front-end-spec → Read("aios-core/tasks/create-doc.md") + template
|
|
88
|
+
*research → Read(".aios-core/development/tasks/ux-user-research.md")
|
|
89
|
+
*wireframe → Read(".aios-core/development/tasks/ux-create-wireframe.md")
|
|
90
|
+
*generate-ui-prompt → Read(".aios-core/development/tasks/generate-ai-frontend-prompt.md")
|
|
91
|
+
*create-front-end-spec → Read(".aios-core/development/tasks/create-doc.md") + template
|
|
92
92
|
|
|
93
93
|
Phase 2 Commands:
|
|
94
|
-
*audit → Read("aios-core/tasks/audit-codebase.md")
|
|
95
|
-
*consolidate → Read("aios-core/tasks/consolidate-patterns.md")
|
|
96
|
-
*shock-report → Read("aios-core/tasks/generate-shock-report.md")
|
|
94
|
+
*audit → Read(".aios-core/development/tasks/audit-codebase.md")
|
|
95
|
+
*consolidate → Read(".aios-core/development/tasks/consolidate-patterns.md")
|
|
96
|
+
*shock-report → Read(".aios-core/development/tasks/generate-shock-report.md")
|
|
97
97
|
|
|
98
98
|
Phase 3 Commands:
|
|
99
|
-
*tokenize → Read("aios-core/tasks/extract-tokens.md")
|
|
100
|
-
*setup → Read("aios-core/tasks/setup-design-system.md")
|
|
101
|
-
*migrate → Read("aios-core/tasks/generate-migration-strategy.md")
|
|
102
|
-
*upgrade-tailwind → Read("aios-core/tasks/tailwind-upgrade.md")
|
|
103
|
-
*audit-tailwind-config → Read("aios-core/tasks/audit-tailwind-config.md")
|
|
104
|
-
*export-dtcg → Read("aios-core/tasks/export-design-tokens-dtcg.md")
|
|
105
|
-
*bootstrap-shadcn → Read("aios-core/tasks/bootstrap-shadcn-library.md")
|
|
99
|
+
*tokenize → Read(".aios-core/development/tasks/extract-tokens.md")
|
|
100
|
+
*setup → Read(".aios-core/development/tasks/setup-design-system.md")
|
|
101
|
+
*migrate → Read(".aios-core/development/tasks/generate-migration-strategy.md")
|
|
102
|
+
*upgrade-tailwind → Read(".aios-core/development/tasks/tailwind-upgrade.md")
|
|
103
|
+
*audit-tailwind-config → Read(".aios-core/development/tasks/audit-tailwind-config.md")
|
|
104
|
+
*export-dtcg → Read(".aios-core/development/tasks/export-design-tokens-dtcg.md")
|
|
105
|
+
*bootstrap-shadcn → Read(".aios-core/development/tasks/bootstrap-shadcn-library.md")
|
|
106
106
|
|
|
107
107
|
Phase 4 Commands:
|
|
108
|
-
*build → Read("aios-core/tasks/build-component.md")
|
|
109
|
-
*compose → Read("aios-core/tasks/compose-molecule.md")
|
|
110
|
-
*extend → Read("aios-core/tasks/extend-pattern.md")
|
|
108
|
+
*build → Read(".aios-core/development/tasks/build-component.md")
|
|
109
|
+
*compose → Read(".aios-core/development/tasks/compose-molecule.md")
|
|
110
|
+
*extend → Read(".aios-core/development/tasks/extend-pattern.md")
|
|
111
111
|
|
|
112
112
|
Phase 5 Commands:
|
|
113
|
-
*document → Read("aios-core/tasks/generate-documentation.md")
|
|
114
|
-
*a11y-check → Read("aios-core/checklists/accessibility-wcag-checklist.md")
|
|
115
|
-
*calculate-roi → Read("aios-core/tasks/calculate-roi.md")
|
|
113
|
+
*document → Read(".aios-core/development/tasks/generate-documentation.md")
|
|
114
|
+
*a11y-check → Read(".aios-core/development/checklists/accessibility-wcag-checklist.md")
|
|
115
|
+
*calculate-roi → Read(".aios-core/development/tasks/calculate-roi.md")
|
|
116
116
|
|
|
117
117
|
Universal Commands:
|
|
118
|
-
*scan → Read("aios-core/tasks/ux-ds-scan-artifact.md")
|
|
119
|
-
*integrate → Read("aios-core/tasks/integrate-Squad.md")
|
|
118
|
+
*scan → Read(".aios-core/development/tasks/ux-ds-scan-artifact.md")
|
|
119
|
+
*integrate → Read(".aios-core/development/tasks/integrate-Squad.md")
|
|
120
120
|
|
|
121
121
|
persona_profile:
|
|
122
122
|
archetype: Empathizer
|
|
@@ -196,7 +196,7 @@ commands:
|
|
|
196
196
|
|
|
197
197
|
# === UNIVERSAL COMMANDS ===
|
|
198
198
|
scan {path|url}: 'Analyze HTML/React artifact for patterns'
|
|
199
|
-
integrate {pack}: 'Connect with
|
|
199
|
+
integrate {pack}: 'Connect with squad'
|
|
200
200
|
help: 'Show all commands organized by phase'
|
|
201
201
|
status: 'Show current workflow phase'
|
|
202
202
|
guide: 'Show comprehensive usage guide for this agent'
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { UnifiedActivationPipeline } = require('./unified-activation-pipeline');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Canonical activation runtime for AIOS agents.
|
|
7
|
+
*
|
|
8
|
+
* This wrapper centralizes agent activation calls so IDE-specific entry points
|
|
9
|
+
* (Codex, Claude Code, scripts) can depend on one stable API.
|
|
10
|
+
*/
|
|
11
|
+
class ActivationRuntime {
|
|
12
|
+
/**
|
|
13
|
+
* @param {Object} [options]
|
|
14
|
+
* @param {string} [options.projectRoot]
|
|
15
|
+
* @param {UnifiedActivationPipeline} [options.pipeline]
|
|
16
|
+
*/
|
|
17
|
+
constructor(options = {}) {
|
|
18
|
+
this.pipeline = options.pipeline || new UnifiedActivationPipeline({
|
|
19
|
+
projectRoot: options.projectRoot,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Activate agent and return the full activation result.
|
|
25
|
+
* @param {string} agentId
|
|
26
|
+
* @param {Object} [options]
|
|
27
|
+
* @returns {Promise<{greeting: string, context: Object, duration: number, quality: string, metrics: Object}>}
|
|
28
|
+
*/
|
|
29
|
+
async activate(agentId, options = {}) {
|
|
30
|
+
return this.pipeline.activate(agentId, options);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Activate agent and return only greeting text.
|
|
35
|
+
* @param {string} agentId
|
|
36
|
+
* @param {Object} [options]
|
|
37
|
+
* @returns {Promise<string>}
|
|
38
|
+
*/
|
|
39
|
+
async activateGreeting(agentId, options = {}) {
|
|
40
|
+
try {
|
|
41
|
+
const result = await this.activate(agentId, options);
|
|
42
|
+
return result && typeof result.greeting === 'string' ? result.greeting : '';
|
|
43
|
+
} catch (error) {
|
|
44
|
+
throw new Error(`ActivationRuntime.activateGreeting failed for "${agentId}": ${error.message}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Convenience helper for one-shot activation.
|
|
51
|
+
* @param {string} agentId
|
|
52
|
+
* @param {Object} [options]
|
|
53
|
+
* @returns {Promise<{greeting: string, context: Object, duration: number, quality: string, metrics: Object}>}
|
|
54
|
+
*/
|
|
55
|
+
function activateAgent(agentId, options = {}) {
|
|
56
|
+
const runtime = new ActivationRuntime(options);
|
|
57
|
+
return runtime.activate(agentId, options);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = {
|
|
61
|
+
ActivationRuntime,
|
|
62
|
+
activateAgent,
|
|
63
|
+
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Unified Greeting Generator - CLI Wrapper
|
|
4
4
|
*
|
|
5
|
-
* Story ACT-6: Refactored as thin wrapper around
|
|
5
|
+
* Story ACT-6: Refactored as thin wrapper around ActivationRuntime.
|
|
6
6
|
*
|
|
7
7
|
* ARCHITECTURE NOTE:
|
|
8
8
|
* This file is now a thin CLI wrapper that delegates to the
|
|
9
|
-
*
|
|
9
|
+
* ActivationRuntime for all context loading and greeting generation.
|
|
10
10
|
* Previously, this file orchestrated its own parallel loading of
|
|
11
11
|
* AgentConfigLoader, SessionContextLoader, and ProjectStatusLoader.
|
|
12
12
|
* Now ALL agents (not just 3) can use the same unified pipeline.
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
* Usage: node generate-greeting.js <agent-id>
|
|
20
20
|
*
|
|
21
21
|
* Used by: @devops, @data-engineer, @ux-design-expert (CLI invocation pattern)
|
|
22
|
-
* Note: All 12 agents now
|
|
22
|
+
* Note: All 12 agents now activate through ActivationRuntime.
|
|
23
23
|
*
|
|
24
|
-
* @see
|
|
24
|
+
* @see activation-runtime.js for the runtime entrypoint
|
|
25
|
+
* @see unified-activation-pipeline.js for pipeline internals
|
|
25
26
|
* @see greeting-builder.js for core greeting logic
|
|
26
27
|
*
|
|
27
28
|
* Part of Story 6.1.4: Unified Greeting System Integration
|
|
@@ -30,12 +31,12 @@
|
|
|
30
31
|
|
|
31
32
|
'use strict';
|
|
32
33
|
|
|
33
|
-
const {
|
|
34
|
+
const { ActivationRuntime } = require('./activation-runtime');
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* Generate unified greeting for agent activation.
|
|
37
38
|
*
|
|
38
|
-
* Delegates to
|
|
39
|
+
* Delegates to ActivationRuntime.activate() which handles:
|
|
39
40
|
* - Parallel loading of config, session, project status, git, permissions
|
|
40
41
|
* - Sequential context detection and workflow state
|
|
41
42
|
* - Greeting generation via GreetingBuilder
|
|
@@ -49,8 +50,8 @@ const { UnifiedActivationPipeline } = require('./unified-activation-pipeline');
|
|
|
49
50
|
*/
|
|
50
51
|
async function generateGreeting(agentId) {
|
|
51
52
|
try {
|
|
52
|
-
const
|
|
53
|
-
const result = await
|
|
53
|
+
const runtime = new ActivationRuntime();
|
|
54
|
+
const result = await runtime.activate(agentId);
|
|
54
55
|
|
|
55
56
|
if (result.duration > 100) {
|
|
56
57
|
console.warn(`[generate-greeting] Slow generation: ${result.duration}ms`);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SYN-14: Boot time captured before ANY require — measures cold start
|
|
2
|
+
const _BOOT_TIME = process.hrtime.bigint();
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Unified Activation Pipeline - Single Entry Point for All 12 Agents
|
|
3
6
|
*
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
|
|
39
42
|
const path = require('path');
|
|
40
43
|
const fs = require('fs').promises;
|
|
44
|
+
const fsSync = require('fs');
|
|
41
45
|
const yaml = require('js-yaml');
|
|
42
46
|
|
|
43
47
|
const GreetingBuilder = require('./greeting-builder');
|
|
@@ -158,7 +162,7 @@ class UnifiedActivationPipeline {
|
|
|
158
162
|
// Race: full pipeline vs timeout (clear timer to prevent leak)
|
|
159
163
|
const { promise: timeoutPromise, timerId } = this._timeoutFallback(agentId, pipelineTimeout);
|
|
160
164
|
const result = await Promise.race([
|
|
161
|
-
this._runPipeline(agentId, options, coreConfig),
|
|
165
|
+
this._runPipeline(agentId, options, coreConfig, startTime),
|
|
162
166
|
timeoutPromise,
|
|
163
167
|
]);
|
|
164
168
|
clearTimeout(timerId);
|
|
@@ -198,7 +202,7 @@ class UnifiedActivationPipeline {
|
|
|
198
202
|
* @param {Object} coreConfig - Pre-loaded core config (shared, not read again)
|
|
199
203
|
* @returns {Promise<{greeting: string, context: Object, quality: string, metrics: Object}>}
|
|
200
204
|
*/
|
|
201
|
-
async _runPipeline(agentId, options = {}, coreConfig = {}) {
|
|
205
|
+
async _runPipeline(agentId, options = {}, coreConfig = {}, startTime = Date.now()) {
|
|
202
206
|
const pipelineStart = Date.now();
|
|
203
207
|
const metrics = { loaders: {} };
|
|
204
208
|
|
|
@@ -329,6 +333,12 @@ class UnifiedActivationPipeline {
|
|
|
329
333
|
// ACT-11: Determine quality level based on what loaded successfully
|
|
330
334
|
const quality = this._determineQuality(metrics);
|
|
331
335
|
|
|
336
|
+
// SYN-13: Write active agent to SYNAPSE session (fire-and-forget, 20ms budget)
|
|
337
|
+
this._writeSynapseSession(agentId, quality, metrics);
|
|
338
|
+
|
|
339
|
+
// SYN-14: Persist UAP metrics for diagnostics (fire-and-forget)
|
|
340
|
+
this._persistUapMetrics(agentId, quality, metrics, Date.now() - startTime);
|
|
341
|
+
|
|
332
342
|
return {
|
|
333
343
|
greeting,
|
|
334
344
|
context: enrichedContext,
|
|
@@ -665,6 +675,96 @@ class UnifiedActivationPipeline {
|
|
|
665
675
|
};
|
|
666
676
|
}
|
|
667
677
|
|
|
678
|
+
/**
|
|
679
|
+
* SYN-13: Write active agent to SYNAPSE session bridge file.
|
|
680
|
+
*
|
|
681
|
+
* Writes `.synapse/sessions/_active-agent.json` as a singleton file.
|
|
682
|
+
* Uses fs.writeFileSync directly (not updateSession) to avoid prompt_count
|
|
683
|
+
* side effects. Fire-and-forget with try/catch — never blocks activation.
|
|
684
|
+
*
|
|
685
|
+
* @private
|
|
686
|
+
* @param {string} agentId - Agent ID being activated
|
|
687
|
+
* @param {string} quality - Activation quality ('full'|'partial'|'fallback')
|
|
688
|
+
* @param {Object} metrics - Metrics object for profiling
|
|
689
|
+
*/
|
|
690
|
+
_writeSynapseSession(agentId, quality, metrics) {
|
|
691
|
+
const start = Date.now();
|
|
692
|
+
try {
|
|
693
|
+
const sessionsDir = path.join(this.projectRoot, '.synapse', 'sessions');
|
|
694
|
+
if (!fsSync.existsSync(path.join(this.projectRoot, '.synapse'))) {
|
|
695
|
+
// .synapse/ does not exist — project may not have SYNAPSE installed
|
|
696
|
+
const duration = Date.now() - start;
|
|
697
|
+
metrics.loaders.synapseSession = { duration, status: 'skipped', start, end: start + duration };
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
if (!fsSync.existsSync(sessionsDir)) {
|
|
702
|
+
fsSync.mkdirSync(sessionsDir, { recursive: true });
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
const bridgeData = {
|
|
706
|
+
id: agentId,
|
|
707
|
+
activated_at: new Date().toISOString(),
|
|
708
|
+
activation_quality: quality,
|
|
709
|
+
source: 'uap',
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
const bridgePath = path.join(sessionsDir, '_active-agent.json');
|
|
713
|
+
fsSync.writeFileSync(bridgePath, JSON.stringify(bridgeData, null, 2), 'utf8');
|
|
714
|
+
|
|
715
|
+
const duration = Date.now() - start;
|
|
716
|
+
metrics.loaders.synapseSession = { duration, status: 'ok', start, end: start + duration };
|
|
717
|
+
} catch (error) {
|
|
718
|
+
const duration = Date.now() - start;
|
|
719
|
+
metrics.loaders.synapseSession = { duration, status: 'error', start, end: start + duration, error: error.message };
|
|
720
|
+
console.warn(`[UnifiedActivationPipeline] SYNAPSE session write failed: ${error.message}`);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* SYN-14: Persist UAP metrics to .synapse/metrics/uap-metrics.json.
|
|
726
|
+
* Fire-and-forget — never blocks activation pipeline.
|
|
727
|
+
*
|
|
728
|
+
* @private
|
|
729
|
+
* @param {string} agentId - Agent ID
|
|
730
|
+
* @param {string} quality - Activation quality ('full'|'partial'|'fallback')
|
|
731
|
+
* @param {Object} metrics - Metrics object with loader timings
|
|
732
|
+
* @param {number} totalDuration - Total activation duration in ms
|
|
733
|
+
*/
|
|
734
|
+
_persistUapMetrics(agentId, quality, metrics, totalDuration) {
|
|
735
|
+
try {
|
|
736
|
+
const synapsePath = path.join(this.projectRoot, '.synapse');
|
|
737
|
+
if (!fsSync.existsSync(synapsePath)) return;
|
|
738
|
+
const metricsDir = path.join(synapsePath, 'metrics');
|
|
739
|
+
if (!fsSync.existsSync(metricsDir)) {
|
|
740
|
+
fsSync.mkdirSync(metricsDir, { recursive: true });
|
|
741
|
+
}
|
|
742
|
+
const requireChainMs = typeof _BOOT_TIME !== 'undefined'
|
|
743
|
+
? Number(process.hrtime.bigint() - _BOOT_TIME) / 1e6
|
|
744
|
+
: 0;
|
|
745
|
+
const data = {
|
|
746
|
+
agentId,
|
|
747
|
+
quality,
|
|
748
|
+
totalDuration,
|
|
749
|
+
requireChainMs,
|
|
750
|
+
loaders: {},
|
|
751
|
+
timestamp: new Date().toISOString(),
|
|
752
|
+
};
|
|
753
|
+
for (const [name, info] of Object.entries(metrics.loaders || {})) {
|
|
754
|
+
data.loaders[name] = {
|
|
755
|
+
duration: info.duration || 0,
|
|
756
|
+
status: info.status || 'unknown',
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
fsSync.writeFileSync(
|
|
760
|
+
path.join(metricsDir, 'uap-metrics.json'),
|
|
761
|
+
JSON.stringify(data, null, 2), 'utf8',
|
|
762
|
+
);
|
|
763
|
+
} catch {
|
|
764
|
+
// Fire-and-forget: never block the activation pipeline
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
668
768
|
/**
|
|
669
769
|
* Get list of all supported agent IDs.
|
|
670
770
|
* @returns {string[]} Array of agent IDs
|
package/.aios-core/development/tasks/{db-expansion-pack-integration.md → db-squad-integration.md}
RENAMED
|
@@ -208,11 +208,11 @@ updated_at: 2025-11-17
|
|
|
208
208
|
|
|
209
209
|
## Description
|
|
210
210
|
|
|
211
|
-
Analyze an
|
|
211
|
+
Analyze an squad's data requirements and design database integration strategy. Maps pack inputs/outputs/state to database schema, proposes tables/relationships, and generates migration plan.
|
|
212
212
|
|
|
213
213
|
## Prerequisites
|
|
214
214
|
|
|
215
|
-
-
|
|
215
|
+
- Squad installed and accessible
|
|
216
216
|
- Database connection configured (*env-check passed)
|
|
217
217
|
- Current schema documented or accessible
|
|
218
218
|
|
|
@@ -221,8 +221,8 @@ Analyze an expansion pack's data requirements and design database integration st
|
|
|
221
221
|
### Step 1: Identify Target Expansion Pack
|
|
222
222
|
|
|
223
223
|
**Elicit from user:**
|
|
224
|
-
- Which
|
|
225
|
-
- Path to
|
|
224
|
+
- Which squad? (mmos, creator-os, innerlens, etc.)
|
|
225
|
+
- Path to squad directory
|
|
226
226
|
|
|
227
227
|
**Actions:**
|
|
228
228
|
- Verify pack exists and has config.yaml
|
|
@@ -578,7 +578,7 @@ next_steps:
|
|
|
578
578
|
|
|
579
579
|
## Success Criteria
|
|
580
580
|
|
|
581
|
-
- [ ]
|
|
581
|
+
- [ ] Squad data flows fully documented
|
|
582
582
|
- [ ] Current schema analyzed
|
|
583
583
|
- [ ] Integration schema designed (follows patterns, has RLS)
|
|
584
584
|
- [ ] KISS Gate validation passed (database is actually needed)
|
|
@@ -208,13 +208,13 @@ updated_at: 2025-11-17
|
|
|
208
208
|
|
|
209
209
|
## Description
|
|
210
210
|
|
|
211
|
-
Connect design system with MMOS, CreatorOS, or InnerLens
|
|
211
|
+
Connect design system with MMOS, CreatorOS, or InnerLens squads. Generates pack-specific patterns, token variations, and integration documentation.
|
|
212
212
|
|
|
213
213
|
## Prerequisites
|
|
214
214
|
|
|
215
215
|
- Design system setup complete
|
|
216
216
|
- Components built
|
|
217
|
-
- Target
|
|
217
|
+
- Target squad installed
|
|
218
218
|
|
|
219
219
|
## Workflow
|
|
220
220
|
|
|
@@ -130,7 +130,7 @@ Options:
|
|
|
130
130
|
|
|
131
131
|
Examples:
|
|
132
132
|
*next # Auto-detect context
|
|
133
|
-
*next --story docs/stories/
|
|
133
|
+
*next --story docs/stories/v4.0.4/sprint-10/story-wis-3.md
|
|
134
134
|
*next --all # Show all suggestions
|
|
135
135
|
|
|
136
136
|
How it works:
|
|
@@ -156,7 +156,7 @@ Workflow detection uses:
|
|
|
156
156
|
📍 State: in_development (confidence: 92%)
|
|
157
157
|
|
|
158
158
|
Next steps:
|
|
159
|
-
1. `*review-qa docs/stories/
|
|
159
|
+
1. `*review-qa docs/stories/v4.0.4/sprint-10/story-wis-3.md` - Run QA review
|
|
160
160
|
2. `*run-tests` - Execute test suite manually
|
|
161
161
|
3. `*pre-push-quality-gate` - Final quality checks
|
|
162
162
|
|
|
@@ -257,7 +257,7 @@ optimizations:
|
|
|
257
257
|
Context:
|
|
258
258
|
Agent: @dev
|
|
259
259
|
Last Command: *develop
|
|
260
|
-
Story: docs/stories/
|
|
260
|
+
Story: docs/stories/v4.0.4/sprint-11/story-wis-3.md
|
|
261
261
|
Branch: feature/wis-3
|
|
262
262
|
|
|
263
263
|
Workflow: story_development
|
|
@@ -21,7 +21,7 @@ To help users contribute to the AIOS open-source project (`@synkra/aios-core`) b
|
|
|
21
21
|
**Target Repository**: `@synkra/aios-core` (open-source framework)
|
|
22
22
|
|
|
23
23
|
**Contribution Types Supported**:
|
|
24
|
-
-
|
|
24
|
+
- Squads (new agents, tasks, workflows)
|
|
25
25
|
- Agent improvements (enhanced prompts, new commands)
|
|
26
26
|
- Task refinements (better checklists, templates)
|
|
27
27
|
- Tool integrations (new MCP tools)
|
|
@@ -183,7 +183,7 @@ To help users contribute to the AIOS open-source project (`@synkra/aios-core`) b
|
|
|
183
183
|
```
|
|
184
184
|
feat(Squad): add content-creator pack with Instagram agent
|
|
185
185
|
|
|
186
|
-
Implements a complete content creation
|
|
186
|
+
Implements a complete content creation squad with:
|
|
187
187
|
- Instagram content specialist agent
|
|
188
188
|
- 5 new tasks (create-post, schedule-content, analyze-performance, etc.)
|
|
189
189
|
- Template library for posts, stories, reels
|