aios-core 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.aios-core/core/code-intel/code-intel-client.js +19 -5
  2. package/.aios-core/core/code-intel/hook-runtime.js +186 -0
  3. package/.aios-core/core/code-intel/index.js +2 -0
  4. package/.aios-core/core/code-intel/providers/code-graph-provider.js +8 -0
  5. package/.aios-core/core/code-intel/providers/provider-interface.js +9 -0
  6. package/.aios-core/core/code-intel/providers/registry-provider.js +515 -0
  7. package/.aios-core/core/doctor/checks/code-intel.js +95 -21
  8. package/.aios-core/core/doctor/checks/hooks-claude-count.js +15 -4
  9. package/.aios-core/core/doctor/checks/ide-sync.js +24 -7
  10. package/.aios-core/core/synapse/memory/memory-bridge.js +17 -43
  11. package/.aios-core/core/synapse/memory/synapse-memory-provider.js +201 -0
  12. package/.aios-core/data/entity-registry.yaml +836 -812
  13. package/.aios-core/data/workflow-chains.yaml +156 -0
  14. package/.aios-core/development/agents/aios-master.md +17 -10
  15. package/.aios-core/development/agents/analyst.md +17 -10
  16. package/.aios-core/development/agents/architect.md +17 -10
  17. package/.aios-core/development/agents/data-engineer.md +17 -10
  18. package/.aios-core/development/agents/dev.md +17 -10
  19. package/.aios-core/development/agents/devops.md +22 -10
  20. package/.aios-core/development/agents/pm.md +17 -10
  21. package/.aios-core/development/agents/po.md +17 -10
  22. package/.aios-core/development/agents/qa.md +17 -10
  23. package/.aios-core/development/agents/sm.md +17 -10
  24. package/.aios-core/development/agents/squad-creator.md +18 -9
  25. package/.aios-core/development/agents/ux-design-expert.md +16 -9
  26. package/.aios-core/development/tasks/apply-qa-fixes.md +7 -0
  27. package/.aios-core/development/tasks/architect-analyze-impact.md +8 -1
  28. package/.aios-core/development/tasks/brownfield-create-story.md +7 -0
  29. package/.aios-core/development/tasks/build-autonomous.md +7 -0
  30. package/.aios-core/development/tasks/create-deep-research-prompt.md +7 -0
  31. package/.aios-core/development/tasks/create-next-story.md +7 -0
  32. package/.aios-core/development/tasks/create-suite.md +7 -0
  33. package/.aios-core/development/tasks/dev-develop-story.md +8 -0
  34. package/.aios-core/development/tasks/execute-checklist.md +7 -0
  35. package/.aios-core/development/tasks/github-devops-github-pr-automation.md +7 -0
  36. package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +7 -0
  37. package/.aios-core/development/tasks/po-close-story.md +7 -0
  38. package/.aios-core/development/tasks/qa-create-fix-request.md +7 -0
  39. package/.aios-core/development/tasks/qa-fix-issues.md +7 -0
  40. package/.aios-core/development/tasks/qa-gate.md +8 -0
  41. package/.aios-core/development/tasks/qa-review-story.md +8 -0
  42. package/.aios-core/development/tasks/release-management.md +7 -0
  43. package/.aios-core/development/tasks/spec-critique.md +8 -0
  44. package/.aios-core/development/tasks/spec-gather-requirements.md +7 -0
  45. package/.aios-core/development/tasks/spec-write-spec.md +5 -0
  46. package/.aios-core/development/tasks/validate-next-story.md +7 -0
  47. package/.aios-core/install-manifest.yaml +105 -89
  48. package/.aios-core/product/templates/ide-rules/claude-rules.md +48 -0
  49. package/package.json +1 -1
  50. package/packages/installer/src/config/templates/core-config-template.js +25 -0
  51. package/packages/installer/src/wizard/ide-config-generator.js +24 -3
  52. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +15 -5
  53. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +3 -3
  54. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +68 -9
@@ -275,18 +275,79 @@ describe('graph-dashboard check', () => {
275
275
  });
276
276
 
277
277
  describe('code-intel check', () => {
278
- it('should return INFO when not configured', async () => {
278
+ // The code-intel check does a real require() of index.js and triggers
279
+ // provider auto-detection. Tests that need provider detection must use
280
+ // the real projectRoot and real fs (jest.requireActual).
281
+ const realFs = jest.requireActual('fs');
282
+ const realProjectRoot = path.join(__dirname, '..', '..', '..', '..', '..');
283
+
284
+ it('should return INFO when code-intel dir does not exist', async () => {
279
285
  fs.existsSync.mockReturnValue(false);
280
286
  const result = await codeIntelCheck.run(mockContext);
281
287
  expect(result.status).toBe('INFO');
282
288
  });
283
289
 
284
- it('should PASS when configured in core-config', async () => {
285
- fs.existsSync.mockReturnValue(true);
286
- fs.readFileSync.mockReturnValue('codeIntel:\n provider: test');
287
-
290
+ it('should WARN when index.js missing but dir exists', async () => {
291
+ fs.existsSync.mockImplementation((p) => {
292
+ // Dir exists, but index.js does not
293
+ if (p.includes('index.js')) return false;
294
+ return true;
295
+ });
288
296
  const result = await codeIntelCheck.run(mockContext);
297
+ expect(result.status).toBe('WARN');
298
+ expect(result.message).toContain('index.js not found');
299
+ });
300
+
301
+ it('should PASS with RegistryProvider when entity-registry exists', async () => {
302
+ // Use real fs + real project root so require() resolves the actual module
303
+ // and RegistryProvider can load the real entity-registry.yaml
304
+ const realContext = {
305
+ ...mockContext,
306
+ projectRoot: realProjectRoot,
307
+ };
308
+
309
+ // Temporarily restore real fs for this test
310
+ fs.existsSync.mockImplementation(realFs.existsSync);
311
+ fs.readFileSync.mockImplementation(realFs.readFileSync);
312
+ fs.statSync.mockImplementation(realFs.statSync);
313
+
314
+ // Only run if entity-registry actually exists (skip in CI without registry)
315
+ const registryPath = path.join(realProjectRoot, '.aios-core', 'data', 'entity-registry.yaml');
316
+ if (!realFs.existsSync(registryPath)) {
317
+ return; // skip — no registry available
318
+ }
319
+
320
+ const result = await codeIntelCheck.run(realContext);
289
321
  expect(result.status).toBe('PASS');
322
+ expect(result.message).toContain('RegistryProvider');
323
+ });
324
+
325
+ it('should WARN when provider detection fails (no valid registry)', async () => {
326
+ // Use real project root so require() works, but mock registry as empty
327
+ const realContext = {
328
+ ...mockContext,
329
+ projectRoot: realProjectRoot,
330
+ };
331
+
332
+ // Real existsSync for module resolution, mocked readFileSync for empty registry
333
+ fs.existsSync.mockImplementation((p) => {
334
+ if (p.includes('entity-registry.yaml')) return true;
335
+ return realFs.existsSync(p);
336
+ });
337
+ fs.statSync.mockImplementation((p) => {
338
+ if (p.includes('entity-registry.yaml')) return { mtimeMs: Date.now(), size: 10 };
339
+ return realFs.statSync(p);
340
+ });
341
+ fs.readFileSync.mockImplementation((p, enc) => {
342
+ if (typeof p === 'string' && p.includes('entity-registry.yaml')) {
343
+ return 'metadata:\n entityCount: 0';
344
+ }
345
+ return realFs.readFileSync(p, enc);
346
+ });
347
+
348
+ const result = await codeIntelCheck.run(realContext);
349
+ // Without valid entities, provider won't be available → WARN or INFO
350
+ expect(['WARN', 'INFO']).toContain(result.status);
290
351
  });
291
352
  });
292
353
 
@@ -295,9 +356,8 @@ describe('ide-sync check', () => {
295
356
  fs.existsSync.mockReturnValue(true);
296
357
  fs.readdirSync.mockImplementation((p) => {
297
358
  if (p.includes('commands')) return ['dev.md', 'qa.md'];
298
- return ['dev', 'qa'];
359
+ return ['dev.md', 'qa.md'];
299
360
  });
300
- fs.statSync.mockReturnValue({ isDirectory: () => true });
301
361
 
302
362
  const result = await ideSyncCheck.run(mockContext);
303
363
  expect(result.status).toBe('PASS');
@@ -307,9 +367,8 @@ describe('ide-sync check', () => {
307
367
  fs.existsSync.mockReturnValue(true);
308
368
  fs.readdirSync.mockImplementation((p) => {
309
369
  if (p.includes('commands')) return ['dev.md', 'qa.md', 'pm.md'];
310
- return ['dev', 'qa'];
370
+ return ['dev.md', 'qa.md'];
311
371
  });
312
- fs.statSync.mockReturnValue({ isDirectory: () => true });
313
372
 
314
373
  const result = await ideSyncCheck.run(mockContext);
315
374
  expect(result.status).toBe('WARN');