aios-core 2.2.2 → 2.3.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.
Files changed (105) hide show
  1. package/.aios-core/.session/current-session.json +14 -14
  2. package/.aios-core/cli/commands/migrate/validate.js +1 -1
  3. package/.aios-core/core/docs/session-update-pattern.md +17 -10
  4. package/.aios-core/core/elicitation/elicitation-engine.js +11 -6
  5. package/.aios-core/core/elicitation/session-manager.js +2 -1
  6. package/.aios-core/core/registry/registry-schema.json +166 -166
  7. package/.aios-core/core/registry/service-registry.json +6585 -6585
  8. package/.aios-core/core-config.yaml +12 -1
  9. package/.aios-core/data/agent-config-requirements.yaml +5 -5
  10. package/.aios-core/development/agents/devops.md +12 -0
  11. package/.aios-core/development/scripts/squad/README.md +112 -0
  12. package/.aios-core/development/scripts/squad/index.js +41 -0
  13. package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
  14. package/.aios-core/development/scripts/squad/squad-validator.js +685 -0
  15. package/.aios-core/development/tasks/add-mcp.md +11 -5
  16. package/.aios-core/development/tasks/search-mcp.md +309 -0
  17. package/.aios-core/development/tasks/setup-mcp-docker.md +11 -8
  18. package/.aios-core/development/tasks/squad-creator-validate.md +151 -0
  19. package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +3 -3
  20. package/.aios-core/index.d.ts +7 -7
  21. package/.aios-core/index.js +1 -1
  22. package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
  23. package/.aios-core/infrastructure/scripts/component-generator.js +1 -1
  24. package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
  25. package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
  26. package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
  27. package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
  28. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
  29. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
  30. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
  31. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
  32. package/.aios-core/infrastructure/tests/utilities-audit-results.json +500 -500
  33. package/.aios-core/infrastructure/tools/README.md +1 -1
  34. package/.aios-core/install-manifest.yaml +4 -1
  35. package/.aios-core/manifests/schema/manifest-schema.json +190 -190
  36. package/.aios-core/manifests/workers.csv +203 -203
  37. package/.aios-core/package.json +102 -102
  38. package/.aios-core/product/templates/activation-instructions-template.md +7 -7
  39. package/.aios-core/product/templates/adr.hbs +125 -125
  40. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
  41. package/.aios-core/product/templates/dbdr.hbs +241 -241
  42. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
  43. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
  44. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
  45. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
  46. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
  47. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
  48. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
  49. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
  50. package/.aios-core/product/templates/epic.hbs +212 -212
  51. package/.aios-core/product/templates/eslintrc-security.json +32 -32
  52. package/.aios-core/product/templates/github-actions-cd.yml +212 -212
  53. package/.aios-core/product/templates/github-actions-ci.yml +172 -172
  54. package/.aios-core/product/templates/pmdr.hbs +186 -186
  55. package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
  56. package/.aios-core/product/templates/prd.hbs +201 -201
  57. package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
  58. package/.aios-core/product/templates/story.hbs +263 -263
  59. package/.aios-core/product/templates/task.hbs +170 -170
  60. package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
  61. package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
  62. package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
  63. package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
  64. package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
  65. package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
  66. package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
  67. package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
  68. package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
  69. package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
  70. package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
  71. package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
  72. package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
  73. package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
  74. package/.aios-core/product/templates/tmpl-view.sql +177 -177
  75. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
  76. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
  77. package/.aios-core/schemas/squad-schema.json +185 -0
  78. package/.aios-core/scripts/README.md +90 -322
  79. package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
  80. package/.claude/rules/mcp-usage.md +116 -100
  81. package/LICENSE +48 -48
  82. package/README.md +3 -4
  83. package/bin/aios.js +2 -1
  84. package/package.json +1 -3
  85. package/packages/installer/package.json +39 -39
  86. package/templates/squad/LICENSE +21 -21
  87. package/templates/squad/README.md +37 -37
  88. package/templates/squad/agents/example-agent.yaml +36 -36
  89. package/templates/squad/package.json +19 -19
  90. package/templates/squad/squad.yaml +25 -25
  91. package/templates/squad/tasks/example-task.yaml +46 -46
  92. package/templates/squad/templates/example-template.md +24 -24
  93. package/templates/squad/tests/example-agent.test.js +53 -53
  94. package/templates/squad/workflows/example-workflow.yaml +54 -54
  95. package/tools/diagnose-npx-issue.ps1 +96 -96
  96. package/tools/quick-diagnose.cmd +85 -85
  97. package/tools/quick-diagnose.ps1 +117 -117
  98. package/.aios-core/core/data/agent-config-requirements.yaml +0 -368
  99. package/.aios-core/core/data/aios-kb.md +0 -924
  100. package/.aios-core/core/data/workflow-patterns.yaml +0 -267
  101. package/.aios-core/product/templates/1mcp-config.yaml +0 -225
  102. package/.aios-core/scripts/context-detector.js +0 -226
  103. package/.aios-core/scripts/elicitation-engine.js +0 -385
  104. package/.aios-core/scripts/elicitation-session-manager.js +0 -300
  105. package/.claude/CLAUDE.md +0 -221
@@ -1,354 +1,122 @@
1
- # AIOS Utils - Utility Scripts Library
2
-
3
- This directory contains 68+ utility scripts that provide automation, validation, and helper functions for Synkra AIOS agents and workflows.
4
-
5
- ## Categories
6
-
7
- ### 🔍 **Core Validation & Analysis**
8
- Scripts for validating AIOS structures and analyzing code quality.
9
-
10
- - **aios-validator.js** - Validates AIOS structures (agents, tasks, workflows, stories)
11
- - **capability-analyzer.js** - Analyzes agent capabilities and requirements
12
- - **compatibility-checker.js** - Checks compatibility between components
13
- - **coverage-analyzer.js** - Analyzes test coverage metrics
14
- - **dependency-analyzer.js** - Analyzes dependencies and their impacts
15
- - **dependency-impact-analyzer.js** - Predicts impact of dependency changes
16
-
17
- ### 📋 **Story & Task Management**
18
- Tools for managing development stories, tasks, and workflows.
19
-
20
- - **story-manager.js** - Complete story lifecycle management
21
- - Create, update, delete stories
22
- - Track progress and status
23
- - Manage checkboxes and file lists
24
- - Integration with ClickUp
25
-
26
- - **batch-creator.js** - Batch creation of stories/tasks
27
- - **task-router.js** - Routes tasks to appropriate agents
28
- - **workflow-orchestrator.js** - Orchestrates multi-step workflows
29
-
30
- ### 🔧 **Tool & Integration Management**
31
- Scripts for managing tools, MCPs, and external integrations.
32
-
33
- - **tool-resolver.js** - Discovers and validates available tools
34
- - CLI tools detection
35
- - MCP server validation
36
- - Capability matching
37
- - Environment verification
38
-
39
- - **clickup-helpers.js** - ClickUp API utility functions
40
- - Task operations
41
- - Sprint management
42
- - Custom fields handling
43
- - Webhook utilities
44
-
45
- ### 🧩 **Component Generation**
46
- Generators for creating various component types.
47
-
48
- - **component-generator.js** - Generates React/Vue/Angular components
49
- - **component-metadata.js** - Extracts component metadata
50
- - **component-preview.js** - Generates component previews
51
- - **component-search.js** - Searches for components in codebase
52
- - **test-generator.js** - Generates test suites
53
- - **migration-generator.js** - Generates database migrations
54
- - **schema-generator.js** - Generates schema definitions
55
-
56
- ### 📝 **Documentation & Code Quality**
57
- Tools for maintaining documentation and code quality.
58
-
59
- - **documentation-synchronizer.js** - Syncs documentation with code
60
- - **code-quality-improver.js** - Suggests code quality improvements
61
- - **commit-message-generator.js** - Generates semantic commit messages
62
- - **changelog-generator.js** - Generates CHANGELOG entries
63
- - **diff-generator.js** - Generates structured diffs
64
-
65
- ### 🔄 **Version Control & Git**
66
- Git workflow automation and version control helpers.
67
-
68
- - **branch-manager.js** - Manages Git branches
69
- - **conflict-manager.js** - Handles merge conflicts
70
- - **conflict-resolver.js** - Resolves common conflict patterns
71
- - **pr-validator.js** - Validates pull requests
72
- - **release-manager.js** - Manages releases and versioning
73
-
74
- ### 💾 **Backup & Recovery**
75
- Data backup and recovery utilities.
76
-
77
- - **backup-manager.js** - Automated backups
78
- - Story backups
79
- - Configuration backups
80
- - Code snapshots
81
- - Rollback capabilities
82
-
83
- - **recovery-manager.js** - Recovery operations
84
- - **snapshot-manager.js** - Manages code snapshots
85
-
86
- ### 🎯 **Workflow Automation**
87
- Scripts for automating development workflows.
88
-
89
- - **approval-workflow.js** - Handles approval workflows
90
- - **change-propagation-predictor.js** - Predicts change impacts
91
- - **elicitation-engine.js** - Interactive requirement gathering
92
- - **qa-automation.js** - Automated QA workflows
93
- - **test-orchestrator.js** - Orchestrates test execution
94
-
95
- ### 🔌 **API & Integration**
96
- API helpers and integration utilities.
97
-
98
- - **api-client-generator.js** - Generates API clients
99
- - **webhook-manager.js** - Manages webhooks
100
- - **supabase-helpers.js** - Supabase utility functions
101
- - **railway-helpers.js** - Railway deployment helpers
102
-
103
- ### 🧪 **Testing Utilities**
104
- Testing support and test data management.
105
-
106
- - **test-data-generator.js** - Generates test data
107
- - **mock-generator.js** - Generates mocks and stubs
108
- - **performance-profiler.js** - Profiles performance
109
- - **security-scanner.js** - Scans for security issues
110
-
111
- ### 🗄️ **Data Management**
112
- Data transformation and management tools.
113
-
114
- - **yaml-parser.js** - YAML parsing with validation
115
- - **json-transformer.js** - JSON transformation utilities
116
- - **markdown-processor.js** - Markdown processing
117
- - **template-engine.js** - Template rendering engine
118
-
119
- ### 🔐 **Security & Validation**
120
- Security scanning and input validation.
121
-
122
- - **secret-scanner.js** - Scans for exposed secrets
123
- - **input-validator.js** - Validates user inputs
124
- - **permission-checker.js** - Checks permissions
125
- - **rate-limiter.js** - Rate limiting utilities
126
-
127
- ### 📊 **Monitoring & Logging**
128
- Logging, monitoring, and observability tools.
129
-
130
- - **logger.js** - Structured logging
131
- - **metrics-collector.js** - Collects metrics
132
- - **health-checker.js** - Health check utilities
133
- - **error-tracker.js** - Error tracking and reporting
134
-
135
- ### 🎨 **UI & Presentation**
136
- UI generation and formatting utilities.
137
-
138
- - **markdown-renderer.js** - Renders Markdown to HTML
139
- - **syntax-highlighter.js** - Syntax highlighting
140
- - **diagram-generator.js** - Generates diagrams
141
- - **report-formatter.js** - Formats reports
142
-
143
- ## Usage Examples
144
-
145
- ### Story Management
146
-
147
- ```javascript
148
- const { StoryManager } = require('./story-manager');
149
-
150
- // Create new story
151
- const story = await StoryManager.create({
152
- title: 'Implement user authentication',
153
- epic: 'User Management',
154
- assignee: '@dev'
155
- });
156
-
157
- // Update story progress
158
- await story.updateTask(taskId, { status: 'completed' });
159
-
160
- // Get story status
161
- const status = await story.getStatus();
1
+ # AIOS Scripts - Legacy Directory
2
+
3
+ > **Note**: This directory now contains only legacy/migration scripts and a few active utilities.
4
+ > Most scripts have been migrated to the modular structure (Story 6.16).
5
+
6
+ ## Current Structure
7
+
8
+ Scripts are now organized by domain across three locations:
9
+
10
+ | Location | Purpose |
11
+ |----------|---------|
12
+ | `.aios-core/core/` | Core framework modules (elicitation, session) |
13
+ | `.aios-core/development/scripts/` | Development scripts (greeting, workflow, hooks) |
14
+ | `.aios-core/infrastructure/scripts/` | Infrastructure scripts (git config, validators) |
15
+ | `.aios-core/scripts/` (this directory) | Legacy utilities and migration scripts |
16
+
17
+ ## Scripts in This Directory
18
+
19
+ ### Active Scripts
20
+
21
+ | Script | Description |
22
+ |--------|-------------|
23
+ | `session-context-loader.js` | Loads session context for agents |
24
+ | `command-execution-hook.js` | Hook for command execution |
25
+ | `test-template-system.js` | Internal test utility for templates |
26
+
27
+ ### Migration Scripts
28
+
29
+ | Script | Description |
30
+ |--------|-------------|
31
+ | `batch-migrate-*.ps1` | Batch migration utilities |
32
+ | `migrate-framework-docs.sh` | Documentation migration script |
33
+ | `validate-phase1.ps1` | Phase 1 validation script |
34
+
35
+ ## Script Path Mapping
36
+
37
+ If you're looking for a script that was previously here, use this mapping:
38
+
39
+ ```text
40
+ OLD PATH NEW PATH
41
+ ----------------------------------------- ------------------------------------------
42
+ .aios-core/scripts/context-detector.js → .aios-core/core/session/context-detector.js
43
+ .aios-core/scripts/elicitation-engine.js → .aios-core/core/elicitation/elicitation-engine.js
44
+ .aios-core/scripts/elicitation-session-manager.js → .aios-core/core/elicitation/session-manager.js
45
+ .aios-core/scripts/greeting-builder.js → .aios-core/development/scripts/greeting-builder.js
46
+ .aios-core/scripts/workflow-navigator.js → .aios-core/development/scripts/workflow-navigator.js
47
+ .aios-core/scripts/agent-exit-hooks.js → .aios-core/development/scripts/agent-exit-hooks.js
48
+ .aios-core/scripts/git-config-detector.js .aios-core/infrastructure/scripts/git-config-detector.js
49
+ .aios-core/scripts/project-status-loader.js → .aios-core/infrastructure/scripts/project-status-loader.js
50
+ .aios-core/scripts/aios-validator.js .aios-core/infrastructure/scripts/aios-validator.js
51
+ .aios-core/scripts/tool-resolver.js .aios-core/infrastructure/scripts/tool-resolver.js
52
+ .aios-core/scripts/output-formatter.js .aios-core/infrastructure/scripts/output-formatter.js
162
53
  ```
163
54
 
164
- ### Tool Discovery
165
-
166
- ```javascript
167
- const { resolveTools } = require('./tool-resolver');
168
-
169
- // Get all available tools
170
- const tools = await resolveTools();
55
+ ## Configuration
171
56
 
172
- // Get specific tool category
173
- const mcpServers = await resolveTools({
174
- category: 'mcp',
175
- required: true
176
- });
57
+ The `scriptsLocation` in `core-config.yaml` now uses a modular structure:
177
58
 
178
- // Check tool availability
179
- const isAvailable = await resolveTools.checkTool('gh');
59
+ ```yaml
60
+ scriptsLocation:
61
+ core: .aios-core/core
62
+ development: .aios-core/development/scripts
63
+ infrastructure: .aios-core/infrastructure/scripts
64
+ legacy: .aios-core/scripts # This directory
180
65
  ```
181
66
 
182
- ### Component Generation
183
-
184
- ```javascript
185
- const { generateComponent } = require('./component-generator');
186
-
187
- // Generate React component
188
- await generateComponent({
189
- name: 'UserProfile',
190
- type: 'react',
191
- props: ['user', 'onEdit'],
192
- features: ['typescript', 'tests']
193
- });
194
- ```
67
+ ## Usage Examples
195
68
 
196
- ### Validation
69
+ ### Loading Core Scripts
197
70
 
198
71
  ```javascript
199
- const { validate } = require('./aios-validator');
72
+ // Elicitation Engine (from core)
73
+ const ElicitationEngine = require('./.aios-core/core/elicitation/elicitation-engine');
200
74
 
201
- // Validate agent definition
202
- const result = await validate.agent('path/to/agent.yaml');
203
-
204
- // Validate story structure
205
- const storyValid = await validate.story('docs/stories/1.1-feature.md');
206
-
207
- // Validate workflow
208
- const workflowValid = await validate.workflow('workflows/deploy.yaml');
75
+ // Context Detector (from core)
76
+ const ContextDetector = require('./.aios-core/core/session/context-detector');
209
77
  ```
210
78
 
211
- ## Best Practices
212
-
213
- ### 1. Error Handling
214
-
215
- All utilities use consistent error handling:
79
+ ### Loading Development Scripts
216
80
 
217
81
  ```javascript
218
- try {
219
- const result = await utility.operation();
220
- return result;
221
- } catch (error) {
222
- if (error.code === 'VALIDATION_ERROR') {
223
- // Handle validation errors
224
- }
225
- throw error;
226
- }
227
- ```
228
-
229
- ### 2. Configuration
82
+ // Greeting Builder
83
+ const GreetingBuilder = require('./.aios-core/development/scripts/greeting-builder');
230
84
 
231
- Utilities read configuration from `core-config.yaml`:
232
-
233
- ```javascript
234
- const config = require('../core-config.yaml');
235
- const utilsLocation = config.utilsLocation;
85
+ // Workflow Navigator
86
+ const WorkflowNavigator = require('./.aios-core/development/scripts/workflow-navigator');
236
87
  ```
237
88
 
238
- ### 3. Logging
239
-
240
- Use the built-in logger for consistent output:
89
+ ### Loading Infrastructure Scripts
241
90
 
242
91
  ```javascript
243
- const logger = require('./logger');
92
+ // Project Status Loader
93
+ const { loadProjectStatus } = require('./.aios-core/infrastructure/scripts/project-status-loader');
244
94
 
245
- logger.info('Operation started', { context });
246
- logger.error('Operation failed', { error });
95
+ // Git Config Detector
96
+ const GitConfigDetector = require('./.aios-core/infrastructure/scripts/git-config-detector');
247
97
  ```
248
98
 
249
- ### 4. Testing
250
-
251
- Each utility should have corresponding tests:
252
-
253
- ```javascript
254
- // Example: aios-validator.test.js
255
- describe('aios-validator', () => {
256
- it('validates agent structure', async () => {
257
- const result = await validate.agent(validAgent);
258
- expect(result.valid).toBe(true);
259
- });
260
- });
261
- ```
262
-
263
- ## Adding New Utilities
264
-
265
- ### Structure
99
+ ### Loading Legacy Scripts (this directory)
266
100
 
267
101
  ```javascript
268
- /**
269
- * @file utility-name.js
270
- * @description Brief description of what this utility does
271
- */
272
-
273
- const config = require('../core-config.yaml');
274
- const logger = require('./logger');
275
-
276
- class UtilityName {
277
- constructor(options = {}) {
278
- this.options = options;
279
- }
280
-
281
- async mainOperation(params) {
282
- try {
283
- // Implementation
284
- logger.info('Operation successful');
285
- return result;
286
- } catch (error) {
287
- logger.error('Operation failed', { error });
288
- throw error;
289
- }
290
- }
291
- }
292
-
293
- module.exports = UtilityName;
102
+ // Session Context Loader
103
+ const sessionLoader = require('./.aios-core/scripts/session-context-loader');
294
104
  ```
295
105
 
296
- ### Documentation
297
-
298
- 1. Add JSDoc comments
299
- 2. Include usage examples
300
- 3. Document all parameters
301
- 4. List error codes
302
- 5. Update this README
303
-
304
- ### Testing
305
-
306
- 1. Create corresponding `.test.js` file
307
- 2. Test happy path
308
- 3. Test error cases
309
- 4. Test edge cases
310
- 5. Run: `npm test utils/utility-name.test.js`
311
-
312
- ## Troubleshooting
313
-
314
- ### Utility Not Found
315
-
316
- ```bash
317
- # Verify utility exists
318
- ls -la .aios-core/scripts/utility-name.js
319
-
320
- # Check require path
321
- node -e "require('./.aios-core/scripts/utility-name')"
322
- ```
323
-
324
- ### Permission Errors
325
-
326
- ```bash
327
- # Check file permissions
328
- chmod +x .aios-core/scripts/*.js
329
-
330
- # Check directory permissions
331
- ls -ld .aios-core/scripts/
332
- ```
333
-
334
- ### Configuration Issues
106
+ ## Related Documentation
335
107
 
336
- ```bash
337
- # Validate core-config.yaml
338
- node .aios-core/scripts/aios-validator.js --config
108
+ - [Core Config](../core-config.yaml) - scriptsLocation configuration
109
+ - [Core Module](../core/README.md) - Core framework modules
110
+ - [Development Scripts](../development/scripts/README.md) - Development utilities
111
+ - [Infrastructure Scripts](../infrastructure/scripts/README.md) - Infrastructure utilities
339
112
 
340
- # Check utilsLocation setting
341
- grep utilsLocation .aios-core/core-config.yaml
342
- ```
343
-
344
- ## Related Documentation
113
+ ## Migration History
345
114
 
346
- - [Tools Directory](../tools/README.md)
347
- - [Agent Development Guide](../../docs/agent-guide.md)
348
- - [Core Configuration](../core-config.yaml)
349
- - [Testing Guide](../../docs/testing-guide.md)
115
+ | Date | Story | Change |
116
+ |------|-------|--------|
117
+ | 2025-12-18 | 6.16 | Deleted deprecated scripts, updated documentation |
118
+ | 2025-01-15 | 2.2 | Initial script reorganization to modular structure |
350
119
 
351
120
  ---
352
121
 
353
- *Last updated: 2025-10-22 - Documentation Sync Initiative*
354
- *Total utilities: 68 scripts*
122
+ **Last updated:** 2025-12-18 - Story 6.16 Scripts Path Consolidation