@arka-labs/nemesis 1.2.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 (100) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +668 -0
  3. package/lib/core/agent-launcher.js +193 -0
  4. package/lib/core/audit.js +210 -0
  5. package/lib/core/connexions.js +80 -0
  6. package/lib/core/flowmap/api.js +111 -0
  7. package/lib/core/flowmap/cli-helpers.js +80 -0
  8. package/lib/core/flowmap/machine.js +281 -0
  9. package/lib/core/flowmap/persistence.js +83 -0
  10. package/lib/core/generators.js +183 -0
  11. package/lib/core/inbox.js +275 -0
  12. package/lib/core/logger.js +20 -0
  13. package/lib/core/mission.js +109 -0
  14. package/lib/core/notewriter/config.js +36 -0
  15. package/lib/core/notewriter/cr.js +237 -0
  16. package/lib/core/notewriter/log.js +112 -0
  17. package/lib/core/notewriter/notes.js +168 -0
  18. package/lib/core/notewriter/paths.js +45 -0
  19. package/lib/core/notewriter/reader.js +121 -0
  20. package/lib/core/notewriter/registry.js +80 -0
  21. package/lib/core/odm.js +191 -0
  22. package/lib/core/profile-picker.js +323 -0
  23. package/lib/core/project.js +287 -0
  24. package/lib/core/registry.js +129 -0
  25. package/lib/core/secrets.js +137 -0
  26. package/lib/core/services.js +45 -0
  27. package/lib/core/team.js +287 -0
  28. package/lib/core/templates.js +80 -0
  29. package/lib/kairos/agent-runner.js +261 -0
  30. package/lib/kairos/claude-invoker.js +90 -0
  31. package/lib/kairos/context-injector.js +331 -0
  32. package/lib/kairos/context-loader.js +108 -0
  33. package/lib/kairos/context-writer.js +45 -0
  34. package/lib/kairos/dispatcher-router.js +173 -0
  35. package/lib/kairos/dispatcher.js +139 -0
  36. package/lib/kairos/event-bus.js +287 -0
  37. package/lib/kairos/event-router.js +131 -0
  38. package/lib/kairos/flowmap-bridge.js +120 -0
  39. package/lib/kairos/hook-handlers.js +351 -0
  40. package/lib/kairos/hook-installer.js +207 -0
  41. package/lib/kairos/hook-prompts.js +54 -0
  42. package/lib/kairos/leader-rules.js +94 -0
  43. package/lib/kairos/pid-checker.js +108 -0
  44. package/lib/kairos/situation-detector.js +123 -0
  45. package/lib/sync/fallback-engine.js +97 -0
  46. package/lib/sync/hcm-client.js +170 -0
  47. package/lib/sync/health.js +47 -0
  48. package/lib/sync/llm-client.js +387 -0
  49. package/lib/sync/nemesis-client.js +379 -0
  50. package/lib/sync/service-session.js +74 -0
  51. package/lib/sync/sync-engine.js +178 -0
  52. package/lib/ui/box.js +104 -0
  53. package/lib/ui/brand.js +42 -0
  54. package/lib/ui/colors.js +57 -0
  55. package/lib/ui/dashboard.js +580 -0
  56. package/lib/ui/error-hints.js +49 -0
  57. package/lib/ui/format.js +61 -0
  58. package/lib/ui/menu.js +306 -0
  59. package/lib/ui/note-card.js +198 -0
  60. package/lib/ui/note-colors.js +26 -0
  61. package/lib/ui/note-detail.js +297 -0
  62. package/lib/ui/note-filters.js +252 -0
  63. package/lib/ui/note-views.js +283 -0
  64. package/lib/ui/prompt.js +81 -0
  65. package/lib/ui/spinner.js +139 -0
  66. package/lib/ui/streambox.js +46 -0
  67. package/lib/ui/table.js +42 -0
  68. package/lib/ui/tree.js +33 -0
  69. package/package.json +53 -0
  70. package/src/cli.js +457 -0
  71. package/src/commands/_helpers.js +119 -0
  72. package/src/commands/audit.js +187 -0
  73. package/src/commands/auth.js +316 -0
  74. package/src/commands/doctor.js +243 -0
  75. package/src/commands/hcm.js +147 -0
  76. package/src/commands/inbox.js +333 -0
  77. package/src/commands/init.js +160 -0
  78. package/src/commands/kairos.js +216 -0
  79. package/src/commands/kars.js +134 -0
  80. package/src/commands/mission.js +275 -0
  81. package/src/commands/notes.js +316 -0
  82. package/src/commands/notewriter.js +296 -0
  83. package/src/commands/odm.js +329 -0
  84. package/src/commands/orch.js +68 -0
  85. package/src/commands/project.js +123 -0
  86. package/src/commands/run.js +123 -0
  87. package/src/commands/services.js +705 -0
  88. package/src/commands/status.js +231 -0
  89. package/src/commands/team.js +572 -0
  90. package/src/config.js +84 -0
  91. package/src/index.js +5 -0
  92. package/templates/project-context.json +10 -0
  93. package/templates/template_CONTRIB-NAME.json +22 -0
  94. package/templates/template_CR-ODM-NAME-000.exemple.json +32 -0
  95. package/templates/template_DEC-NAME-000.json +18 -0
  96. package/templates/template_INTV-NAME-000.json +15 -0
  97. package/templates/template_MISSION_CONTRACT.json +46 -0
  98. package/templates/template_ODM-NAME-000.json +89 -0
  99. package/templates/template_REGISTRY-PROJECT.json +26 -0
  100. package/templates/template_TXN-NAME-000.json +24 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "title": "",
3
+ "format": "json",
4
+ "tags": [],
5
+ "metadata": {
6
+ "odm_id": "",
7
+ "category": "",
8
+ "status": "DRAFT",
9
+ "executed_by": "",
10
+ "reviewed_by": "",
11
+ "validated_by": "",
12
+ "date_execution": "",
13
+ "date_validation": ""
14
+ },
15
+ "content": {
16
+ "summary": "",
17
+ "steps": [],
18
+ "deliverables": {
19
+ "files_created": [],
20
+ "files_modified": [],
21
+ "tests_added": 0,
22
+ "total_lines_estimated": 0
23
+ },
24
+ "quality": {
25
+ "tests_total": 0,
26
+ "tests_passed": 0,
27
+ "tests_failed": 0,
28
+ "typecheck_errors": 0,
29
+ "qa_findings": []
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "decision_meta": {
3
+ "decision_id": "",
4
+ "project_id": "",
5
+ "status": "DRAFT",
6
+ "decided_by": "",
7
+ "created_at": "",
8
+ "tags": []
9
+ },
10
+ "decision_payload": {
11
+ "title": "",
12
+ "context": "",
13
+ "rationale": "",
14
+ "impact": "",
15
+ "alternatives_rejected": [],
16
+ "refs": []
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "intervention_meta": {
3
+ "intervention_id": "",
4
+ "project_id": "",
5
+ "agent": "",
6
+ "created_at": "",
7
+ "tags": []
8
+ },
9
+ "intervention_payload": {
10
+ "action": "",
11
+ "detail": "",
12
+ "result": "",
13
+ "refs": []
14
+ }
15
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "_schema": "arka.hcm_v2.mission_contract.v1",
3
+ "contract_meta": {
4
+ "id": "",
5
+ "mission_id": "",
6
+ "project_id": "",
7
+ "thread_id": "",
8
+ "pack_id": "",
9
+ "status": "DRAFT",
10
+ "owner": "Jeremy Grimonpont",
11
+ "created_at": "",
12
+ "updated_at": ""
13
+ },
14
+ "contract_payload": {
15
+ "cadrage": {
16
+ "title": "",
17
+ "summary": "",
18
+ "objectives": [],
19
+ "scope": {
20
+ "in_scope": [],
21
+ "out_of_scope": []
22
+ },
23
+ "risks": []
24
+ },
25
+ "routage": {
26
+ "owner": "Jeremy Grimonpont",
27
+ "primary_agent": "",
28
+ "lanes": [],
29
+ "squad_trigger": null
30
+ },
31
+ "workflow": {
32
+ "phases": [],
33
+ "gates": []
34
+ },
35
+ "task_registry": [],
36
+ "outputs_expected": [],
37
+ "outputs_actual": [],
38
+ "evidence": {
39
+ "refs": [],
40
+ "hcm_nodes_created": []
41
+ },
42
+ "audit": {
43
+ "history": []
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "odm_meta": {
3
+ "odm_id": "",
4
+ "category": "",
5
+ "sequence": 0,
6
+ "project_id": "",
7
+ "schema_version": "1.0.0",
8
+ "status": "DRAFT",
9
+ "priority": "",
10
+ "created_at": "",
11
+ "created_by": { "actor_type": "", "actor_id": "" },
12
+ "validated_by": null,
13
+ "assigned_to": { "actor_type": "", "actor_id": "" },
14
+ "tags": [],
15
+ "dependencies": [],
16
+ "refs": [],
17
+ "source_file": ""
18
+ },
19
+ "odm_payload": {
20
+ "cadrage": {
21
+ "title": "",
22
+ "summary": "",
23
+ "objectives": [],
24
+ "principles": [],
25
+ "scope": {
26
+ "in_scope": [],
27
+ "out_of_scope": []
28
+ },
29
+ "routing": {
30
+ "chain": [],
31
+ "notify_leader": true
32
+ }
33
+ },
34
+ "step_registry": {
35
+ "total_steps": 0,
36
+ "steps": []
37
+ },
38
+ "outputs_expected": {
39
+ "items": [],
40
+ "acceptance": []
41
+ },
42
+ "limitations": [],
43
+ "rejection_criteria": [],
44
+ "modifications_summary": {
45
+ "files_created": 0,
46
+ "files_modified": 0,
47
+ "files_deleted": 0,
48
+ "estimated_lines": 0,
49
+ "details": []
50
+ },
51
+ "schema_impact": {
52
+ "node_types_introduced": [],
53
+ "edge_types_introduced": [],
54
+ "target_schemas_affected": [],
55
+ "concepts": []
56
+ }
57
+ },
58
+ "execution_cr": {
59
+ "reformulation": {
60
+ "comprehension": "",
61
+ "plan": []
62
+ },
63
+ "implementation": {
64
+ "started_at": "",
65
+ "completed_at": "",
66
+ "files": {
67
+ "created": [],
68
+ "modified": [],
69
+ "deleted": []
70
+ }
71
+ },
72
+ "evidence_pack": {
73
+ "required": false,
74
+ "refs": []
75
+ },
76
+ "tests": {
77
+ "passed": [],
78
+ "failed": [],
79
+ "skipped": []
80
+ },
81
+ "dod_validation": {
82
+ "items": [],
83
+ "all_passed": false
84
+ },
85
+ "summary": "",
86
+ "verdict": "PENDING",
87
+ "delivered_at": ""
88
+ }
89
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "_schema": "arka.agent_registry.v1",
3
+ "registry_meta": {
4
+ "registry_id": "",
5
+ "project_id": "",
6
+ "updated_at": "",
7
+ "updated_by": ""
8
+ },
9
+ "registry_payload": {
10
+ "hierarchy": {
11
+ "pm": {
12
+ "id": "",
13
+ "name": "",
14
+ "kind": "human",
15
+ "role": "Product Manager",
16
+ "responsibilities": []
17
+ },
18
+ "lanes": []
19
+ },
20
+ "workflow": {
21
+ "write_chain": [],
22
+ "review_chain": [],
23
+ "approval_chain": []
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "_schema": "arka.transaction.v1",
3
+ "transaction_meta": {
4
+ "txn_id": "",
5
+ "project_id": "",
6
+ "type": "",
7
+ "status": "SENT",
8
+ "created_at": ""
9
+ },
10
+ "transaction_payload": {
11
+ "from": {
12
+ "actor_type": "",
13
+ "actor_id": ""
14
+ },
15
+ "to": {
16
+ "actor_type": "",
17
+ "actor_id": ""
18
+ },
19
+ "subject": "",
20
+ "body": "",
21
+ "refs": [],
22
+ "attachments": []
23
+ }
24
+ }