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.
- package/.aios-core/.session/current-session.json +14 -14
- package/.aios-core/cli/commands/migrate/validate.js +1 -1
- package/.aios-core/core/docs/session-update-pattern.md +17 -10
- package/.aios-core/core/elicitation/elicitation-engine.js +11 -6
- package/.aios-core/core/elicitation/session-manager.js +2 -1
- package/.aios-core/core/registry/registry-schema.json +166 -166
- package/.aios-core/core/registry/service-registry.json +6585 -6585
- package/.aios-core/core-config.yaml +12 -1
- package/.aios-core/data/agent-config-requirements.yaml +5 -5
- package/.aios-core/development/agents/devops.md +12 -0
- package/.aios-core/development/scripts/squad/README.md +112 -0
- package/.aios-core/development/scripts/squad/index.js +41 -0
- package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
- package/.aios-core/development/scripts/squad/squad-validator.js +685 -0
- package/.aios-core/development/tasks/add-mcp.md +11 -5
- package/.aios-core/development/tasks/search-mcp.md +309 -0
- package/.aios-core/development/tasks/setup-mcp-docker.md +11 -8
- package/.aios-core/development/tasks/squad-creator-validate.md +151 -0
- package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +3 -3
- package/.aios-core/index.d.ts +7 -7
- package/.aios-core/index.js +1 -1
- package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
- package/.aios-core/infrastructure/scripts/component-generator.js +1 -1
- package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
- package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
- package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
- package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
- package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
- package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
- package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
- package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
- package/.aios-core/infrastructure/tests/utilities-audit-results.json +500 -500
- package/.aios-core/infrastructure/tools/README.md +1 -1
- package/.aios-core/install-manifest.yaml +4 -1
- package/.aios-core/manifests/schema/manifest-schema.json +190 -190
- package/.aios-core/manifests/workers.csv +203 -203
- package/.aios-core/package.json +102 -102
- package/.aios-core/product/templates/activation-instructions-template.md +7 -7
- package/.aios-core/product/templates/adr.hbs +125 -125
- package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
- package/.aios-core/product/templates/dbdr.hbs +241 -241
- package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
- package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
- package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
- package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
- package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
- package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
- package/.aios-core/product/templates/epic.hbs +212 -212
- package/.aios-core/product/templates/eslintrc-security.json +32 -32
- package/.aios-core/product/templates/github-actions-cd.yml +212 -212
- package/.aios-core/product/templates/github-actions-ci.yml +172 -172
- package/.aios-core/product/templates/pmdr.hbs +186 -186
- package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
- package/.aios-core/product/templates/prd.hbs +201 -201
- package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
- package/.aios-core/product/templates/story.hbs +263 -263
- package/.aios-core/product/templates/task.hbs +170 -170
- package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
- package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
- package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
- package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
- package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
- package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
- package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
- package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
- package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
- package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
- package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
- package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
- package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
- package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
- package/.aios-core/product/templates/tmpl-view.sql +177 -177
- package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
- package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
- package/.aios-core/schemas/squad-schema.json +185 -0
- package/.aios-core/scripts/README.md +90 -322
- package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
- package/.claude/rules/mcp-usage.md +116 -100
- package/LICENSE +48 -48
- package/README.md +3 -4
- package/bin/aios.js +2 -1
- package/package.json +1 -3
- package/packages/installer/package.json +39 -39
- package/templates/squad/LICENSE +21 -21
- package/templates/squad/README.md +37 -37
- package/templates/squad/agents/example-agent.yaml +36 -36
- package/templates/squad/package.json +19 -19
- package/templates/squad/squad.yaml +25 -25
- package/templates/squad/tasks/example-task.yaml +46 -46
- package/templates/squad/templates/example-template.md +24 -24
- package/templates/squad/tests/example-agent.test.js +53 -53
- package/templates/squad/workflows/example-workflow.yaml +54 -54
- package/tools/diagnose-npx-issue.ps1 +96 -96
- package/tools/quick-diagnose.cmd +85 -85
- package/tools/quick-diagnose.ps1 +117 -117
- package/.aios-core/core/data/agent-config-requirements.yaml +0 -368
- package/.aios-core/core/data/aios-kb.md +0 -924
- package/.aios-core/core/data/workflow-patterns.yaml +0 -267
- package/.aios-core/product/templates/1mcp-config.yaml +0 -225
- package/.aios-core/scripts/context-detector.js +0 -226
- package/.aios-core/scripts/elicitation-engine.js +0 -385
- package/.aios-core/scripts/elicitation-session-manager.js +0 -300
- package/.claude/CLAUDE.md +0 -221
|
@@ -1,354 +1,122 @@
|
|
|
1
|
-
# AIOS
|
|
2
|
-
|
|
3
|
-
This directory contains
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Scripts
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
179
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
69
|
+
### Loading Core Scripts
|
|
197
70
|
|
|
198
71
|
```javascript
|
|
199
|
-
|
|
72
|
+
// Elicitation Engine (from core)
|
|
73
|
+
const ElicitationEngine = require('./.aios-core/core/elicitation/elicitation-engine');
|
|
200
74
|
|
|
201
|
-
//
|
|
202
|
-
const
|
|
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
|
-
|
|
212
|
-
|
|
213
|
-
### 1. Error Handling
|
|
214
|
-
|
|
215
|
-
All utilities use consistent error handling:
|
|
79
|
+
### Loading Development Scripts
|
|
216
80
|
|
|
217
81
|
```javascript
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
239
|
-
|
|
240
|
-
Use the built-in logger for consistent output:
|
|
89
|
+
### Loading Infrastructure Scripts
|
|
241
90
|
|
|
242
91
|
```javascript
|
|
243
|
-
|
|
92
|
+
// Project Status Loader
|
|
93
|
+
const { loadProjectStatus } = require('./.aios-core/infrastructure/scripts/project-status-loader');
|
|
244
94
|
|
|
245
|
-
|
|
246
|
-
|
|
95
|
+
// Git Config Detector
|
|
96
|
+
const GitConfigDetector = require('./.aios-core/infrastructure/scripts/git-config-detector');
|
|
247
97
|
```
|
|
248
98
|
|
|
249
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
337
|
-
|
|
338
|
-
|
|
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
|
-
|
|
341
|
-
grep utilsLocation .aios-core/core-config.yaml
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
## Related Documentation
|
|
113
|
+
## Migration History
|
|
345
114
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
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
|
-
|
|
354
|
-
*Total utilities: 68 scripts*
|
|
122
|
+
**Last updated:** 2025-12-18 - Story 6.16 Scripts Path Consolidation
|