@kl-c/matrixos 0.3.40 → 0.3.42

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 (55) hide show
  1. package/dist/cli/index.js +167 -1
  2. package/dist/cli/skills/api-and-interface-design/SKILL.md +298 -0
  3. package/dist/cli/skills/browser-testing-with-devtools/SKILL.md +321 -0
  4. package/dist/cli/skills/ci-cd-and-automation/SKILL.md +394 -0
  5. package/dist/cli/skills/context-engineering/SKILL.md +293 -0
  6. package/dist/cli/skills/deprecation-and-migration/SKILL.md +251 -0
  7. package/dist/cli/skills/documentation-and-adrs/SKILL.md +292 -0
  8. package/dist/cli/skills/doubt-driven-development/SKILL.md +247 -0
  9. package/dist/cli/skills/incremental-implementation/SKILL.md +253 -0
  10. package/dist/cli/skills/interview-me/SKILL.md +229 -0
  11. package/dist/cli/skills/observability-and-instrumentation/SKILL.md +207 -0
  12. package/dist/cli/skills/performance-optimization/SKILL.md +354 -0
  13. package/dist/cli/skills/security-and-hardening/SKILL.md +471 -0
  14. package/dist/cli/skills/shipping-and-launch/SKILL.md +314 -0
  15. package/dist/cli/skills/source-driven-development/SKILL.md +198 -0
  16. package/dist/cli/skills/test-driven-development/SKILL.md +402 -0
  17. package/dist/cli-node/index.js +167 -1
  18. package/dist/features/dashboard/data-provider.d.ts +21 -1
  19. package/dist/features/dashboard/frontend/css/style.css +148 -1
  20. package/dist/features/dashboard/frontend/index.html +22 -0
  21. package/dist/features/dashboard/frontend/js/api.js +4 -0
  22. package/dist/features/dashboard/frontend/js/app.js +77 -2
  23. package/dist/features/dashboard/types.d.ts +9 -0
  24. package/dist/index.js +1 -1
  25. package/dist/skills/api-and-interface-design/SKILL.md +298 -0
  26. package/dist/skills/browser-testing-with-devtools/SKILL.md +321 -0
  27. package/dist/skills/ci-cd-and-automation/SKILL.md +394 -0
  28. package/dist/skills/context-engineering/SKILL.md +293 -0
  29. package/dist/skills/deprecation-and-migration/SKILL.md +251 -0
  30. package/dist/skills/documentation-and-adrs/SKILL.md +292 -0
  31. package/dist/skills/doubt-driven-development/SKILL.md +247 -0
  32. package/dist/skills/incremental-implementation/SKILL.md +253 -0
  33. package/dist/skills/interview-me/SKILL.md +229 -0
  34. package/dist/skills/observability-and-instrumentation/SKILL.md +207 -0
  35. package/dist/skills/performance-optimization/SKILL.md +354 -0
  36. package/dist/skills/security-and-hardening/SKILL.md +471 -0
  37. package/dist/skills/shipping-and-launch/SKILL.md +314 -0
  38. package/dist/skills/source-driven-development/SKILL.md +198 -0
  39. package/dist/skills/test-driven-development/SKILL.md +402 -0
  40. package/package.json +1 -1
  41. package/packages/shared-skills/skills/api-and-interface-design/SKILL.md +298 -0
  42. package/packages/shared-skills/skills/browser-testing-with-devtools/SKILL.md +321 -0
  43. package/packages/shared-skills/skills/ci-cd-and-automation/SKILL.md +394 -0
  44. package/packages/shared-skills/skills/context-engineering/SKILL.md +293 -0
  45. package/packages/shared-skills/skills/deprecation-and-migration/SKILL.md +251 -0
  46. package/packages/shared-skills/skills/documentation-and-adrs/SKILL.md +292 -0
  47. package/packages/shared-skills/skills/doubt-driven-development/SKILL.md +247 -0
  48. package/packages/shared-skills/skills/incremental-implementation/SKILL.md +253 -0
  49. package/packages/shared-skills/skills/interview-me/SKILL.md +229 -0
  50. package/packages/shared-skills/skills/observability-and-instrumentation/SKILL.md +207 -0
  51. package/packages/shared-skills/skills/performance-optimization/SKILL.md +354 -0
  52. package/packages/shared-skills/skills/security-and-hardening/SKILL.md +471 -0
  53. package/packages/shared-skills/skills/shipping-and-launch/SKILL.md +314 -0
  54. package/packages/shared-skills/skills/source-driven-development/SKILL.md +198 -0
  55. package/packages/shared-skills/skills/test-driven-development/SKILL.md +402 -0
@@ -252,6 +252,153 @@ body{font-family:var(--font-body);font-size:var(--text-base);color:var(--text-pr
252
252
  .kanban-card-output{background:var(--bg-secondary);border:1px solid var(--border-default);border-radius:var(--radius-sm);padding:8px;margin-top:6px;font-size:var(--text-xs);color:var(--text-secondary);white-space:pre-wrap;max-height:200px;overflow:auto}
253
253
  .modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
254
254
 
255
+ /* GOALS */
256
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
257
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);transition:all .15s;display:flex;flex-direction:column;gap:var(--space-3)}
258
+ .goal-card:hover{border-color:var(--bg-elevated)}
259
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
260
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
261
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.5;max-height:80px;overflow:hidden}
262
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto;font-size:var(--text-xs);color:var(--text-tertiary)}
263
+ .goal-actions{display:flex;gap:var(--space-2)}
264
+
265
+ /* GOALS */
266
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
267
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
268
+ .goal-card:hover{border-color:var(--bg-elevated)}
269
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
270
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
271
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.4}
272
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary);margin-top:auto}
273
+ .goal-actions{display:flex;gap:var(--space-2)}
274
+
275
+ /* GOALS */
276
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:var(--space-4)}
277
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
278
+ .goal-card:hover{border-color:var(--bg-elevated)}
279
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
280
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
281
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.5}
282
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
283
+ .goal-actions{display:flex;gap:var(--space-2)}
284
+ #tab-goals .form-row{display:flex;flex-direction:row;gap:var(--space-2);align-items:center;margin-bottom:var(--space-3)}
285
+ #tab-goals textarea.input{margin-top:var(--space-2)}
286
+
287
+ /* GOALS */
288
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:var(--space-3)}
289
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
290
+ .goal-card:hover{border-color:var(--bg-elevated)}
291
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
292
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
293
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.5}
294
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto;font-size:var(--text-xs);color:var(--text-tertiary)}
295
+ .goal-actions{display:flex;gap:var(--space-2)}
296
+
297
+ /* GOALS */
298
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:var(--space-3)}
299
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
300
+ .goal-card:hover{border-color:var(--bg-elevated)}
301
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
302
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
303
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.4}
304
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
305
+ .goal-actions{display:flex;gap:var(--space-2)}
306
+
307
+ /* GOALS */
308
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
309
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3)}
310
+ .goal-card:hover{border-color:var(--bg-elevated)}
311
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
312
+ .goal-title{font-size:var(--text-base);font-weight:600;color:var(--text-primary)}
313
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:4px;line-height:1.5;max-height:80px;overflow:hidden}
314
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary);margin-top:auto}
315
+ .goal-actions{display:flex;gap:var(--space-2)}
316
+
317
+
318
+ @media(max-width:1024px){.kpi-grid,.grid-2{grid-template-columns:repeat(2,1fr)}.kanban-board{grid-template-columns:repeat(2,1fr)}.gauge-grid{grid-template-columns:repeat(2,1fr)}}
319
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);transition:all .15s;display:flex;flex-direction:column;gap:var(--space-3)}
320
+ .goal-card:hover{border-color:var(--bg-elevated)}
321
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
322
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
323
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.4}
324
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto;font-size:var(--text-xs);color:var(--text-tertiary)}
325
+ .goal-actions{display:flex;gap:var(--space-2)}
326
+
327
+ @media(max-width:1024px){.kpi-grid,.grid-2{grid-template-columns:repeat(2,1fr)}.kanban-board{grid-template-columns:repeat(2,1fr)}.gauge-grid{grid-template-columns:repeat(2,1fr)}}
328
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);transition:all .15s}
329
+ .goal-card:hover{border-color:var(--bg-elevated)}
330
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3);margin-bottom:var(--space-3)}
331
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
332
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:4px;line-height:1.4;max-height:80px;overflow:hidden}
333
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
334
+ .goal-actions{display:flex;gap:var(--space-2)}
335
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
336
+ .goal-card:hover{border-color:var(--bg-elevated)}
337
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
338
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-1)}
339
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);line-height:1.5;max-height:80px;overflow:hidden}
340
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary);margin-top:auto}
341
+ .goal-actions{display:flex;gap:var(--space-2)}
342
+ /* GOALS */
343
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
344
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
345
+ .goal-card:hover{border-color:var(--bg-elevated)}
346
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
347
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
348
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:4px;line-height:1.4;max-height:80px;overflow:hidden}
349
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
350
+ .goal-actions{display:flex;gap:var(--space-2)}
351
+
352
+ @media(max-width:1024px){.kpi-grid,.grid-2{grid-template-columns:repeat(2,1fr)}.kanban-board{grid-template-columns:repeat(2,1fr)}.gauge-grid{grid-template-columns:repeat(2,1fr)}.goals-grid{grid-template-columns:repeat(2,1fr)}}
353
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:var(--space-3)}
354
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
355
+ .goal-card:hover{border-color:var(--bg-elevated)}
356
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
357
+ .goal-title{font-size:var(--text-base);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-1)}
358
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);line-height:1.5;max-height:80px;overflow:hidden}
359
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
360
+ .goal-actions{display:flex;gap:var(--space-2)}
361
+
362
+ /* GOALS */
363
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:var(--space-3)}
364
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
365
+ .goal-card:hover{border-color:var(--bg-elevated)}
366
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
367
+ .goal-title{font-size:var(--text-base);font-weight:600;color:var(--text-primary)}
368
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.5;max-height:60px;overflow:hidden}
369
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto;font-size:var(--text-xs);color:var(--text-tertiary)}
370
+ .goal-actions{display:flex;gap:var(--space-2)}
371
+
372
+ /* GOALS */
373
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
374
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);transition:all .15s}
375
+ .goal-card:hover{border-color:var(--bg-elevated)}
376
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3);margin-bottom:var(--space-3)}
377
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
378
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.5;max-height:80px;overflow:hidden}
379
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
380
+ .goal-actions{display:flex;gap:var(--space-2)}
381
+
382
+ /* GOALS */
383
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
384
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
385
+ .goal-card:hover{border-color:var(--bg-elevated)}
386
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
387
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
388
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:4px;line-height:1.5}
389
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary)}
390
+ .modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
391
+
392
+ /* GOALS */
393
+ .goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:var(--space-3)}
394
+ .goal-card{background:var(--bg-card);border:1px solid var(--border-default);border-radius:var(--radius-xl);padding:var(--space-4);display:flex;flex-direction:column;gap:var(--space-3);transition:all .15s}
395
+ .goal-card:hover{border-color:var(--bg-elevated)}
396
+ .goal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-3)}
397
+ .goal-title{font-size:var(--text-sm);font-weight:600;color:var(--text-primary)}
398
+ .goal-desc{font-size:var(--text-xs);color:var(--text-secondary);margin-top:var(--space-1);line-height:1.4;max-height:80px;overflow:hidden}
399
+ .goal-footer{display:flex;justify-content:space-between;align-items:center;font-size:var(--text-xs);color:var(--text-tertiary);margin-top:auto}
400
+ .goal-actions{display:flex;gap:var(--space-2)}
401
+ .goal-actions .btn{padding:var(--space-1) var(--space-3);font-size:var(--text-xs)}
255
402
 
256
403
  @media(max-width:1024px){.kpi-grid,.grid-2{grid-template-columns:repeat(2,1fr)}.kanban-board{grid-template-columns:repeat(2,1fr)}.gauge-grid{grid-template-columns:repeat(2,1fr)}}
257
- @media(max-width:768px){.kpi-grid,.grid-2{grid-template-columns:1fr}.kanban-board{grid-template-columns:1fr}.agent-grid{grid-template-columns:1fr}}
404
+ @media(max-width:768px){.kpi-grid,.grid-2{grid-template-columns:1fr}.kanban-board{grid-template-columns:1fr}.agent-grid{grid-template-columns:1fr}.goals-grid{grid-template-columns:1fr}}
@@ -43,6 +43,7 @@
43
43
  <button class="header-tab" data-tab="health"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 7h3l2-4 2 8 2-4h3"/></svg>Health</button>
44
44
  <button class="header-tab" data-tab="cost"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M7 1v12M4.5 3.5C4.5 3.5 5 3 7 3s3 .5 3 1.5-1 1.5-3 1.5-3 .5-3 1.5 1 1.5 3 1.5 3-.5 3-1.5"/></svg>Cost</button>
45
45
  <button class="header-tab" data-tab="kanban"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><rect x="1" y="1" width="3.5" height="12" rx="0.75"/><rect x="5.5" y="1" width="3.5" height="8" rx="0.75"/><rect x="10" y="1" width="3.5" height="10" rx="0.75"/></svg>Kanban</button>
46
+ <button class="header-tab" data-tab="goals"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="5.5"/><path d="M7 4v3l2 2"/></svg>Goals</button>
46
47
  <button class="header-tab" data-tab="logs"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M2 4h10M2 7h10M2 10h7"/></svg>Logs</button>
47
48
  <button class="header-tab" data-tab="memory"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><rect x="2" y="3" width="10" height="9" rx="1"/><path d="M2 6h10"/><circle cx="7" cy="9" r="1.5"/></svg>Memory</button>
48
49
  <button class="header-tab" data-tab="skills"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="5" r="3"/><path d="M3 12c0-2.5 2-4 4-4s4 1.5 4 4"/></svg>Skills</button>
@@ -109,10 +110,31 @@
109
110
  <div id="tab-kanban" class="tab-panel">
110
111
  <div class="page-header">
111
112
  <div><h1 class="page-title">Kanban Board</h1><p class="page-subtitle">Task tracking across all agents</p></div>
113
+ <div class="page-actions"><button class="btn btn-secondary" id="newKanbanBtn"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M7 1v12M1 7h12"/></svg>New Task</button></div>
112
114
  </div>
113
115
  <div class="kanban-board" id="kanbanBoard"></div>
114
116
  </div>
115
117
 
118
+ <div id="tab-goals" class="tab-panel">
119
+ <div class="page-header">
120
+ <div><h1 class="page-title">Goals</h1><p class="page-subtitle">Define objectives and decompose them into Kanban tasks</p></div>
121
+ </div>
122
+ <div class="card">
123
+ <div class="card-header"><span class="card-title">New Goal</span></div>
124
+ <div class="card-body">
125
+ <div class="form-row">
126
+ <input id="goalTitle" class="input" type="text" placeholder="Goal title" style="flex:1" />
127
+ <button class="btn btn-secondary" id="createGoalBtn"><svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M7 1v12M1 7h12"/></svg>Create</button>
128
+ </div>
129
+ <textarea id="goalDesc" class="input" rows="3" placeholder="Description (optional)"></textarea>
130
+ </div>
131
+ </div>
132
+ <div class="section">
133
+ <div class="section-header"><div><h2 class="section-title">Active Goals</h2><p class="section-subtitle">Click ▶ to decompose into Kanban tasks</p></div><button class="btn btn-ghost" id="refreshGoalsBtn">Refresh</button></div>
134
+ <div class="goals-grid" id="goalsGrid"></div>
135
+ </div>
136
+ </div>
137
+
116
138
  <div id="tab-logs" class="tab-panel">
117
139
  <div class="page-header">
118
140
  <div><h1 class="page-title">Live Logs</h1><p class="page-subtitle">Real-time event stream from MaTrixOS agents and services</p></div>
@@ -9,6 +9,10 @@ const API={
9
9
  kanbanUpdate:(body)=>fetchJSON('/kanban/task',{method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)}),
10
10
  kanbanDelete:(id)=>fetchJSON(`/kanban/task?id=${encodeURIComponent(id)}`,{method:'DELETE'}),
11
11
  kanbanExecute:(id)=>fetchJSON('/kanban/execute',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({id})}),
12
+ goals:()=>fetchJSON('/goals'),
13
+ goalCreate:(body)=>fetchJSON('/goals',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)}),
14
+ goalDelete:(id)=>fetchJSON(`/goals?id=${encodeURIComponent(id)}`,{method:'DELETE'}),
15
+ goalDecompose:(id)=>fetchJSON('/goals/decompose',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({id})}),
12
16
  metrics:()=>fetchJSON('/metrics'),
13
17
  config:()=>fetchJSON('/config'),
14
18
  memory:()=>fetchJSON('/memory'),
@@ -6,7 +6,7 @@ document.querySelectorAll('[data-tab]').forEach(el=>{
6
6
  el.addEventListener('click',e=>{
7
7
  e.preventDefault()
8
8
  const tab=el.dataset.tab
9
- if(!tab||!['architect','health','cost','kanban','agents','sessions','logs','config','memory','skills','schedule'].includes(tab))return
9
+ if(!tab||!['architect','health','cost','kanban','goals','agents','sessions','logs','config','memory','skills','schedule'].includes(tab))return
10
10
  const realTab=tab==='agents'||tab==='sessions'?'architect':tab
11
11
  document.querySelectorAll('.sidebar-item.active,.header-tab.active,.tab-panel.active').forEach(n=>n.classList.remove('active'))
12
12
  document.querySelectorAll(`.sidebar-item[data-tab="${tab}"],.header-tab[data-tab="${realTab}"]`).forEach(n=>n.classList.add('active'))
@@ -16,7 +16,7 @@ document.querySelectorAll('[data-tab]').forEach(el=>{
16
16
  })
17
17
 
18
18
  // Tab loading dispatch
19
- function loadTab(tab){const f={architect:loadArchitect,health:loadHealth,cost:loadCost,kanban:loadKanban,logs:loadLogs,config:loadConfig,memory:loadMemory,skills:loadSkills,schedule:loadSchedule}[tab];f&&f()}
19
+ function loadTab(tab){const f={architect:loadArchitect,health:loadHealth,cost:loadCost,kanban:loadKanban,goals:loadGoals,logs:loadLogs,config:loadConfig,memory:loadMemory,skills:loadSkills,schedule:loadSchedule}[tab];f&&f()}
20
20
 
21
21
  // Skeleton helpers
22
22
  function showSkeleton(container,type,count=4){
@@ -360,6 +360,75 @@ function toggleKanbanOutput(e,id){
360
360
  e.target.textContent=show?'Masquer résultat':'Voir résultat'
361
361
  }
362
362
 
363
+ // ===== GOALS =====
364
+ let goalsData=[]
365
+ async function loadGoals(){
366
+ const grid=document.getElementById('goalsGrid')
367
+ grid.innerHTML='<div style="padding:20px;color:var(--text-tertiary)">Loading...</div>'
368
+ try{
369
+ goalsData=await API.goals()
370
+ renderGoals()
371
+ }catch(e){grid.innerHTML=`<div class="error"><p>Failed to load goals: ${e.message}</p></div>`}
372
+ }
373
+
374
+ function renderGoals(){
375
+ const grid=document.getElementById('goalsGrid')
376
+ if(!goalsData||!goalsData.length){showEmpty(grid,'No goals yet. Create one above.');return}
377
+ grid.innerHTML=goalsData.map(g=>{
378
+ const statusCls=g.status==='decomposing'?'warning':g.status==='completed'?'success':g.status==='archived'?'info':'info'
379
+ const btn=g.status==='decomposing'?`<button class="btn btn-ghost" disabled>Decomposing...</button>`:`<button class="btn btn-secondary" onclick="decomposeGoal('${g.id}')">▶ Decompose</button>`
380
+ return `<div class="goal-card">
381
+ <div class="goal-header">
382
+ <div>
383
+ <div class="goal-title">${escapeHtml(g.title)}</div>
384
+ ${g.description?`<div class="goal-desc">${escapeHtml(g.description)}</div>`:''}
385
+ </div>
386
+ <span class="badge badge-${statusCls}">${g.status}</span>
387
+ </div>
388
+ <div class="goal-footer">
389
+ <span>${g.taskCount} task${g.taskCount===1?'':'s'}</span>
390
+ <div class="goal-actions">
391
+ ${btn}
392
+ <button class="btn btn-ghost" onclick="deleteGoal('${g.id}')">Delete</button>
393
+ </div>
394
+ </div>
395
+ </div>`
396
+ }).join('')
397
+ }
398
+
399
+ async function createGoal(){
400
+ const title=document.getElementById('goalTitle').value.trim()
401
+ const description=document.getElementById('goalDesc').value.trim()
402
+ if(!title){alert('Title required');return}
403
+ const btn=document.getElementById('createGoalBtn')
404
+ btn.disabled=true
405
+ try{
406
+ await API.goalCreate({title,description})
407
+ document.getElementById('goalTitle').value=''
408
+ document.getElementById('goalDesc').value=''
409
+ await loadGoals()
410
+ }catch(e){alert('Erreur: '+e.message)}
411
+ finally{btn.disabled=false}
412
+ }
413
+
414
+ async function decomposeGoal(id){
415
+ const g=goalsData.find(x=>x.id===id)
416
+ if(!g||g.status==='decomposing')return
417
+ if(!confirm(`Décomposer "${g.title}" en tâches Kanban ?`))return
418
+ try{
419
+ await API.goalDecompose(id)
420
+ await Promise.all([loadGoals(),loadKanban()])
421
+ }catch(e){alert('Erreur: '+e.message)}
422
+ }
423
+
424
+ async function deleteGoal(id){
425
+ if(!confirm('Delete this goal and its linked Kanban tasks?'))return
426
+ try{
427
+ await API.goalDelete(id)
428
+ await Promise.all([loadGoals(),loadKanban()])
429
+ }catch(e){alert('Erreur: '+e.message)}
430
+ }
431
+
363
432
  // ===== LOGS =====
364
433
  let logStream=null
365
434
  async function loadLogs(){
@@ -583,6 +652,12 @@ document.getElementById('archRefresh').onclick=()=>loadArchitect()
583
652
  document.getElementById('deployBtn').onclick=()=>alert('Deploy Agent — coming soon')
584
653
  document.getElementById('diagBtn').onclick=()=>alert('Diagnostics — coming soon')
585
654
  document.getElementById('notifBtn').onclick=()=>alert('3 notifications pending')
655
+ const createGoalBtn=document.getElementById('createGoalBtn')
656
+ if(createGoalBtn)createGoalBtn.onclick=createGoal
657
+ const refreshGoalsBtn=document.getElementById('refreshGoalsBtn')
658
+ if(refreshGoalsBtn)refreshGoalsBtn.onclick=loadGoals
659
+ const newKanbanBtn=document.getElementById('newKanbanBtn')
660
+ if(newKanbanBtn)newKanbanBtn.onclick=()=>openKanbanModal()
586
661
 
587
662
  loadTab('architect')
588
663
  setInterval(()=>{const t=document.querySelector('.header-tab.active');t&&loadTab(t.dataset.tab)},30000)
@@ -48,6 +48,15 @@ export interface KanbanTask {
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
50
  }
51
+ export interface Goal {
52
+ id: string;
53
+ title: string;
54
+ description?: string;
55
+ status: "active" | "decomposing" | "completed" | "archived";
56
+ taskCount: number;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ }
51
60
  export interface KanbanBoard {
52
61
  columns: Record<string, KanbanTask[]>;
53
62
  }
package/dist/index.js CHANGED
@@ -368086,7 +368086,7 @@ function getCachedVersion(options = {}) {
368086
368086
  // package.json
368087
368087
  var package_default = {
368088
368088
  name: "@kl-c/matrixos",
368089
- version: "0.3.40",
368089
+ version: "0.3.42",
368090
368090
  description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
368091
368091
  main: "./dist/index.js",
368092
368092
  types: "dist/index.d.ts",
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: api-and-interface-design
3
+ description: Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
4
+ source: addyosmani/agent-skills (MIT)
5
+ ---
6
+
7
+ # API and Interface Design
8
+
9
+ ## Overview
10
+
11
+ Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.
12
+
13
+ ## When to Use
14
+
15
+ - Designing new API endpoints
16
+ - Defining module boundaries or contracts between teams
17
+ - Creating component prop interfaces
18
+ - Establishing database schema that informs API shape
19
+ - Changing existing public interfaces
20
+
21
+ ## Core Principles
22
+
23
+ ### Hyrum's Law
24
+
25
+ > With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.
26
+
27
+ This means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:
28
+
29
+ - **Be intentional about what you expose.** Every observable behavior is a potential commitment.
30
+ - **Don't leak implementation details.** If users can observe it, they will depend on it.
31
+ - **Plan for deprecation at design time.** See `deprecation-and-migration` for how to safely remove things users depend on.
32
+ - **Tests are not enough.** Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behavior.
33
+
34
+ ### The One-Version Rule
35
+
36
+ Avoid forcing consumers to choose between multiple versions of the same dependency or API. Diamond dependency problems arise when different consumers need different versions of the same thing. Design for a world where only one version exists at a time — extend rather than fork.
37
+
38
+ ### 1. Contract First
39
+
40
+ Define the interface before implementing it. The contract is the spec — implementation follows.
41
+
42
+ ```typescript
43
+ // Define the contract first
44
+ interface TaskAPI {
45
+ // Creates a task and returns the created task with server-generated fields
46
+ createTask(input: CreateTaskInput): Promise<Task>;
47
+
48
+ // Returns paginated tasks matching filters
49
+ listTasks(params: ListTasksParams): Promise<PaginatedResult<Task>>;
50
+
51
+ // Returns a single task or throws NotFoundError
52
+ getTask(id: string): Promise<Task>;
53
+
54
+ // Partial update — only provided fields change
55
+ updateTask(id: string, input: UpdateTaskInput): Promise<Task>;
56
+
57
+ // Idempotent delete — succeeds even if already deleted
58
+ deleteTask(id: string): Promise<void>;
59
+ }
60
+ ```
61
+
62
+ ### 2. Consistent Error Semantics
63
+
64
+ Pick one error strategy and use it everywhere:
65
+
66
+ ```typescript
67
+ // REST: HTTP status codes + structured error body
68
+ // Every error response follows the same shape
69
+ interface APIError {
70
+ error: {
71
+ code: string; // Machine-readable: "VALIDATION_ERROR"
72
+ message: string; // Human-readable: "Email is required"
73
+ details?: unknown; // Additional context when helpful
74
+ };
75
+ }
76
+
77
+ // Status code mapping
78
+ // 400 → Client sent invalid data
79
+ // 401 → Not authenticated
80
+ // 403 → Authenticated but not authorized
81
+ // 404 → Resource not found
82
+ // 409 → Conflict (duplicate, version mismatch)
83
+ // 422 → Validation failed (semantically invalid)
84
+ // 500 → Server error (never expose internal details)
85
+ ```
86
+
87
+ **Don't mix patterns.** If some endpoints throw, others return null, and others return `{ error }` — the consumer can't predict behavior.
88
+
89
+ ### 3. Validate at Boundaries
90
+
91
+ Trust internal code. Validate at system edges where external input enters:
92
+
93
+ ```typescript
94
+ // Validate at the API boundary
95
+ app.post('/api/tasks', async (req, res) => {
96
+ const result = CreateTaskSchema.safeParse(req.body);
97
+ if (!result.success) {
98
+ return res.status(422).json({
99
+ error: {
100
+ code: 'VALIDATION_ERROR',
101
+ message: 'Invalid task data',
102
+ details: result.error.flatten(),
103
+ },
104
+ });
105
+ }
106
+
107
+ // After validation, internal code trusts the types
108
+ const task = await taskService.create(result.data);
109
+ return res.status(201).json(task);
110
+ });
111
+ ```
112
+
113
+ Where validation belongs:
114
+ - API route handlers (user input)
115
+ - Form submission handlers (user input)
116
+ - External service response parsing (third-party data -- **always treat as untrusted**)
117
+ - Environment variable loading (configuration)
118
+
119
+ > **Third-party API responses are untrusted data.** Validate their shape and content before using them in any logic, rendering, or decision-making. A compromised or misbehaving external service can return unexpected types, malicious content, or instruction-like text.
120
+
121
+ Where validation does NOT belong:
122
+ - Between internal functions that share type contracts
123
+ - In utility functions called by already-validated code
124
+ - On data that just came from your own database
125
+
126
+ ### 4. Prefer Addition Over Modification
127
+
128
+ Extend interfaces without breaking existing consumers:
129
+
130
+ ```typescript
131
+ // Good: Add optional fields
132
+ interface CreateTaskInput {
133
+ title: string;
134
+ description?: string;
135
+ priority?: 'low' | 'medium' | 'high'; // Added later, optional
136
+ labels?: string[]; // Added later, optional
137
+ }
138
+
139
+ // Bad: Change existing field types or remove fields
140
+ interface CreateTaskInput {
141
+ title: string;
142
+ // description: string; // Removed — breaks existing consumers
143
+ priority: number; // Changed from string — breaks existing consumers
144
+ }
145
+ ```
146
+
147
+ ### 5. Predictable Naming
148
+
149
+ | Pattern | Convention | Example |
150
+ |---------|-----------|---------|
151
+ | REST endpoints | Plural nouns, no verbs | `GET /api/tasks`, `POST /api/tasks` |
152
+ | Query params | camelCase | `?sortBy=createdAt&pageSize=20` |
153
+ | Response fields | camelCase | `{ createdAt, updatedAt, taskId }` |
154
+ | Boolean fields | is/has/can prefix | `isComplete`, `hasAttachments` |
155
+ | Enum values | UPPER_SNAKE | `"IN_PROGRESS"`, `"COMPLETED"` |
156
+
157
+ ## REST API Patterns
158
+
159
+ ### Resource Design
160
+
161
+ ```
162
+ GET /api/tasks → List tasks (with query params for filtering)
163
+ POST /api/tasks → Create a task
164
+ GET /api/tasks/:id → Get a single task
165
+ PATCH /api/tasks/:id → Update a task (partial)
166
+ DELETE /api/tasks/:id → Delete a task
167
+
168
+ GET /api/tasks/:id/comments → List comments for a task (sub-resource)
169
+ POST /api/tasks/:id/comments → Add a comment to a task
170
+ ```
171
+
172
+ ### Pagination
173
+
174
+ Paginate list endpoints:
175
+
176
+ ```typescript
177
+ // Request
178
+ GET /api/tasks?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc
179
+
180
+ // Response
181
+ {
182
+ "data": [...],
183
+ "pagination": {
184
+ "page": 1,
185
+ "pageSize": 20,
186
+ "totalItems": 142,
187
+ "totalPages": 8
188
+ }
189
+ }
190
+ ```
191
+
192
+ ### Filtering
193
+
194
+ Use query parameters for filters:
195
+
196
+ ```
197
+ GET /api/tasks?status=in_progress&assignee=user123&createdAfter=2025-01-01
198
+ ```
199
+
200
+ ### Partial Updates (PATCH)
201
+
202
+ Accept partial objects — only update what's provided:
203
+
204
+ ```typescript
205
+ // Only title changes, everything else preserved
206
+ PATCH /api/tasks/123
207
+ { "title": "Updated title" }
208
+ ```
209
+
210
+ ## TypeScript Interface Patterns
211
+
212
+ ### Use Discriminated Unions for Variants
213
+
214
+ ```typescript
215
+ // Good: Each variant is explicit
216
+ type TaskStatus =
217
+ | { type: 'pending' }
218
+ | { type: 'in_progress'; assignee: string; startedAt: Date }
219
+ | { type: 'completed'; completedAt: Date; completedBy: string }
220
+ | { type: 'cancelled'; reason: string; cancelledAt: Date };
221
+
222
+ // Consumer gets type narrowing
223
+ function getStatusLabel(status: TaskStatus): string {
224
+ switch (status.type) {
225
+ case 'pending': return 'Pending';
226
+ case 'in_progress': return `In progress (${status.assignee})`;
227
+ case 'completed': return `Done on ${status.completedAt}`;
228
+ case 'cancelled': return `Cancelled: ${status.reason}`;
229
+ }
230
+ }
231
+ ```
232
+
233
+ ### Input/Output Separation
234
+
235
+ ```typescript
236
+ // Input: what the caller provides
237
+ interface CreateTaskInput {
238
+ title: string;
239
+ description?: string;
240
+ }
241
+
242
+ // Output: what the system returns (includes server-generated fields)
243
+ interface Task {
244
+ id: string;
245
+ title: string;
246
+ description: string | null;
247
+ createdAt: Date;
248
+ updatedAt: Date;
249
+ createdBy: string;
250
+ }
251
+ ```
252
+
253
+ ### Use Branded Types for IDs
254
+
255
+ ```typescript
256
+ type TaskId = string & { readonly __brand: 'TaskId' };
257
+ type UserId = string & { readonly __brand: 'UserId' };
258
+
259
+ // Prevents accidentally passing a UserId where a TaskId is expected
260
+ function getTask(id: TaskId): Promise<Task> { ... }
261
+ ```
262
+
263
+ ## Common Rationalizations
264
+
265
+ | Rationalization | Reality |
266
+ |---|---|
267
+ | "We'll document the API later" | The types ARE the documentation. Define them first. |
268
+ | "We don't need pagination for now" | You will the moment someone has 100+ items. Add it from the start. |
269
+ | "PATCH is complicated, let's just use PUT" | PUT requires the full object every time. PATCH is what clients actually want. |
270
+ | "We'll version the API when we need to" | Breaking changes without versioning break consumers. Design for extension from the start. |
271
+ | "Nobody uses that undocumented behavior" | Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment. |
272
+ | "We can just maintain two versions" | Multiple versions multiply maintenance cost and create diamond dependency problems. Prefer the One-Version Rule. |
273
+ | "Internal APIs don't need contracts" | Internal consumers are still consumers. Contracts prevent coupling and enable parallel work. |
274
+
275
+ ## Red Flags
276
+
277
+ - Endpoints that return different shapes depending on conditions
278
+ - Inconsistent error formats across endpoints
279
+ - Validation scattered throughout internal code instead of at boundaries
280
+ - Breaking changes to existing fields (type changes, removals)
281
+ - List endpoints without pagination
282
+ - Verbs in REST URLs (`/api/createTask`, `/api/getUsers`)
283
+ - Third-party API responses used without validation or sanitization
284
+
285
+ ## Verification
286
+
287
+ After designing an API:
288
+
289
+ - [ ] Every endpoint has typed input and output schemas
290
+ - [ ] Error responses follow a single consistent format
291
+ - [ ] Validation happens at system boundaries only
292
+ - [ ] List endpoints support pagination
293
+ - [ ] New fields are additive and optional (backward compatible)
294
+ - [ ] Naming follows consistent conventions across all endpoints
295
+ - [ ] API documentation or types are committed alongside the implementation
296
+
297
+ ---
298
+ *Source: addyosmani/agent-skills (MIT). Ported into MaTrixOS shared-skills bundle.*