archsight 0.1.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 (122) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +24 -0
  3. data/CODE_OF_CONDUCT.md +10 -0
  4. data/CONTRIBUTING.md +186 -0
  5. data/Dockerfile +39 -0
  6. data/LICENSE.txt +201 -0
  7. data/README.md +170 -0
  8. data/SECURITY.md +27 -0
  9. data/exe/archsight +9 -0
  10. data/lib/archsight/annotations/aggregators.rb +109 -0
  11. data/lib/archsight/annotations/annotation.rb +168 -0
  12. data/lib/archsight/annotations/architecture_annotations.rb +59 -0
  13. data/lib/archsight/annotations/backup_annotations.rb +21 -0
  14. data/lib/archsight/annotations/computed.rb +264 -0
  15. data/lib/archsight/annotations/email_recipient.rb +35 -0
  16. data/lib/archsight/annotations/generated_annotations.rb +17 -0
  17. data/lib/archsight/annotations/git_annotations.rb +21 -0
  18. data/lib/archsight/annotations/relation_resolver.rb +160 -0
  19. data/lib/archsight/cli.rb +120 -0
  20. data/lib/archsight/configuration.rb +36 -0
  21. data/lib/archsight/database.rb +183 -0
  22. data/lib/archsight/documentation.rb +171 -0
  23. data/lib/archsight/graph.rb +113 -0
  24. data/lib/archsight/helpers.rb +210 -0
  25. data/lib/archsight/linter.rb +77 -0
  26. data/lib/archsight/mcp/analyze_resource_tool.rb +222 -0
  27. data/lib/archsight/mcp/base.rb +48 -0
  28. data/lib/archsight/mcp/query_tool.rb +113 -0
  29. data/lib/archsight/mcp/resource_doc_tool.rb +87 -0
  30. data/lib/archsight/mcp.rb +6 -0
  31. data/lib/archsight/query/ast.rb +279 -0
  32. data/lib/archsight/query/errors.rb +39 -0
  33. data/lib/archsight/query/evaluator.rb +707 -0
  34. data/lib/archsight/query/lexer.rb +289 -0
  35. data/lib/archsight/query/parser.rb +506 -0
  36. data/lib/archsight/query.rb +68 -0
  37. data/lib/archsight/renderer.rb +134 -0
  38. data/lib/archsight/resources/application_component.rb +346 -0
  39. data/lib/archsight/resources/application_interface.rb +54 -0
  40. data/lib/archsight/resources/application_service.rb +222 -0
  41. data/lib/archsight/resources/base.rb +300 -0
  42. data/lib/archsight/resources/business_actor.rb +195 -0
  43. data/lib/archsight/resources/business_constraint.rb +32 -0
  44. data/lib/archsight/resources/business_process.rb +37 -0
  45. data/lib/archsight/resources/business_product.rb +206 -0
  46. data/lib/archsight/resources/business_requirement.rb +56 -0
  47. data/lib/archsight/resources/compliance_evidence.rb +42 -0
  48. data/lib/archsight/resources/data_object.rb +49 -0
  49. data/lib/archsight/resources/motivation_goal.rb +37 -0
  50. data/lib/archsight/resources/motivation_outcome.rb +33 -0
  51. data/lib/archsight/resources/motivation_stakeholder.rb +38 -0
  52. data/lib/archsight/resources/strategy_capability.rb +38 -0
  53. data/lib/archsight/resources/technology_artifact.rb +154 -0
  54. data/lib/archsight/resources/technology_interface.rb +34 -0
  55. data/lib/archsight/resources/technology_node.rb +42 -0
  56. data/lib/archsight/resources/technology_service.rb +35 -0
  57. data/lib/archsight/resources/technology_system_software.rb +37 -0
  58. data/lib/archsight/resources/view.rb +51 -0
  59. data/lib/archsight/resources.rb +49 -0
  60. data/lib/archsight/template.rb +49 -0
  61. data/lib/archsight/version.rb +5 -0
  62. data/lib/archsight/web/application.rb +290 -0
  63. data/lib/archsight/web/doc/archimate.md +215 -0
  64. data/lib/archsight/web/doc/computed_annotations.md +316 -0
  65. data/lib/archsight/web/doc/icons.md +303 -0
  66. data/lib/archsight/web/doc/index.md.erb +74 -0
  67. data/lib/archsight/web/doc/modeling.md +200 -0
  68. data/lib/archsight/web/doc/search.md +227 -0
  69. data/lib/archsight/web/doc/togaf.md +255 -0
  70. data/lib/archsight/web/doc/tool.md +90 -0
  71. data/lib/archsight/web/public/css/artifact.css +985 -0
  72. data/lib/archsight/web/public/css/base.css +201 -0
  73. data/lib/archsight/web/public/css/graph.css +106 -0
  74. data/lib/archsight/web/public/css/highlight.min.css +10 -0
  75. data/lib/archsight/web/public/css/iconoir.css +22 -0
  76. data/lib/archsight/web/public/css/instance.css +329 -0
  77. data/lib/archsight/web/public/css/layout.css +421 -0
  78. data/lib/archsight/web/public/css/mermaid-layers.css +188 -0
  79. data/lib/archsight/web/public/css/pico.min.css +4 -0
  80. data/lib/archsight/web/public/favicon.ico +0 -0
  81. data/lib/archsight/web/public/img/archimate.png +0 -0
  82. data/lib/archsight/web/public/img/togaf-high-level.png +0 -0
  83. data/lib/archsight/web/public/js/graph-zoom.js +18 -0
  84. data/lib/archsight/web/public/js/highlight.min.js +3899 -0
  85. data/lib/archsight/web/public/js/htmx.min.js +1 -0
  86. data/lib/archsight/web/public/js/mermaid-init.js +88 -0
  87. data/lib/archsight/web/public/js/mermaid.min.js +2811 -0
  88. data/lib/archsight/web/public/js/sparkline.js +42 -0
  89. data/lib/archsight/web/public/js/svg-pan-zoom.min.js +3 -0
  90. data/lib/archsight/web/public/js/svg-zoom-controls.js +93 -0
  91. data/lib/archsight/web/views/index.haml +12 -0
  92. data/lib/archsight/web/views/partials/artifact/_activity.haml +55 -0
  93. data/lib/archsight/web/views/partials/artifact/_agentic.haml +25 -0
  94. data/lib/archsight/web/views/partials/artifact/_deployment.haml +29 -0
  95. data/lib/archsight/web/views/partials/artifact/_git_info.haml +16 -0
  96. data/lib/archsight/web/views/partials/artifact/_language_stats.haml +53 -0
  97. data/lib/archsight/web/views/partials/artifact/_links.haml +24 -0
  98. data/lib/archsight/web/views/partials/artifact/_project_estimate.haml +26 -0
  99. data/lib/archsight/web/views/partials/artifact/_repositories.haml +55 -0
  100. data/lib/archsight/web/views/partials/artifact/_team.haml +83 -0
  101. data/lib/archsight/web/views/partials/artifact/_workflow.haml +69 -0
  102. data/lib/archsight/web/views/partials/components/_activity.haml +37 -0
  103. data/lib/archsight/web/views/partials/components/_git.haml +17 -0
  104. data/lib/archsight/web/views/partials/components/_jira.haml +18 -0
  105. data/lib/archsight/web/views/partials/components/_languages.haml +29 -0
  106. data/lib/archsight/web/views/partials/components/_owner.haml +15 -0
  107. data/lib/archsight/web/views/partials/components/_repositories.haml +37 -0
  108. data/lib/archsight/web/views/partials/components/_status.haml +23 -0
  109. data/lib/archsight/web/views/partials/instance/_detail.haml +99 -0
  110. data/lib/archsight/web/views/partials/instance/_graph.haml +6 -0
  111. data/lib/archsight/web/views/partials/instance/_list.haml +84 -0
  112. data/lib/archsight/web/views/partials/instance/_relations.haml +43 -0
  113. data/lib/archsight/web/views/partials/instance/_requirements.haml +41 -0
  114. data/lib/archsight/web/views/partials/instance/_view_detail.haml +57 -0
  115. data/lib/archsight/web/views/partials/layout/_content.haml +40 -0
  116. data/lib/archsight/web/views/partials/layout/_error.haml +22 -0
  117. data/lib/archsight/web/views/partials/layout/_head.haml +24 -0
  118. data/lib/archsight/web/views/partials/layout/_navigation.haml +20 -0
  119. data/lib/archsight/web/views/partials/layout/_sidebar.haml +27 -0
  120. data/lib/archsight/web/views/search.haml +53 -0
  121. data/lib/archsight.rb +17 -0
  122. metadata +311 -0
@@ -0,0 +1,201 @@
1
+ /* Base/Shared Styles */
2
+
3
+ .content {
4
+ zoom: 70%;
5
+ }
6
+
7
+ /* Reduce vertical spacing on articles to minimize scrolling */
8
+ .content article {
9
+ margin-bottom: 1rem;
10
+ }
11
+
12
+ .content article > header {
13
+ padding-bottom: 0.5rem;
14
+ margin-bottom: 0.5rem;
15
+ }
16
+
17
+ .content article > header h2 {
18
+ margin-bottom: 0;
19
+ }
20
+
21
+ .content svg a {
22
+ text-decoration: none;
23
+ }
24
+
25
+ details.dropdown>summary+ul {
26
+ width: auto;
27
+ }
28
+
29
+ .content .documentation tbody ul {
30
+ margin-bottom: 0;
31
+ }
32
+
33
+ /* Reduce table cell padding in documentation tables */
34
+ .content .documentation td,
35
+ .content .documentation th {
36
+ padding: 0.5rem 0.75rem;
37
+ }
38
+
39
+ article>header {
40
+ display: flex;
41
+ align-items: flex-start;
42
+ justify-content: space-between;
43
+ }
44
+
45
+ article>header h2 {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: 0.5rem;
49
+ }
50
+
51
+ /* Kind help button (small, in header) */
52
+ .kind-help {
53
+ display: inline-flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ width: 24px;
57
+ height: 24px;
58
+ border-radius: 50%;
59
+ background-color: var(--card-background-color);
60
+ border: 1px solid var(--muted-border-color);
61
+ transition: all 0.2s ease;
62
+ color: var(--muted-color);
63
+ font-size: 0.9em;
64
+ }
65
+
66
+ .kind-help:hover {
67
+ background-color: var(--primary);
68
+ color: var(--primary-inverse);
69
+ border-color: var(--primary);
70
+ }
71
+
72
+ /* Badge styles */
73
+ .badge {
74
+ font-size: 0.75em;
75
+ padding: 3px 8px;
76
+ border-radius: 12px;
77
+ font-weight: 500;
78
+ white-space: nowrap;
79
+ }
80
+
81
+ .badge-warning {
82
+ background-color: #fef3c7;
83
+ color: #92400e;
84
+ }
85
+
86
+ .badge-info {
87
+ background-color: #dbeafe;
88
+ color: #1e40af;
89
+ }
90
+
91
+ .badge-danger {
92
+ background-color: #fee2e2;
93
+ color: #991b1b;
94
+ }
95
+
96
+ .badge-secondary {
97
+ background-color: #f3f4f6;
98
+ color: #6b7280;
99
+ }
100
+
101
+ /* Dark mode badge adjustments */
102
+ @media (prefers-color-scheme: dark) {
103
+ .badge-warning {
104
+ background-color: #78350f;
105
+ color: #fef3c7;
106
+ }
107
+
108
+ .badge-info {
109
+ background-color: #1e3a5f;
110
+ color: #93c5fd;
111
+ }
112
+
113
+ .badge-danger {
114
+ background-color: #7f1d1d;
115
+ color: #fecaca;
116
+ }
117
+
118
+ .badge-secondary {
119
+ background-color: #374151;
120
+ color: #d1d5db;
121
+ }
122
+ }
123
+
124
+ /* Generated resource badge - prominent display in header */
125
+ .generated-badge {
126
+ display: flex;
127
+ flex-direction: column;
128
+ align-items: flex-end;
129
+ gap: 2px;
130
+ font-size: 0.75em;
131
+ padding: 6px 12px;
132
+ background-color: var(--code-background-color);
133
+ color: var(--muted-color);
134
+ border-radius: 6px;
135
+ border: 1px solid var(--muted-border-color);
136
+ }
137
+
138
+ .generated-badge .generated-script {
139
+ font-weight: 500;
140
+ }
141
+
142
+ .generated-badge .generated-time {
143
+ font-size: 0.9em;
144
+ opacity: 0.8;
145
+ }
146
+
147
+ /* Mermaid diagrams - base styles overridden by mermaid-layers.css */
148
+
149
+ /* Wiki-style broken links */
150
+ .broken-link {
151
+ color: #dc2626;
152
+ text-decoration: underline wavy;
153
+ cursor: help;
154
+ }
155
+
156
+ /* ===== Layer-based Icon Colors ===== */
157
+
158
+ /* Strategy Layer - Orange */
159
+ .icon-strategy {
160
+ color: #D4824A;
161
+ }
162
+
163
+ /* Business Layer - Yellow */
164
+ .icon-business {
165
+ color: #D4B83C;
166
+ }
167
+
168
+ /* Application Layer - Blue */
169
+ .icon-application {
170
+ color: #4A9ECD;
171
+ }
172
+
173
+ /* Technology Layer - Green */
174
+ .icon-technology {
175
+ color: #7AB316;
176
+ }
177
+
178
+ /* Motivation Layer - Purple */
179
+ .icon-motivation {
180
+ color: #AB47BC;
181
+ }
182
+
183
+ /* Other - Gray */
184
+ .icon-other {
185
+ color: #999999;
186
+ }
187
+
188
+ /* Responsive content */
189
+ @media all and (min-width: 800px) {
190
+ .content {
191
+ flex: 1;
192
+ display: flex;
193
+ flex-direction: column;
194
+ zoom: 100%;
195
+ min-width: 0;
196
+ }
197
+ }
198
+
199
+ main .canvas a {
200
+ text-decoration: none;
201
+ }
@@ -0,0 +1,106 @@
1
+ /* ===== Global Styles ===== */
2
+
3
+ /* Hide table borders in all nodes */
4
+ .node polygon[fill="none"] {
5
+ stroke: none !important;
6
+ }
7
+
8
+ /* Default text color for all nodes */
9
+ .node text {
10
+ fill: #000000 !important;
11
+ }
12
+
13
+
14
+ /* ===== Layer Colors (Light Mode) ===== */
15
+
16
+ /* Strategy Layer - Orange */
17
+ .layer-strategy path[fill="lightgrey"] {
18
+ stroke: #F4A261 !important;
19
+ fill: #F4A261 !important;
20
+ }
21
+
22
+ /* Business Layer - Yellow */
23
+ .layer-business path[fill="lightgrey"] {
24
+ stroke: #F9DC5C !important;
25
+ fill: #F9DC5C !important;
26
+ }
27
+
28
+ /* Application Layer - Blue */
29
+ .layer-application path[fill="lightgrey"] {
30
+ stroke: #6CBEED !important;
31
+ fill: #6CBEED !important;
32
+ }
33
+
34
+ /* Technology Layer - Green */
35
+ .layer-technology path[fill="lightgrey"] {
36
+ stroke: #8AC926 !important;
37
+ fill: #8AC926 !important;
38
+ }
39
+
40
+ /* Motivation Layer - Purple */
41
+ .layer-motivation path[fill="lightgrey"] {
42
+ stroke: #CE93D8 !important;
43
+ fill: #CE93D8 !important;
44
+ }
45
+
46
+ /* Other - Gray */
47
+ .layer-other path[fill="lightgrey"] {
48
+ stroke: #cccccc !important;
49
+ fill: #cccccc !important;
50
+ }
51
+
52
+
53
+ /* ===== Dark Mode ===== */
54
+
55
+ @media (prefers-color-scheme: dark) {
56
+
57
+ /* Override black strokes and fills for visibility */
58
+ [stroke="black"] {
59
+ stroke: white !important;
60
+ }
61
+
62
+ [fill="black"] {
63
+ fill: white !important;
64
+ }
65
+
66
+ /* White text for all nodes in dark mode */
67
+ .node text {
68
+ fill: #FFFFFF !important;
69
+ }
70
+
71
+ /* Strategy Layer - Orange */
72
+ .layer-strategy path[fill="lightgrey"] {
73
+ stroke: #D4824A !important;
74
+ fill: #C17A3A !important;
75
+ }
76
+
77
+ /* Business Layer - Yellow */
78
+ .layer-business path[fill="lightgrey"] {
79
+ stroke: #D9BC3C !important;
80
+ fill: #C9AC2C !important;
81
+ }
82
+
83
+ /* Application Layer - Blue */
84
+ .layer-application path[fill="lightgrey"] {
85
+ stroke: #4A9ECD !important;
86
+ fill: #2A7EAD !important;
87
+ }
88
+
89
+ /* Technology Layer - Green */
90
+ .layer-technology path[fill="lightgrey"] {
91
+ stroke: #7AB316 !important;
92
+ fill: #6A9916 !important;
93
+ }
94
+
95
+ /* Motivation Layer */
96
+ .layer-motivation path[fill="lightgrey"] {
97
+ stroke: #AB47BC !important;
98
+ fill: #8E24AA !important;
99
+ }
100
+
101
+ /* Other */
102
+ .layer-other path[fill="lightgrey"] {
103
+ stroke: #999999 !important;
104
+ fill: #666666 !important;
105
+ }
106
+ }
@@ -0,0 +1,10 @@
1
+ /* Highlight.js - GitHub theme with dark mode support */
2
+ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}
3
+
4
+ /* Light theme (default) */
5
+ .hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
6
+
7
+ /* Dark theme */
8
+ @media (prefers-color-scheme: dark) {
9
+ .hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
10
+ }