aios-core 2.1.1 → 2.1.2

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.
@@ -0,0 +1,444 @@
1
+ ---
2
+
3
+ ## Execution Modes
4
+
5
+ **Choose your execution mode:**
6
+
7
+ ### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
8
+ - Autonomous decision making with logging
9
+ - Minimal user interaction
10
+ - **Best for:** Greenfield projects, quick setup
11
+
12
+ ### 2. Interactive Mode - Balanced, Educational (5-10 prompts) **[DEFAULT]**
13
+ - Explicit decision checkpoints
14
+ - Educational explanations
15
+ - **Best for:** Brownfield projects, complex configurations
16
+
17
+ ### 3. Pre-Flight Planning - Comprehensive Upfront Planning
18
+ - Task analysis phase (identify all ambiguities)
19
+ - Zero ambiguity execution
20
+ - **Best for:** Critical projects, enterprise setups
21
+
22
+ **Parameter:** `mode` (optional, default: `interactive`)
23
+
24
+ ---
25
+
26
+ ## Task Definition (AIOS Task Format V1.0)
27
+
28
+ ```yaml
29
+ task: setupProjectDocs()
30
+ responsável: dev (Developer)
31
+ responsavel_type: Agente
32
+ atomic_layer: Documentation
33
+
34
+ **Entrada:**
35
+ - campo: targetDir
36
+ tipo: string
37
+ origem: User Input or cwd
38
+ obrigatório: false
39
+ validação: Valid directory path
40
+
41
+ - campo: projectName
42
+ tipo: string
43
+ origem: User Input or package.json
44
+ obrigatório: false
45
+ validação: Non-empty string
46
+
47
+ - campo: mode
48
+ tipo: string
49
+ origem: User Input
50
+ obrigatório: false
51
+ validação: greenfield|brownfield|framework-dev
52
+
53
+ - campo: executionMode
54
+ tipo: string
55
+ origem: User Input
56
+ obrigatório: false
57
+ validação: yolo|interactive|pre-flight
58
+
59
+ **Saída:**
60
+ - campo: docs_generated
61
+ tipo: array
62
+ destino: .aios-core/docs/
63
+ persistido: true
64
+
65
+ - campo: core_config
66
+ tipo: file
67
+ destino: .aios-core/core-config.yaml
68
+ persistido: true
69
+
70
+ - campo: gitignore
71
+ tipo: file
72
+ destino: .gitignore
73
+ persistido: true
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Pre-Conditions
79
+
80
+ **Purpose:** Validate prerequisites BEFORE task execution (blocking)
81
+
82
+ **Checklist:**
83
+
84
+ ```yaml
85
+ pre-conditions:
86
+ - [ ] Target directory exists and is writable
87
+ tipo: pre-condition
88
+ blocker: true
89
+ validação: |
90
+ Check target directory exists and has write permissions
91
+ error_message: "Pre-condition failed: Target directory not accessible"
92
+
93
+ - [ ] Documentation Integrity module is available
94
+ tipo: pre-condition
95
+ blocker: true
96
+ validação: |
97
+ Verify .aios-core/infrastructure/scripts/documentation-integrity/index.js exists
98
+ error_message: "Pre-condition failed: Documentation Integrity module not found"
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Post-Conditions
104
+
105
+ **Purpose:** Validate execution success AFTER task completes
106
+
107
+ **Checklist:**
108
+
109
+ ```yaml
110
+ post-conditions:
111
+ - [ ] Project docs created in .aios-core/docs/
112
+ tipo: post-condition
113
+ blocker: true
114
+ validação: |
115
+ Verify source-tree.md, coding-standards.md, tech-stack.md exist
116
+ error_message: "Post-condition failed: Documentation files not created"
117
+
118
+ - [ ] core-config.yaml created with valid deployment section
119
+ tipo: post-condition
120
+ blocker: true
121
+ validação: |
122
+ Verify .aios-core/core-config.yaml exists and has deployment configuration
123
+ error_message: "Post-condition failed: core-config.yaml not properly configured"
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Acceptance Criteria
129
+
130
+ **Purpose:** Definitive pass/fail criteria for task completion
131
+
132
+ **Checklist:**
133
+
134
+ ```yaml
135
+ acceptance-criteria:
136
+ - [ ] All documentation files generated from templates
137
+ tipo: acceptance-criterion
138
+ blocker: true
139
+ validação: |
140
+ Assert docs contain project-specific content, not placeholders
141
+ error_message: "Acceptance criterion not met: Docs contain unresolved placeholders"
142
+
143
+ - [ ] .gitignore properly configured for project
144
+ tipo: acceptance-criterion
145
+ blocker: true
146
+ validação: |
147
+ Assert .gitignore includes AIOS ignores and tech stack ignores
148
+ error_message: "Acceptance criterion not met: .gitignore incomplete"
149
+
150
+ - [ ] Configuration-Driven Architecture pattern applied
151
+ tipo: acceptance-criterion
152
+ blocker: true
153
+ validação: |
154
+ Assert core-config.yaml contains project-specific values
155
+ error_message: "Acceptance criterion not met: core-config.yaml not configuration-driven"
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Tools
161
+
162
+ **External/shared resources used by this task:**
163
+
164
+ - **Tool:** documentation-integrity
165
+ - **Purpose:** Mode detection, doc generation, config generation
166
+ - **Source:** .aios-core/infrastructure/scripts/documentation-integrity/index.js
167
+
168
+ - **Tool:** deployment-config-loader
169
+ - **Purpose:** Load and validate deployment configuration
170
+ - **Source:** .aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js
171
+
172
+ ---
173
+
174
+ ## Scripts
175
+
176
+ **Agent-specific code for this task:**
177
+
178
+ - **Script:** mode-detector.js
179
+ - **Purpose:** Detect installation mode from project markers
180
+ - **Language:** JavaScript
181
+ - **Location:** .aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js
182
+
183
+ - **Script:** doc-generator.js
184
+ - **Purpose:** Generate project documentation from templates
185
+ - **Language:** JavaScript
186
+ - **Location:** .aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js
187
+
188
+ - **Script:** config-generator.js
189
+ - **Purpose:** Generate core-config.yaml
190
+ - **Language:** JavaScript
191
+ - **Location:** .aios-core/infrastructure/scripts/documentation-integrity/config-generator.js
192
+
193
+ - **Script:** gitignore-generator.js
194
+ - **Purpose:** Generate or merge .gitignore
195
+ - **Language:** JavaScript
196
+ - **Location:** .aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js
197
+
198
+ ---
199
+
200
+ ## Error Handling
201
+
202
+ **Strategy:** fallback-defaults
203
+
204
+ **Common Errors:**
205
+
206
+ 1. **Error:** Mode Detection Failed
207
+ - **Cause:** Unable to determine project type from markers
208
+ - **Resolution:** Use default mode (greenfield) or prompt user
209
+ - **Recovery:** Provide mode selection options
210
+
211
+ 2. **Error:** Template Not Found
212
+ - **Cause:** Template file missing from templates directory
213
+ - **Resolution:** Check template paths in templates/project-docs/
214
+ - **Recovery:** Use inline fallback templates
215
+
216
+ 3. **Error:** Config Write Failed
217
+ - **Cause:** Permission denied or disk full
218
+ - **Resolution:** Check directory permissions
219
+ - **Recovery:** Output config to console for manual creation
220
+
221
+ ---
222
+
223
+ ## Performance
224
+
225
+ **Expected Metrics:**
226
+
227
+ ```yaml
228
+ duration_expected: 1-3 min (estimated)
229
+ cost_estimated: $0.001-0.003
230
+ token_usage: ~500-2,000 tokens
231
+ ```
232
+
233
+ **Optimization Notes:**
234
+ - Uses template-based generation for fast execution
235
+ - Minimal file I/O with batched writes
236
+ - Configuration-Driven Architecture reduces runtime decisions
237
+
238
+ ---
239
+
240
+ ## Metadata
241
+
242
+ ```yaml
243
+ story: 6.9
244
+ version: 1.0.0
245
+ dependencies:
246
+ - documentation-integrity module
247
+ tags:
248
+ - documentation
249
+ - setup
250
+ - configuration
251
+ updated_at: 2025-12-14
252
+ ```
253
+
254
+ ---
255
+
256
+ tools:
257
+ - filesystem # Read/write project files
258
+ - documentation-integrity # Core module for this task
259
+ ---
260
+
261
+ # Setup Project Documentation
262
+
263
+ ## Purpose
264
+
265
+ Generate project-specific documentation and configuration using the Documentation Integrity System. This task creates the foundational docs that enable AI agents to understand project structure, coding standards, and deployment configuration.
266
+
267
+ ## Task Instructions
268
+
269
+ ### 1. Detect Installation Mode
270
+
271
+ First, determine the installation mode based on project markers:
272
+
273
+ ```javascript
274
+ const { detectInstallationMode, collectMarkers } = require('./.aios-core/infrastructure/scripts/documentation-integrity');
275
+
276
+ const targetDir = process.cwd(); // or specified directory
277
+ const detected = detectInstallationMode(targetDir);
278
+ const markers = collectMarkers(targetDir);
279
+
280
+ console.log(`Detected Mode: ${detected.mode}`);
281
+ console.log(`Confidence: ${detected.confidence}`);
282
+ console.log(`Reason: ${detected.reason}`);
283
+ ```
284
+
285
+ **Mode Descriptions:**
286
+
287
+ | Mode | Description | Actions |
288
+ |------|-------------|---------|
289
+ | `framework-dev` | Contributing to aios-core itself | Skip project setup, use existing config |
290
+ | `greenfield` | New empty project | Full scaffolding, deployment config wizard |
291
+ | `brownfield` | Existing project | Analyze and adapt, merge configurations |
292
+
293
+ ### 2. Elicit Deployment Configuration (Greenfield/Brownfield)
294
+
295
+ For greenfield and brownfield projects, gather deployment preferences:
296
+
297
+ **Key Questions:**
298
+
299
+ 1. **Deployment Workflow:**
300
+ - `staging-first`: All changes go to staging before production
301
+ - `direct-to-main`: Feature branches merge directly to main
302
+
303
+ 2. **Deployment Platform:**
304
+ - `vercel`: Vercel deployment
305
+ - `netlify`: Netlify deployment
306
+ - `aws`: AWS (S3/CloudFront, ECS, Lambda)
307
+ - `gcp`: Google Cloud Platform
308
+ - `azure`: Microsoft Azure
309
+ - `railway`: Railway.app
310
+ - `custom`: Custom deployment scripts
311
+
312
+ 3. **Branch Configuration:**
313
+ - Staging branch name (default: `staging`)
314
+ - Production branch name (default: `main`)
315
+
316
+ 4. **Quality Gates:**
317
+ - Enable lint check? (default: yes)
318
+ - Enable typecheck? (default: yes for TypeScript projects)
319
+ - Enable tests? (default: yes)
320
+ - Enable security scan? (default: no)
321
+
322
+ ### 3. Generate Documentation
323
+
324
+ Using the gathered context, generate project documentation:
325
+
326
+ ```javascript
327
+ const { buildDocContext, generateDocs } = require('./.aios-core/infrastructure/scripts/documentation-integrity');
328
+
329
+ const context = buildDocContext(projectName, mode, markers, {
330
+ // Custom overrides if needed
331
+ });
332
+
333
+ const result = generateDocs(targetDir, context, {
334
+ dryRun: false, // Set true to preview
335
+ });
336
+
337
+ console.log(`Generated ${result.filesCreated.length} documentation files`);
338
+ ```
339
+
340
+ **Files Generated:**
341
+
342
+ | File | Purpose |
343
+ |------|---------|
344
+ | `.aios-core/docs/source-tree.md` | Project structure documentation |
345
+ | `.aios-core/docs/coding-standards.md` | Coding conventions and patterns |
346
+ | `.aios-core/docs/tech-stack.md` | Technology stack reference |
347
+
348
+ ### 4. Generate Core Configuration
349
+
350
+ Create the core-config.yaml with deployment settings:
351
+
352
+ ```javascript
353
+ const { buildConfigContext, generateConfig, DeploymentWorkflow, DeploymentPlatform } = require('./.aios-core/infrastructure/scripts/documentation-integrity');
354
+
355
+ const configContext = buildConfigContext(projectName, mode, {
356
+ workflow: DeploymentWorkflow.STAGING_FIRST,
357
+ platform: DeploymentPlatform.VERCEL,
358
+ branches: {
359
+ staging: 'staging',
360
+ production: 'main',
361
+ },
362
+ quality_gates: {
363
+ lint: true,
364
+ typecheck: true,
365
+ tests: true,
366
+ security_scan: false,
367
+ },
368
+ });
369
+
370
+ const configResult = generateConfig(targetDir, mode, configContext);
371
+ ```
372
+
373
+ ### 5. Generate/Merge .gitignore
374
+
375
+ Handle .gitignore based on project state:
376
+
377
+ ```javascript
378
+ const { generateGitignoreFile, hasAiosIntegration } = require('./.aios-core/infrastructure/scripts/documentation-integrity');
379
+
380
+ const gitignoreResult = generateGitignoreFile(targetDir, markers, {
381
+ projectName,
382
+ merge: mode === 'brownfield', // Merge with existing for brownfield
383
+ });
384
+
385
+ console.log(`Gitignore ${gitignoreResult.mode}: ${gitignoreResult.path}`);
386
+ ```
387
+
388
+ ### 6. Verify Configuration-Driven Architecture
389
+
390
+ Confirm the deployment config can be loaded by other tasks:
391
+
392
+ ```javascript
393
+ const { loadDeploymentConfig, validateDeploymentConfig } = require('./.aios-core/infrastructure/scripts/documentation-integrity');
394
+
395
+ const deployConfig = loadDeploymentConfig(targetDir);
396
+ const validation = validateDeploymentConfig(deployConfig);
397
+
398
+ if (validation.valid) {
399
+ console.log('Configuration-Driven Architecture ready');
400
+ console.log(`Workflow: ${deployConfig.workflow}`);
401
+ console.log(`Platform: ${deployConfig.platform}`);
402
+ } else {
403
+ console.error('Configuration validation failed:', validation.errors);
404
+ }
405
+ ```
406
+
407
+ ## Success Criteria
408
+
409
+ - [ ] Installation mode correctly detected
410
+ - [ ] Project documentation generated in `.aios-core/docs/`
411
+ - [ ] `core-config.yaml` created with deployment section
412
+ - [ ] `.gitignore` properly configured (created or merged)
413
+ - [ ] Configuration passes validation
414
+ - [ ] No unresolved template placeholders in generated files
415
+
416
+ ## Output
417
+
418
+ After successful execution:
419
+
420
+ ```
421
+ Project Documentation Setup Complete
422
+ =====================================
423
+ Mode: greenfield
424
+ Project: my-awesome-app
425
+
426
+ Generated Files:
427
+ ✓ .aios-core/docs/source-tree.md
428
+ ✓ .aios-core/docs/coding-standards.md
429
+ ✓ .aios-core/docs/tech-stack.md
430
+ ✓ .aios-core/core-config.yaml
431
+ ✓ .gitignore (created)
432
+
433
+ Deployment Configuration:
434
+ Workflow: staging-first
435
+ Platform: vercel
436
+ Quality Gates: lint, typecheck, tests
437
+ ```
438
+
439
+ ## Notes
440
+
441
+ - This task implements the Configuration-Driven Architecture pattern
442
+ - Tasks read project-specific values from `core-config.yaml`
443
+ - For brownfield projects, existing configurations are preserved
444
+ - Use `*analyze-brownfield` task first for complex existing projects
@@ -152,7 +152,7 @@ function analyzeTechStack(targetDir, analysis) {
152
152
  try {
153
153
  const requirements = fs.readFileSync(
154
154
  path.join(targetDir, 'requirements.txt'),
155
- 'utf8'
155
+ 'utf8',
156
156
  );
157
157
 
158
158
  if (requirements.includes('django')) analysis.frameworks.push('Django');
@@ -267,7 +267,7 @@ function analyzeWorkflows(targetDir, analysis) {
267
267
  const workflows = fs.readdirSync(githubWorkflowsDir);
268
268
  if (workflows.length > 0) {
269
269
  analysis.manualReviewItems.push(
270
- `Review ${workflows.length} existing GitHub workflow(s) for potential conflicts`
270
+ `Review ${workflows.length} existing GitHub workflow(s) for potential conflicts`,
271
271
  );
272
272
  }
273
273
  } catch {
@@ -327,7 +327,7 @@ function analyzeDirectoryStructure(targetDir, analysis) {
327
327
  const archDir = path.join(targetDir, 'docs', 'architecture');
328
328
  if (fs.existsSync(archDir)) {
329
329
  analysis.conflicts.push(
330
- 'docs/architecture/ already exists - AIOS docs may need different location'
330
+ 'docs/architecture/ already exists - AIOS docs may need different location',
331
331
  );
332
332
  }
333
333
  }
@@ -342,7 +342,7 @@ function generateRecommendations(analysis) {
342
342
  // Linting recommendations
343
343
  if (analysis.linting !== 'none') {
344
344
  analysis.recommendations.push(
345
- `Preserve existing ${analysis.linting} configuration - AIOS will adapt`
345
+ `Preserve existing ${analysis.linting} configuration - AIOS will adapt`,
346
346
  );
347
347
  } else {
348
348
  analysis.recommendations.push('Consider adding ESLint/Flake8 for code quality');
@@ -351,7 +351,7 @@ function generateRecommendations(analysis) {
351
351
  // Formatting recommendations
352
352
  if (analysis.formatting !== 'none') {
353
353
  analysis.recommendations.push(
354
- `Keep existing ${analysis.formatting} settings - AIOS coding-standards.md will document them`
354
+ `Keep existing ${analysis.formatting} settings - AIOS coding-standards.md will document them`,
355
355
  );
356
356
  }
357
357
 
@@ -438,7 +438,7 @@ function formatMigrationReport(analysis) {
438
438
  // Workflows
439
439
  lines.push(`║${''.padEnd(width)}║`);
440
440
  lines.push(
441
- `║ Existing Workflows: ${(analysis.hasExistingWorkflows ? 'Yes' : 'No').padEnd(width - 24)}║`
441
+ `║ Existing Workflows: ${(analysis.hasExistingWorkflows ? 'Yes' : 'No').padEnd(width - 24)}║`,
442
442
  );
443
443
  lines.push(`║ Merge Strategy: ${analysis.mergeStrategy.padEnd(width - 20)}║`);
444
444
 
@@ -113,7 +113,7 @@ function generateGitignore(markers, options = {}) {
113
113
  // Add project header
114
114
  const projectName = options.projectName || 'Project';
115
115
  sections.push(`# ${projectName} .gitignore`);
116
- sections.push(`# Generated by AIOS Documentation Integrity System`);
116
+ sections.push('# Generated by AIOS Documentation Integrity System');
117
117
  sections.push(`# Date: ${new Date().toISOString().split('T')[0]}`);
118
118
  sections.push(`# Tech Stack: ${techStacks.join(', ') || 'Generic'}`);
119
119
  sections.push('');
@@ -139,7 +139,7 @@ function generateGitignore(markers, options = {}) {
139
139
  * @param {Object} [options] - Merge options
140
140
  * @returns {string} Merged gitignore content
141
141
  */
142
- function mergeGitignore(existingContent, options = {}) {
142
+ function mergeGitignore(existingContent, _options = {}) {
143
143
  // Check if AIOS section already exists
144
144
  if (existingContent.includes('AIOS Integration Section')) {
145
145
  console.log('AIOS section already exists in .gitignore, skipping merge');
@@ -172,7 +172,7 @@ function mergeGitignore(existingContent, options = {}) {
172
172
  // Replace date placeholder
173
173
  mergeSection = mergeSection.replace(
174
174
  '{{GENERATED_DATE}}',
175
- new Date().toISOString().split('T')[0]
175
+ new Date().toISOString().split('T')[0],
176
176
  );
177
177
 
178
178
  // Append to existing content
@@ -262,7 +262,6 @@ function parseGitignore(content) {
262
262
  comments: [],
263
263
  };
264
264
 
265
- let currentSection = 'patterns';
266
265
  let aiosStart = -1;
267
266
  let aiosEnd = -1;
268
267
 
@@ -285,19 +285,19 @@ function validateModeSelection(selectedMode, detected) {
285
285
  if (selectedMode !== detected.mode) {
286
286
  if (selectedMode === InstallationMode.GREENFIELD && !detected.markers.isEmpty) {
287
287
  result.warnings.push(
288
- 'Selected greenfield but directory is not empty. Existing files may be overwritten.'
288
+ 'Selected greenfield but directory is not empty. Existing files may be overwritten.',
289
289
  );
290
290
  }
291
291
 
292
292
  if (selectedMode === InstallationMode.FRAMEWORK_DEV && !detected.markers.isAiosCoreRepo) {
293
293
  result.warnings.push(
294
- 'Selected framework-dev but this does not appear to be the aios-core repository.'
294
+ 'Selected framework-dev but this does not appear to be the aios-core repository.',
295
295
  );
296
296
  }
297
297
 
298
298
  if (selectedMode === InstallationMode.BROWNFIELD && detected.markers.isEmpty) {
299
299
  result.warnings.push(
300
- 'Selected brownfield but directory is empty. Consider using greenfield instead.'
300
+ 'Selected brownfield but directory is empty. Consider using greenfield instead.',
301
301
  );
302
302
  result.suggestions.push(InstallationMode.GREENFIELD);
303
303
  }
@@ -70,7 +70,7 @@ function installLLMRouting(options = {}) {
70
70
  projectRoot = process.cwd(),
71
71
  templatesDir = path.join(__dirname, 'templates'),
72
72
  onProgress = console.log,
73
- onError = console.error
73
+ onError = console.error,
74
74
  } = options;
75
75
 
76
76
  const result = {
@@ -78,7 +78,7 @@ function installLLMRouting(options = {}) {
78
78
  installDir: null,
79
79
  filesInstalled: [],
80
80
  envCreated: false,
81
- errors: []
81
+ errors: [],
82
82
  };
83
83
 
84
84
  // Check templates exist
@@ -143,7 +143,7 @@ function installLLMRouting(options = {}) {
143
143
  try {
144
144
  fs.copyFileSync(envExample, envFile);
145
145
  result.envCreated = true;
146
- onProgress(`✅ Created .env from .env.example`);
146
+ onProgress('✅ Created .env from .env.example');
147
147
  } catch (error) {
148
148
  result.success = false;
149
149
  result.errors.push(`Failed to create .env: ${error.message}`);
@@ -180,7 +180,7 @@ function updateClaudeConfig() {
180
180
  config.aiosLLMRouting = {
181
181
  version: LLM_ROUTING_VERSION,
182
182
  installedAt: new Date().toISOString(),
183
- commands: ['claude-max', 'claude-free']
183
+ commands: ['claude-max', 'claude-free'],
184
184
  };
185
185
 
186
186
  fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2));
@@ -250,7 +250,7 @@ module.exports = {
250
250
  isLLMRoutingInstalled,
251
251
  getInstallDir,
252
252
  getInstallationSummary,
253
- LLM_ROUTING_VERSION
253
+ LLM_ROUTING_VERSION,
254
254
  };
255
255
 
256
256
  // Run if executed directly
@@ -259,7 +259,7 @@ if (require.main === module) {
259
259
 
260
260
  const result = installLLMRouting({
261
261
  projectRoot: process.cwd(),
262
- templatesDir: path.join(__dirname, 'templates')
262
+ templatesDir: path.join(__dirname, 'templates'),
263
263
  });
264
264
 
265
265
  const summary = getInstallationSummary(result);
@@ -205,7 +205,7 @@ class ManifestGenerator {
205
205
  this.projectRoot,
206
206
  'docs',
207
207
  'architecture',
208
- 'source-tree-manifest.json'
208
+ 'source-tree-manifest.json',
209
209
  );
210
210
  this.maxDepth = options.maxDepth || 10;
211
211
  }
@@ -252,7 +252,7 @@ class ManifestGenerator {
252
252
  // Count by category
253
253
  manifest.categories = await countFilesByCategory(this.projectRoot);
254
254
  manifest.summary.categories = Object.fromEntries(
255
- Object.entries(manifest.categories).map(([k, v]) => [k, v.count])
255
+ Object.entries(manifest.categories).map(([k, v]) => [k, v.count]),
256
256
  );
257
257
 
258
258
  manifest.duration = Date.now() - startTime;
@@ -181,7 +181,7 @@ function validateFilePlacement(filePath, rules, projectRoot) {
181
181
  // Check exclusions for this violation
182
182
  if (violation.exclude_patterns) {
183
183
  const excluded = violation.exclude_patterns.some((p) =>
184
- matchesPattern(relativePath, p)
184
+ matchesPattern(relativePath, p),
185
185
  );
186
186
  if (excluded) {
187
187
  continue;
@@ -0,0 +1,54 @@
1
+ ---
2
+ paths: **/*
3
+ ---
4
+
5
+ # MCP Server Usage Rules
6
+
7
+ ## CRITICAL: Tool Selection Priority
8
+
9
+ ALWAYS prefer native Claude Code tools over MCP servers:
10
+
11
+ | Task | USE THIS | NOT THIS |
12
+ |------|----------|----------|
13
+ | Read files | `Read` tool | docker-gateway |
14
+ | Write files | `Write` / `Edit` tools | docker-gateway |
15
+ | Run commands | `Bash` tool | docker-gateway |
16
+ | Search files | `Glob` tool | docker-gateway |
17
+ | Search content | `Grep` tool | docker-gateway |
18
+ | List directories | `Bash(ls)` or `Glob` | docker-gateway |
19
+
20
+ ## docker-gateway (Desktop Commander) Restrictions
21
+
22
+ ### ONLY use docker-gateway when:
23
+ 1. User explicitly says "use docker" or "use container"
24
+ 2. User explicitly mentions "Desktop Commander"
25
+ 3. Task specifically requires Docker container operations
26
+ 4. User asks to run something inside a Docker container
27
+
28
+ ### NEVER use docker-gateway for:
29
+ - Reading local files (use `Read` tool)
30
+ - Writing local files (use `Write` or `Edit` tools)
31
+ - Running shell commands (use `Bash` tool)
32
+ - Searching files (use `Glob` or `Grep` tools)
33
+ - Listing directories (use `Bash(ls)` or `Glob`)
34
+ - Running Node.js or Python scripts (use `Bash` tool)
35
+
36
+ ## playwright MCP Restrictions
37
+
38
+ ### ONLY use playwright when:
39
+ 1. User explicitly asks for browser automation
40
+ 2. User wants to take screenshots of web pages
41
+ 3. User needs to interact with a website
42
+ 4. Task requires web scraping or testing
43
+
44
+ ### NEVER use playwright for:
45
+ - General file operations
46
+ - Running commands
47
+ - Anything not related to web browsers
48
+
49
+ ## Rationale
50
+
51
+ - Native tools execute on the LOCAL system (Windows)
52
+ - docker-gateway executes inside Docker containers (Linux)
53
+ - Using docker-gateway for local operations causes path mismatches and failures
54
+ - Native tools are faster and more reliable for local operations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aios-core",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "AIOS: AI-Orchestrated System for Full Stack Development - Core Framework",
5
5
  "main": "index.js",
6
6
  "module": "index.esm.js",