ad-agent_architecture 0.0.13 → 0.0.15

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c41297848057dc821b24cf29aa498f6cf409a03ca73d742d00cc44dc82a77a23
4
- data.tar.gz: 187f2ba5232c9f28e11812a1458e3ee24aea85019465c31ee851f1ec3ca06489
3
+ metadata.gz: 687a271cf757437090d2deb2e634a6382c9bedceec46847a683cb76b517ffa58
4
+ data.tar.gz: 2f827a0f5d5f205fa98cc1cd89c9b4486ddb0b7dff61010a072a91c54c15817a
5
5
  SHA512:
6
- metadata.gz: 17fb7a95b7fc0d0259be2574be526d638de70cd5c25ffefcd22318c8a01b296537a544e249445594e4a32a65676b1d58eb8cb367f46a613084961671698ca994
7
- data.tar.gz: f930948d7983e1dbced9d35379b3fff71e8145966bad9c63829494bb9f8850d3c4514de345536f852f4f622f11bd64e074b0dce2aa1b2b2b56c3a0e28085a2a2
6
+ metadata.gz: a5437a81922ba746bd78182756d765de6b4ba61a9e9fb314ddfb98f5e4fbda317c6573e84f1c827097d1210862a677ec1a71e2f9c1e160b7aab972c42b15c01b
7
+ data.tar.gz: 626da045ea2e3c73f9c72e2f83032bd7ccebd74869d18d4eb317f09653bb999be6af45b4cb84a957e29604de1ae91cc0465e741bfd5aa110c6c63347265edd97
data/.builders/boot.rb CHANGED
@@ -24,6 +24,7 @@ KConfig.configure(CONFIG_KEY) do |config|
24
24
 
25
25
  config.target_folders.add(:app , base_folder)
26
26
  config.target_folders.add(:builder , builder_folder)
27
+ config.target_folders.add(:docs , :app, 'docs')
27
28
  end
28
29
 
29
30
  KConfig.configuration(CONFIG_KEY).debug
@@ -0,0 +1,49 @@
1
+ KManager.action :project_plan do
2
+ action do
3
+
4
+ DrawioDsl::Drawio
5
+ .init(k_builder, on_exist: :write, on_action: :execute)
6
+ .diagram(rounded: 1, glass: 1)
7
+ .page('In progress', theme: :style_03, margin_left: 0, margin_top: 0) do
8
+
9
+ # h5(x: 300, y: -50, w: 400, h: 80, title: 'DrawIO DSL')
10
+
11
+ grid_layout(y: 190, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
12
+
13
+ # Prompts need to support file read operation
14
+
15
+ todo(title: 'Generate DSL for an Agent Architecture workflow')
16
+ end
17
+ .page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
18
+
19
+ # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
20
+
21
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
22
+
23
+ todo(title: 'Visual graph of the workflow')
24
+ todo(title: 'Horizontal')
25
+ todo(title: 'Clicking on sections will show the steps in that section')
26
+ todo(title: 'Clicking on attributes will show all attributes in the workflow')
27
+ todo(title: 'Clicking on prompts will show all prompts in the workflow')
28
+ todo(title: 'Clicking on dashboard will show visual hierarchy of the workflow')
29
+ todo(title: 'Need a runs button')
30
+ todo(title: 'VCode Editor: https://chatgpt.com/c/e09e1367-db5e-4786-b362-db35805b1e20')
31
+
32
+ end
33
+ .page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
34
+
35
+ # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
36
+
37
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
38
+
39
+ todo(title: 'Attributes are auto created when used in a step, but not preconfigured')
40
+ todo(title: 'Add support for project plan')
41
+ todo(title: 'Fix the DB issue introduced via DSL refactor')
42
+ end
43
+ .cd(:docs)
44
+ .save('project-plan/project.drawio')
45
+ .export_svg('project-plan/project_in_progress', page: 1)
46
+ .export_svg('project-plan/project_todo' , page: 2)
47
+ .export_svg('project-plan/project_done' , page: 3)
48
+ end
49
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.0.14](https://github.com/appydave/ad-agent_architecture/compare/v0.0.13...v0.0.14) (2024-07-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add project plan document ([f32c277](https://github.com/appydave/ad-agent_architecture/commit/f32c277f197d794ec7426d81e6fa483d2ab5b79b))
7
+
8
+ ## [0.0.13](https://github.com/appydave/ad-agent_architecture/compare/v0.0.12...v0.0.13) (2024-07-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add listen GEM and watch RBS files, plus bugs in database save ([b95e9ff](https://github.com/appydave/ad-agent_architecture/commit/b95e9ffec2fd03780e890a9ec7ca3708a53c17ef))
14
+
1
15
  ## [0.0.12](https://github.com/appydave/ad-agent_architecture/compare/v0.0.11...v0.0.12) (2024-07-02)
2
16
 
3
17
 
data/README.md CHANGED
@@ -28,7 +28,7 @@ gem install ad-agent_architecture
28
28
 
29
29
  As a Developer, I want to understand the object graph and workflows for AI agents in multiple scenarios, so that I can build out AI applications effectively
30
30
 
31
- See all [stories](./STORIES.md)
31
+ See [project plan](./docs/project-plan/project-plan.md)
32
32
 
33
33
 
34
34
  ## Usage
@@ -0,0 +1,24 @@
1
+ # Drawio Dsl - Project Plan
2
+
3
+ ## In Progress
4
+
5
+ The next ticket to work on
6
+
7
+ ![](project_in_progress.svg)
8
+
9
+ ## To Do
10
+
11
+ List of tickets to do
12
+
13
+ ![](project_todo.svg)
14
+
15
+ ## Complete
16
+
17
+ List of completed tickets
18
+
19
+ ![](project_done.svg)
20
+
21
+
22
+ ## Copyright
23
+
24
+ Copyright (c) David Cruwys. See [MIT License](LICENSE.txt) for further details.
@@ -0,0 +1,62 @@
1
+ <mxfile host="QW5">
2
+ <diagram id="iEC" name="In progress">
3
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
4
+ <root>
5
+ <mxCell id="page_root_iEC" parent="iEC"/>
6
+ <mxCell id="node_root_iEC" parent="page_root_iEC"/>
7
+ <mxCell id="iEC-2" value="Generate DSL for an Agent Architecture workflow" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_iEC">
8
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
9
+ </mxCell>
10
+ </root>
11
+ </mxGraphModel>
12
+ </diagram>
13
+ <diagram id="SiH" name="To Do">
14
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
15
+ <root>
16
+ <mxCell id="page_root_SiH" parent="SiH"/>
17
+ <mxCell id="node_root_SiH" parent="page_root_SiH"/>
18
+ <mxCell id="SiH-2" value="Visual graph of the workflow" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
19
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
20
+ </mxCell>
21
+ <mxCell id="SiH-3" value="Horizontal" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
22
+ <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
23
+ </mxCell>
24
+ <mxCell id="SiH-4" value="Clicking on sections will show the steps in that section" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
25
+ <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
26
+ </mxCell>
27
+ <mxCell id="SiH-5" value="Clicking on attributes will show all attributes in the workflow" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
28
+ <mxGeometry x="10" y="90" width="300" height="60" as="geometry"/>
29
+ </mxCell>
30
+ <mxCell id="SiH-6" value="Clicking on prompts will show all prompts in the workflow" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
31
+ <mxGeometry x="330" y="90" width="300" height="60" as="geometry"/>
32
+ </mxCell>
33
+ <mxCell id="SiH-7" value="Clicking on dashboard will show visual hierarchy of the workflow" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
34
+ <mxGeometry x="650" y="90" width="300" height="60" as="geometry"/>
35
+ </mxCell>
36
+ <mxCell id="SiH-8" value="Need a runs button" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
37
+ <mxGeometry x="10" y="170" width="300" height="60" as="geometry"/>
38
+ </mxCell>
39
+ <mxCell id="SiH-9" value="VCode Editor: https://chatgpt.com/c/e09e1367-db5e-4786-b362-db35805b1e20" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_SiH">
40
+ <mxGeometry x="330" y="170" width="300" height="60" as="geometry"/>
41
+ </mxCell>
42
+ </root>
43
+ </mxGraphModel>
44
+ </diagram>
45
+ <diagram id="4xe" name="Done">
46
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
47
+ <root>
48
+ <mxCell id="page_root_4xe" parent="4xe"/>
49
+ <mxCell id="node_root_4xe" parent="page_root_4xe"/>
50
+ <mxCell id="4xe-2" value="Attributes are auto created when used in a step, but not preconfigured" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_4xe">
51
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
52
+ </mxCell>
53
+ <mxCell id="4xe-3" value="Add support for project plan" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_4xe">
54
+ <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
55
+ </mxCell>
56
+ <mxCell id="4xe-4" value="Fix the DB issue introduced via DSL refactor" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_4xe">
57
+ <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
58
+ </mxCell>
59
+ </root>
60
+ </mxGraphModel>
61
+ </diagram>
62
+ </mxfile>
@@ -0,0 +1,3 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="62px" viewBox="-0.5 -0.5 942 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><g data-cell-id="page_root_4xe"><g data-cell-id="node_root_4xe"><g data-cell-id="4xe-2"><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Attributes are auto created when used in a step, but not preconfigured</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Attributes are auto created when used in a step, b...</text></switch></g></g></g><g data-cell-id="4xe-3"><g><rect x="320" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 330.15 -1 Q 319 -1 319 10.15 L 319 24 Q 470 42 621 24 L 621 10.15 Q 621 -1 609.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Add support for project plan</div></div></div></foreignObject><text x="470" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Add support for project plan</text></switch></g></g></g><g data-cell-id="4xe-4"><g><rect x="640" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 650.15 -1 Q 639 -1 639 10.15 L 639 24 Q 790 42 941 24 L 941 10.15 Q 941 -1 929.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 641px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Fix the DB issue introduced via DSL refactor</div></div></div></foreignObject><text x="790" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Fix the DB issue introduced via DSL refactor</text></switch></g></g></g></g></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -0,0 +1,3 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="302px" height="62px" viewBox="-0.5 -0.5 302 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><g data-cell-id="page_root_iEC"><g data-cell-id="node_root_iEC"><g data-cell-id="iEC-2"><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Generate DSL for an Agent Architecture workflow</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Generate DSL for an Agent Architecture workflow</text></switch></g></g></g></g></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -0,0 +1,3 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="222px" viewBox="-0.5 -0.5 942 222"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><g data-cell-id="page_root_SiH"><g data-cell-id="node_root_SiH"><g data-cell-id="SiH-2"><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Visual graph of the workflow</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Visual graph of the workflow</text></switch></g></g></g><g data-cell-id="SiH-3"><g><rect x="320" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 330.15 -1 Q 319 -1 319 10.15 L 319 24 Q 470 42 621 24 L 621 10.15 Q 621 -1 609.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Horizontal</div></div></div></foreignObject><text x="470" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Horizontal</text></switch></g></g></g><g data-cell-id="SiH-4"><g><rect x="640" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 650.15 -1 Q 639 -1 639 10.15 L 639 24 Q 790 42 941 24 L 941 10.15 Q 941 -1 929.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 641px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Clicking on sections will show the steps in that section</div></div></div></foreignObject><text x="790" y="34" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Clicking on sections will show the steps in that s...</text></switch></g></g></g><g data-cell-id="SiH-5"><g><rect x="0" y="80" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 79 Q -1 79 -1 90.15 L -1 104 Q 150 122 301 104 L 301 90.15 Q 301 79 289.85 79 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 110px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Clicking on attributes will show all attributes in the workflow</div></div></div></foreignObject><text x="150" y="114" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Clicking on attributes will show all attributes in...</text></switch></g></g></g><g data-cell-id="SiH-6"><g><rect x="320" y="80" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 330.15 79 Q 319 79 319 90.15 L 319 104 Q 470 122 621 104 L 621 90.15 Q 621 79 609.85 79 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 110px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Clicking on prompts will show all prompts in the workflow</div></div></div></foreignObject><text x="470" y="114" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Clicking on prompts will show all prompts in the w...</text></switch></g></g></g><g data-cell-id="SiH-7"><g><rect x="640" y="80" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 650.15 79 Q 639 79 639 90.15 L 639 104 Q 790 122 941 104 L 941 90.15 Q 941 79 929.85 79 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 110px; margin-left: 641px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Clicking on dashboard will show visual hierarchy of the workflow</div></div></div></foreignObject><text x="790" y="114" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Clicking on dashboard will show visual hierarchy o...</text></switch></g></g></g><g data-cell-id="SiH-8"><g><rect x="0" y="160" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 159 Q -1 159 -1 170.15 L -1 184 Q 150 202 301 184 L 301 170.15 Q 301 159 289.85 159 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 190px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Need a runs button</div></div></div></foreignObject><text x="150" y="194" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Need a runs button</text></switch></g></g></g><g data-cell-id="SiH-9"><g><rect x="320" y="160" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 330.15 159 Q 319 159 319 170.15 L 319 184 Q 470 202 621 184 L 621 170.15 Q 621 159 609.85 159 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 190px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VCode Editor: https://chatgpt.com/c/e09e1367-db5e-4786-b362-db35805b1e20</div></div></div></foreignObject><text x="470" y="194" fill="#333333" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">VCode Editor: https://chatgpt.com/c/e09e1367-db5e-...</text></switch></g></g></g></g></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -10,6 +10,16 @@ module Ad
10
10
 
11
11
  workflow[:attributes][name] = { name: name, type: type, is_array: is_array }
12
12
  end
13
+
14
+ def infer_attribute(name)
15
+ raise ArgumentError, 'Attribute name must be a string or symbol' unless name.is_a?(String) || name.is_a?(Symbol)
16
+
17
+ return if workflow[:attributes].key?(name)
18
+
19
+ # May want to add more sophisticated type inference here
20
+ type = name.to_s.end_with?('s') ? 'array' : 'string'
21
+ workflow[:attributes][name] = { name: name, type: type, is_array: type == 'array' }
22
+ end
13
23
  end
14
24
  end
15
25
  end
@@ -1,3 +1,5 @@
1
+ # file: lib/ad/agent_architecture/dsl/step_dsl.rb
2
+
1
3
  # frozen_string_literal: true
2
4
 
3
5
  module Ad
@@ -22,16 +24,24 @@ module Ad
22
24
  @section[:steps] << @step
23
25
  end
24
26
 
25
- def input(attr_name, **_opts)
26
- @step[:input_attributes] << attr_name
27
+ def input(name, **_opts)
28
+ infer_attribute(name)
29
+ @step[:input_attributes] << name
30
+ end
31
+
32
+ def output(name, **_opts)
33
+ infer_attribute(name)
34
+ @step[:output_attributes] << name
27
35
  end
28
36
 
29
- def output(attr_name, **_opts)
30
- @step[:output_attributes] << attr_name
37
+ def prompt(prompt, **_opts)
38
+ @step[:prompt] = prompt
31
39
  end
32
40
 
33
- def prompt(prompt_text, **_opts)
34
- @step[:prompt] = prompt_text
41
+ private
42
+
43
+ def infer_attribute(name)
44
+ AttributeDsl.new(workflow).infer_attribute(name)
35
45
  end
36
46
  end
37
47
  end
@@ -0,0 +1,119 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ad
4
+ module AgentArchitecture
5
+ module Report
6
+ # Generate DSL for an Agent Architecture workflow based on the workflow hash
7
+ class DslGenerator
8
+ include KLog::Logging
9
+
10
+ attr_reader :display
11
+ attr_reader :clipboard
12
+
13
+ def initialize(workflow, display: true, clipboard: false)
14
+ @workflow_hash = workflow if workflow.is_a?(Hash)
15
+ @workflow_hash = workflow.workflow if workflow.is_a?(Ad::AgentArchitecture::Dsl::WorkflowDsl)
16
+
17
+ @display = display
18
+ @clipboard = clipboard
19
+ end
20
+
21
+ def dsl_for_settings
22
+ settings_dsl = build_settings_dsl
23
+ render(settings_dsl)
24
+ settings_dsl
25
+ end
26
+
27
+ def dsl_for_attributes
28
+ attributes_dsl = build_attributes_dsl
29
+ render(attributes_dsl)
30
+ attributes_dsl
31
+ end
32
+
33
+ def dsl_for_prompts
34
+ prompts_dsl = build_prompts_dsl
35
+ render(prompts_dsl)
36
+ prompts_dsl
37
+ end
38
+
39
+ def dsl_for_sections
40
+ sections_dsl = build_sections_dsl
41
+ render(sections_dsl)
42
+ sections_dsl
43
+ end
44
+
45
+ def dsl_for_workflow
46
+ workflow_dsl = build_workflow_dsl
47
+ render(workflow_dsl)
48
+ workflow_dsl
49
+ end
50
+
51
+ private
52
+
53
+ def build_settings_dsl
54
+ settings_dsl = "settings do\n"
55
+ @workflow_hash[:settings].each do |name, value|
56
+ settings_dsl += " #{name} #{value.inspect}\n"
57
+ end
58
+
59
+ settings_dsl += 'end'
60
+ settings_dsl
61
+ end
62
+
63
+ def build_attributes_dsl
64
+ attributes_dsl = "attributes do\n"
65
+ @workflow_hash[:attributes].each do |name, details|
66
+ attributes_dsl += " attribute :#{name}, type: :#{details[:type]}"
67
+ attributes_dsl += ", is_array: #{details[:is_array]}" if details[:is_array]
68
+ attributes_dsl += "\n"
69
+ end
70
+ attributes_dsl += 'end'
71
+ attributes_dsl
72
+ end
73
+
74
+ def build_prompts_dsl
75
+ prompts_dsl = "prompts do\n"
76
+ @workflow_hash[:prompts].each do |name, details|
77
+ prompts_dsl += " prompt :#{name}, content: #{details[:content].inspect}\n"
78
+ end
79
+ prompts_dsl += 'end'
80
+ prompts_dsl
81
+ end
82
+
83
+ def build_sections_dsl
84
+ sections_dsl = ''
85
+ @workflow_hash[:sections].each do |section|
86
+ sections_dsl += "section('#{section[:name]}') do\n"
87
+ section[:steps].each do |step|
88
+ sections_dsl += " step('#{step[:name]}') do\n"
89
+ step[:input_attributes].each { |attr| sections_dsl += " input :#{attr}\n" }
90
+ step[:output_attributes].each { |attr| sections_dsl += " output :#{attr}\n" }
91
+ sections_dsl += " prompt :#{step[:prompt]}\n" if step[:prompt]
92
+ sections_dsl += " end\n"
93
+ end
94
+ sections_dsl += "end\n"
95
+ end
96
+ sections_dsl
97
+ end
98
+
99
+ def build_workflow_dsl
100
+ workflow_dsl = "dsl = Agent.create('#{@workflow_hash[:name]}') do\n"
101
+ workflow_dsl += build_settings_dsl
102
+ workflow_dsl += "\n\n"
103
+ workflow_dsl += build_prompts_dsl
104
+ workflow_dsl += "\n\n"
105
+ workflow_dsl += build_attributes_dsl
106
+ workflow_dsl += "\n\n"
107
+ workflow_dsl += build_sections_dsl
108
+ workflow_dsl += "\nend"
109
+ workflow_dsl
110
+ end
111
+
112
+ def render(dsl_code)
113
+ puts dsl_code if display
114
+ IO.popen('pbcopy', 'w') { |f| f << dsl_code } if clipboard
115
+ end
116
+ end
117
+ end
118
+ end
119
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ad
4
4
  module AgentArchitecture
5
- VERSION = '0.0.13'
5
+ VERSION = '0.0.15'
6
6
  end
7
7
  end
@@ -24,6 +24,7 @@ require 'ad/agent_architecture/dsl/agent_dsl'
24
24
  require 'ad/agent_architecture/dsl/actions/save_database'
25
25
  require 'ad/agent_architecture/dsl/actions/save_json'
26
26
  require 'ad/agent_architecture/dsl/actions/save_yaml'
27
+ require 'ad/agent_architecture/report/dsl_generator'
27
28
  require 'ad/agent_architecture/report/workflow_detail_report'
28
29
  require 'ad/agent_architecture/report/workflow_list_report'
29
30
 
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "ad-agent_architecture",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "ad-agent_architecture",
9
- "version": "0.0.13",
9
+ "version": "0.0.15",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ad-agent_architecture",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Architecture/Schema for AI Agents",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ad-agent_architecture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -62,6 +62,7 @@ files:
62
62
  - ".builders/_.rb"
63
63
  - ".builders/boot.rb"
64
64
  - ".builders/generators/01-bootstrap.rb"
65
+ - ".builders/generators/project-plan.rb"
65
66
  - ".releaserc.json"
66
67
  - ".rspec"
67
68
  - ".rubocop.yml"
@@ -78,6 +79,11 @@ files:
78
79
  - bin/watch.rb
79
80
  - docs/erd.svg
80
81
  - docs/images/sample-workflow.png
82
+ - docs/project-plan/project-plan.md
83
+ - docs/project-plan/project.drawio
84
+ - docs/project-plan/project_done.svg
85
+ - docs/project-plan/project_in_progress.svg
86
+ - docs/project-plan/project_todo.svg
81
87
  - docs/requirements.md
82
88
  - docs/structure-youtube-script.yaml
83
89
  - lib/ad/agent_architecture.rb
@@ -95,6 +101,7 @@ files:
95
101
  - lib/ad/agent_architecture/dsl/settings_dsl.rb
96
102
  - lib/ad/agent_architecture/dsl/step_dsl.rb
97
103
  - lib/ad/agent_architecture/dsl/workflow_dsl.rb
104
+ - lib/ad/agent_architecture/report/dsl_generator.rb
98
105
  - lib/ad/agent_architecture/report/workflow_detail_report.rb
99
106
  - lib/ad/agent_architecture/report/workflow_list_report.rb
100
107
  - lib/ad/agent_architecture/sql/workflow_details.sql