flowglyph 0.1.0__tar.gz

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 (384) hide show
  1. flowglyph-0.1.0/.gitignore +17 -0
  2. flowglyph-0.1.0/CHANGELOG.md +252 -0
  3. flowglyph-0.1.0/CODE_OF_CONDUCT.md +83 -0
  4. flowglyph-0.1.0/CONTRIBUTING.md +249 -0
  5. flowglyph-0.1.0/LICENSE +201 -0
  6. flowglyph-0.1.0/Makefile +42 -0
  7. flowglyph-0.1.0/NOTICE +29 -0
  8. flowglyph-0.1.0/PKG-INFO +401 -0
  9. flowglyph-0.1.0/README.md +349 -0
  10. flowglyph-0.1.0/SECURITY.md +23 -0
  11. flowglyph-0.1.0/docs/adr/0001-automation-ir.md +41 -0
  12. flowglyph-0.1.0/docs/adr/0002-python.md +26 -0
  13. flowglyph-0.1.0/docs/adr/0003-apache-2.0.md +22 -0
  14. flowglyph-0.1.0/docs/adr/0004-skipped-steps.md +34 -0
  15. flowglyph-0.1.0/docs/adr/0005-typed-capability-facts-and-views.md +42 -0
  16. flowglyph-0.1.0/docs/adr/0006-sap-odata-adapter.md +52 -0
  17. flowglyph-0.1.0/docs/adr/0007-sap-cloud-integration-adapter.md +53 -0
  18. flowglyph-0.1.0/docs/adr/0008-sources-folders-files-and-git.md +40 -0
  19. flowglyph-0.1.0/docs/adr/0009-llm-wiki.md +44 -0
  20. flowglyph-0.1.0/docs/adr/0010-provider-neutral-planner.md +44 -0
  21. flowglyph-0.1.0/docs/adr/0011-executors-and-connections.md +59 -0
  22. flowglyph-0.1.0/docs/adr/0012-process-engine-adapters.md +56 -0
  23. flowglyph-0.1.0/docs/adr/0013-compilers.md +49 -0
  24. flowglyph-0.1.0/docs/adr/0014-llm-enrichment.md +47 -0
  25. flowglyph-0.1.0/docs/adr/0015-context-for-coding-agents.md +57 -0
  26. flowglyph-0.1.0/docs/adr/README.md +25 -0
  27. flowglyph-0.1.0/docs/architecture.md +154 -0
  28. flowglyph-0.1.0/docs/assets/pipeline-dark.svg +3 -0
  29. flowglyph-0.1.0/docs/assets/pipeline-light.svg +3 -0
  30. flowglyph-0.1.0/docs/assets/pipeline.excalidraw +2484 -0
  31. flowglyph-0.1.0/docs/assets/token-flow-dark.svg +2 -0
  32. flowglyph-0.1.0/docs/assets/token-flow-light.svg +2 -0
  33. flowglyph-0.1.0/docs/assets/token-flow.excalidraw +1015 -0
  34. flowglyph-0.1.0/docs/glossary.md +197 -0
  35. flowglyph-0.1.0/docs/guide.md +364 -0
  36. flowglyph-0.1.0/docs/ir-spec.md +192 -0
  37. flowglyph-0.1.0/docs/releasing.md +36 -0
  38. flowglyph-0.1.0/docs/research/deep-research-2026-11.md +741 -0
  39. flowglyph-0.1.0/docs/use-cases/01-retry-safety-audit.md +87 -0
  40. flowglyph-0.1.0/docs/use-cases/02-llm-wiki.md +80 -0
  41. flowglyph-0.1.0/docs/use-cases/03-coding-agent-context.md +83 -0
  42. flowglyph-0.1.0/docs/use-cases/04-safe-agent-gateway.md +83 -0
  43. flowglyph-0.1.0/docs/use-cases/05-design-from-the-clients-document.md +73 -0
  44. flowglyph-0.1.0/docs/use-cases/06-bpmn-and-xaml.md +66 -0
  45. flowglyph-0.1.0/docs/use-cases/README.md +21 -0
  46. flowglyph-0.1.0/examples/invoice-processing/README.md +42 -0
  47. flowglyph-0.1.0/examples/invoice-processing/catalog/INDEX.md +42 -0
  48. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_createInvoice.md +136 -0
  49. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_deleteInvoice.md +51 -0
  50. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_executePayment.md +71 -0
  51. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_getInvoice.md +101 -0
  52. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_listInvoices.md +115 -0
  53. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_patch_invoices_invoiceId.md +58 -0
  54. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/openapi_Payments_API_replaceInvoice.md +81 -0
  55. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_Invoices_Main.md +91 -0
  56. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_Invoices_Steps_BookInvoice.md +70 -0
  57. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_Invoices_Steps_RequestApproval.md +60 -0
  58. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_Invoices_Steps_ValidateVendor.md +66 -0
  59. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_AddQueueItem.md +58 -0
  60. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_Assign.md +66 -0
  61. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_If.md +62 -0
  62. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_InvokeWorkflowFile.md +60 -0
  63. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_LogMessage.md +66 -0
  64. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_SendMail.md +66 -0
  65. flowglyph-0.1.0/examples/invoice-processing/catalog/capabilities/uipath_activity_Sequence.md +49 -0
  66. flowglyph-0.1.0/examples/invoice-processing/catalog/catalog.jsonl +18 -0
  67. flowglyph-0.1.0/examples/invoice-processing/catalog/flowglyph.lock +570 -0
  68. flowglyph-0.1.0/examples/invoice-processing/catalog/graph.json +128 -0
  69. flowglyph-0.1.0/examples/invoice-processing/policy.yaml +8 -0
  70. flowglyph-0.1.0/examples/invoice-processing/requirements.md +8 -0
  71. flowglyph-0.1.0/examples/sap-integration/.gitignore +3 -0
  72. flowglyph-0.1.0/examples/sap-integration/README.md +170 -0
  73. flowglyph-0.1.0/examples/sap-integration/catalog/INDEX.md +26 -0
  74. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap-cpi_Nightly_Stock_Report.md +54 -0
  75. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap-cpi_Notify_Customer.md +66 -0
  76. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap-cpi_Orders_Inbound.md +79 -0
  77. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_GetDuplicateCandidates.md +118 -0
  78. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_Release.md +116 -0
  79. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_SupplierInvoice_create.md +158 -0
  80. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_SupplierInvoice_query.md +132 -0
  81. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_SupplierInvoice_read.md +127 -0
  82. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_SupplierInvoice_update.md +111 -0
  83. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_Supplier_query.md +98 -0
  84. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_ZSUPPLIER_INVOICE_SRV_Supplier_read.md +78 -0
  85. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_BusinessPartner_block.md +92 -0
  86. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_BusinessPartner_create.md +114 -0
  87. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_BusinessPartner_query.md +104 -0
  88. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_BusinessPartner_read.md +85 -0
  89. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_BusinessPartner_update.md +80 -0
  90. flowglyph-0.1.0/examples/sap-integration/catalog/capabilities/sap_zbusinesspartner_checkDuplicates.md +87 -0
  91. flowglyph-0.1.0/examples/sap-integration/catalog/catalog.jsonl +17 -0
  92. flowglyph-0.1.0/examples/sap-integration/catalog/flowglyph.lock +1146 -0
  93. flowglyph-0.1.0/examples/sap-integration/catalog/graph.json +103 -0
  94. flowglyph-0.1.0/examples/sap-integration/demo_gateway.py +34 -0
  95. flowglyph-0.1.0/examples/sap-integration/overrides.yaml +20 -0
  96. flowglyph-0.1.0/examples/sap-integration/policy.yaml +11 -0
  97. flowglyph-0.1.0/examples/sap-integration/sources/integration/nightly-report/META-INF/MANIFEST.MF +5 -0
  98. flowglyph-0.1.0/examples/sap-integration/sources/integration/nightly-report/src/main/resources/scenarioflows/integrationflow/Nightly_Stock_Report.iflw +31 -0
  99. flowglyph-0.1.0/examples/sap-integration/sources/integration/notify/META-INF/MANIFEST.MF +5 -0
  100. flowglyph-0.1.0/examples/sap-integration/sources/integration/notify/src/main/resources/scenarioflows/integrationflow/Notify_Customer.iflw +37 -0
  101. flowglyph-0.1.0/examples/sap-integration/sources/integration/orders/META-INF/MANIFEST.MF +7 -0
  102. flowglyph-0.1.0/examples/sap-integration/sources/integration/orders/src/main/resources/parameters.prop +3 -0
  103. flowglyph-0.1.0/examples/sap-integration/sources/integration/orders/src/main/resources/scenarioflows/integrationflow/Orders_Inbound.iflw +89 -0
  104. flowglyph-0.1.0/examples/sap-integration/sources/odata/ZSUPPLIER_INVOICE_SRV.edmx +43 -0
  105. flowglyph-0.1.0/examples/sap-integration/sources/odata/zbusinesspartner_v4.xml +46 -0
  106. flowglyph-0.1.0/examples/uipath-reframework/.gitignore +5 -0
  107. flowglyph-0.1.0/examples/uipath-reframework/README.md +268 -0
  108. flowglyph-0.1.0/examples/uipath-reframework/add-kill-process.patch +10 -0
  109. flowglyph-0.1.0/examples/uipath-reframework/catalog/INDEX.md +87 -0
  110. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_CloseAllApplications.md +46 -0
  111. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_GetAppCredentials.md +106 -0
  112. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_GetTransactionData.md +125 -0
  113. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_InitAllApplications.md +60 -0
  114. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_InitAllSettings.md +86 -0
  115. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_KillAllProcesses.md +47 -0
  116. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_SetTransactionStatus.md +178 -0
  117. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Framework_TakeScreenshot.md +82 -0
  118. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Main.md +84 -0
  119. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Process.md +74 -0
  120. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Tests_RunAllTests.md +96 -0
  121. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Tests_RunAllTests_Logging.md +153 -0
  122. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_ReFrameWork_Tests_TestWorkflowTemplate.md +48 -0
  123. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_AddCredential.md +92 -0
  124. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_AddDataColumn.md +116 -0
  125. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_AddLogFields.md +63 -0
  126. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_AppendLine.md +69 -0
  127. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Assign.md +93 -0
  128. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Comment.md +58 -0
  129. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_CreateDirectory.md +67 -0
  130. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_CreateFile.md +75 -0
  131. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ExcelApplicationScope.md +75 -0
  132. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ExcelReadRange.md +83 -0
  133. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ExcelWriteRange.md +82 -0
  134. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_FlowDecision.md +78 -0
  135. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Flowchart.md +59 -0
  136. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ForEach.md +70 -0
  137. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ForEachRow.md +71 -0
  138. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_GetQueueItem.md +87 -0
  139. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_GetRobotAsset.md +75 -0
  140. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_GetRobotCredential.md +85 -0
  141. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_GetSecureCredential.md +100 -0
  142. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_If.md +90 -0
  143. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_InvokeMethod.md +67 -0
  144. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_InvokeWorkflowFile.md +95 -0
  145. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_LogMessage.md +77 -0
  146. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_OpenApplication.md +117 -0
  147. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ReadRange.md +93 -0
  148. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_RemoveLogFields.md +60 -0
  149. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_RequestCredential.md +92 -0
  150. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_SaveImage.md +66 -0
  151. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Sequence.md +78 -0
  152. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_SetTransactionStatus.md +120 -0
  153. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_ShouldStop.md +58 -0
  154. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_State.md +77 -0
  155. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_StateMachine.md +71 -0
  156. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Switch.md +58 -0
  157. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_TakeScreenshot.md +74 -0
  158. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Throw.md +57 -0
  159. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_Transition.md +80 -0
  160. flowglyph-0.1.0/examples/uipath-reframework/catalog/capabilities/uipath_activity_TryCatch.md +97 -0
  161. flowglyph-0.1.0/examples/uipath-reframework/catalog/catalog.jsonl +51 -0
  162. flowglyph-0.1.0/examples/uipath-reframework/catalog/flowglyph.lock +1486 -0
  163. flowglyph-0.1.0/examples/uipath-reframework/catalog/graph.json +809 -0
  164. flowglyph-0.1.0/examples/uipath-reframework/demo_gateway.py +43 -0
  165. flowglyph-0.1.0/examples/uipath-reframework/overrides.yaml +21 -0
  166. flowglyph-0.1.0/examples/uipath-reframework/policy.yaml +8 -0
  167. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/CloseAllApplications.xaml +76 -0
  168. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/GetAppCredentials.xaml +244 -0
  169. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/GetTransactionData.xaml +149 -0
  170. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/InitAllApplications.xaml +86 -0
  171. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/InitAllSettings.xaml +303 -0
  172. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/KillAllProcesses.xaml +76 -0
  173. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/SetTransactionStatus.xaml +785 -0
  174. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Framework/TakeScreenshot.xaml +143 -0
  175. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/LICENSE +9 -0
  176. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Main.xaml +723 -0
  177. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Process.xaml +82 -0
  178. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Tests/RunAllTests.xaml +332 -0
  179. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Tests/RunAllTests_Logging.xaml +202 -0
  180. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/Tests/TestWorkflowTemplate.xaml +84 -0
  181. flowglyph-0.1.0/examples/uipath-reframework/sources/ReFrameWork/project.json +12 -0
  182. flowglyph-0.1.0/pyproject.toml +145 -0
  183. flowglyph-0.1.0/schemas/capability.schema.json +465 -0
  184. flowglyph-0.1.0/schemas/workflow.schema.json +157 -0
  185. flowglyph-0.1.0/scripts/build_examples.py +62 -0
  186. flowglyph-0.1.0/src/flowglyph/__init__.py +70 -0
  187. flowglyph-0.1.0/src/flowglyph/__main__.py +5 -0
  188. flowglyph-0.1.0/src/flowglyph/_internal/__init__.py +1 -0
  189. flowglyph-0.1.0/src/flowglyph/_internal/archives.py +44 -0
  190. flowglyph-0.1.0/src/flowglyph/_internal/graph.py +45 -0
  191. flowglyph-0.1.0/src/flowglyph/_internal/hashing.py +16 -0
  192. flowglyph-0.1.0/src/flowglyph/_internal/markdown.py +209 -0
  193. flowglyph-0.1.0/src/flowglyph/_internal/paths.py +20 -0
  194. flowglyph-0.1.0/src/flowglyph/_internal/search.py +67 -0
  195. flowglyph-0.1.0/src/flowglyph/_internal/text.py +42 -0
  196. flowglyph-0.1.0/src/flowglyph/_internal/xml.py +47 -0
  197. flowglyph-0.1.0/src/flowglyph/adapters/__init__.py +123 -0
  198. flowglyph-0.1.0/src/flowglyph/adapters/bpmn/__init__.py +226 -0
  199. flowglyph-0.1.0/src/flowglyph/adapters/bpmn/graph.py +85 -0
  200. flowglyph-0.1.0/src/flowglyph/adapters/bpmn/model.py +277 -0
  201. flowglyph-0.1.0/src/flowglyph/adapters/bpmn/rules.py +78 -0
  202. flowglyph-0.1.0/src/flowglyph/adapters/n8n/__init__.py +410 -0
  203. flowglyph-0.1.0/src/flowglyph/adapters/n8n/nodes.py +104 -0
  204. flowglyph-0.1.0/src/flowglyph/adapters/openapi/__init__.py +305 -0
  205. flowglyph-0.1.0/src/flowglyph/adapters/openapi/refs.py +69 -0
  206. flowglyph-0.1.0/src/flowglyph/adapters/sap/__init__.py +367 -0
  207. flowglyph-0.1.0/src/flowglyph/adapters/sap/edmx.py +295 -0
  208. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/__init__.py +219 -0
  209. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/bundle.py +99 -0
  210. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/discovery.py +40 -0
  211. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/graph.py +105 -0
  212. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/iflow.py +221 -0
  213. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/linking.py +102 -0
  214. flowglyph-0.1.0/src/flowglyph/adapters/sap_cpi/rules.py +184 -0
  215. flowglyph-0.1.0/src/flowglyph/adapters/sbpa/__init__.py +375 -0
  216. flowglyph-0.1.0/src/flowglyph/adapters/sbpa/package.py +139 -0
  217. flowglyph-0.1.0/src/flowglyph/adapters/uipath/__init__.py +253 -0
  218. flowglyph-0.1.0/src/flowglyph/adapters/uipath/graph.py +255 -0
  219. flowglyph-0.1.0/src/flowglyph/adapters/uipath/parser.py +244 -0
  220. flowglyph-0.1.0/src/flowglyph/adapters/uipath/project.py +76 -0
  221. flowglyph-0.1.0/src/flowglyph/adapters/uipath/taxonomy.py +113 -0
  222. flowglyph-0.1.0/src/flowglyph/adapters/uipath/taxonomy.yaml +142 -0
  223. flowglyph-0.1.0/src/flowglyph/adapters/uipath/template.py +94 -0
  224. flowglyph-0.1.0/src/flowglyph/adapters/uipath/xaml.py +148 -0
  225. flowglyph-0.1.0/src/flowglyph/catalog/__init__.py +25 -0
  226. flowglyph-0.1.0/src/flowglyph/catalog/extraction.py +108 -0
  227. flowglyph-0.1.0/src/flowglyph/catalog/lock.py +163 -0
  228. flowglyph-0.1.0/src/flowglyph/catalog/model.py +205 -0
  229. flowglyph-0.1.0/src/flowglyph/catalog/overrides.py +54 -0
  230. flowglyph-0.1.0/src/flowglyph/catalog/versioning.py +151 -0
  231. flowglyph-0.1.0/src/flowglyph/cli/__init__.py +14 -0
  232. flowglyph-0.1.0/src/flowglyph/cli/_shared.py +109 -0
  233. flowglyph-0.1.0/src/flowglyph/cli/commands/__init__.py +1 -0
  234. flowglyph-0.1.0/src/flowglyph/cli/commands/catalog.py +130 -0
  235. flowglyph-0.1.0/src/flowglyph/cli/commands/compile.py +72 -0
  236. flowglyph-0.1.0/src/flowglyph/cli/commands/context.py +64 -0
  237. flowglyph-0.1.0/src/flowglyph/cli/commands/enrich.py +76 -0
  238. flowglyph-0.1.0/src/flowglyph/cli/commands/explore.py +172 -0
  239. flowglyph-0.1.0/src/flowglyph/cli/commands/gateway.py +143 -0
  240. flowglyph-0.1.0/src/flowglyph/cli/commands/plan.py +77 -0
  241. flowglyph-0.1.0/src/flowglyph/cli/commands/skill.py +24 -0
  242. flowglyph-0.1.0/src/flowglyph/cli/commands/wiki.py +76 -0
  243. flowglyph-0.1.0/src/flowglyph/cli/main.py +62 -0
  244. flowglyph-0.1.0/src/flowglyph/compilers/__init__.py +87 -0
  245. flowglyph-0.1.0/src/flowglyph/compilers/_layout.py +77 -0
  246. flowglyph-0.1.0/src/flowglyph/compilers/bpmn.py +257 -0
  247. flowglyph-0.1.0/src/flowglyph/compilers/xaml.py +300 -0
  248. flowglyph-0.1.0/src/flowglyph/context.py +495 -0
  249. flowglyph-0.1.0/src/flowglyph/enrichment.py +268 -0
  250. flowglyph-0.1.0/src/flowglyph/errors.py +29 -0
  251. flowglyph-0.1.0/src/flowglyph/gateway/__init__.py +31 -0
  252. flowglyph-0.1.0/src/flowglyph/gateway/audit.py +29 -0
  253. flowglyph-0.1.0/src/flowglyph/gateway/executors/__init__.py +62 -0
  254. flowglyph-0.1.0/src/flowglyph/gateway/executors/_http.py +133 -0
  255. flowglyph-0.1.0/src/flowglyph/gateway/executors/auth.py +144 -0
  256. flowglyph-0.1.0/src/flowglyph/gateway/executors/connections.py +203 -0
  257. flowglyph-0.1.0/src/flowglyph/gateway/executors/http.py +100 -0
  258. flowglyph-0.1.0/src/flowglyph/gateway/executors/odata.py +288 -0
  259. flowglyph-0.1.0/src/flowglyph/gateway/executors/orchestrator.py +156 -0
  260. flowglyph-0.1.0/src/flowglyph/gateway/ledger.py +186 -0
  261. flowglyph-0.1.0/src/flowglyph/gateway/policy.py +80 -0
  262. flowglyph-0.1.0/src/flowglyph/gateway/server.py +297 -0
  263. flowglyph-0.1.0/src/flowglyph/gateway/service.py +307 -0
  264. flowglyph-0.1.0/src/flowglyph/ir.py +312 -0
  265. flowglyph-0.1.0/src/flowglyph/planner/__init__.py +111 -0
  266. flowglyph-0.1.0/src/flowglyph/planner/backends.py +77 -0
  267. flowglyph-0.1.0/src/flowglyph/planner/claude.py +98 -0
  268. flowglyph-0.1.0/src/flowglyph/planner/claude_code.py +31 -0
  269. flowglyph-0.1.0/src/flowglyph/planner/command.py +258 -0
  270. flowglyph-0.1.0/src/flowglyph/planner/documents.py +191 -0
  271. flowglyph-0.1.0/src/flowglyph/planner/model.py +93 -0
  272. flowglyph-0.1.0/src/flowglyph/planner/openai_compatible.py +125 -0
  273. flowglyph-0.1.0/src/flowglyph/planner/prompt.py +38 -0
  274. flowglyph-0.1.0/src/flowglyph/planner/resolver.py +299 -0
  275. flowglyph-0.1.0/src/flowglyph/py.typed +0 -0
  276. flowglyph-0.1.0/src/flowglyph/report.py +139 -0
  277. flowglyph-0.1.0/src/flowglyph/skill/SKILL.md +72 -0
  278. flowglyph-0.1.0/src/flowglyph/skill/__init__.py +1 -0
  279. flowglyph-0.1.0/src/flowglyph/sources.py +129 -0
  280. flowglyph-0.1.0/src/flowglyph/views.py +56 -0
  281. flowglyph-0.1.0/src/flowglyph/wiki.py +443 -0
  282. flowglyph-0.1.0/tests/conftest.py +57 -0
  283. flowglyph-0.1.0/tests/e2e/conftest.py +4 -0
  284. flowglyph-0.1.0/tests/e2e/test_cli.py +356 -0
  285. flowglyph-0.1.0/tests/e2e/test_examples.py +88 -0
  286. flowglyph-0.1.0/tests/e2e/test_mcp_gateway.py +163 -0
  287. flowglyph-0.1.0/tests/eval/test_planner_eval.py +99 -0
  288. flowglyph-0.1.0/tests/fixtures/bpmn/camunda-examples/LICENSE +177 -0
  289. flowglyph-0.1.0/tests/fixtures/bpmn/camunda-examples/order-handling.bpmn +138 -0
  290. flowglyph-0.1.0/tests/fixtures/bpmn/invoices/document-archiving.bpmn +34 -0
  291. flowglyph-0.1.0/tests/fixtures/bpmn/invoices/invoice-approval.bpmn +66 -0
  292. flowglyph-0.1.0/tests/fixtures/n8n/invoice-intake.json +63 -0
  293. flowglyph-0.1.0/tests/fixtures/n8n/nightly-report.json +32 -0
  294. flowglyph-0.1.0/tests/fixtures/n8n/notify-customer.json +25 -0
  295. flowglyph-0.1.0/tests/fixtures/openapi/inventory.json +13 -0
  296. flowglyph-0.1.0/tests/fixtures/openapi/notes.yaml +2 -0
  297. flowglyph-0.1.0/tests/fixtures/openapi/payments.yaml +154 -0
  298. flowglyph-0.1.0/tests/fixtures/planned/invoice-intake.ir.yaml +145 -0
  299. flowglyph-0.1.0/tests/fixtures/reframework/Framework/CloseAllApplications.xaml +76 -0
  300. flowglyph-0.1.0/tests/fixtures/reframework/Framework/GetAppCredentials.xaml +244 -0
  301. flowglyph-0.1.0/tests/fixtures/reframework/Framework/GetTransactionData.xaml +149 -0
  302. flowglyph-0.1.0/tests/fixtures/reframework/Framework/InitAllApplications.xaml +86 -0
  303. flowglyph-0.1.0/tests/fixtures/reframework/Framework/InitAllSettings.xaml +303 -0
  304. flowglyph-0.1.0/tests/fixtures/reframework/Framework/KillAllProcesses.xaml +76 -0
  305. flowglyph-0.1.0/tests/fixtures/reframework/Framework/SetTransactionStatus.xaml +785 -0
  306. flowglyph-0.1.0/tests/fixtures/reframework/Framework/TakeScreenshot.xaml +143 -0
  307. flowglyph-0.1.0/tests/fixtures/reframework/LICENSE +9 -0
  308. flowglyph-0.1.0/tests/fixtures/reframework/Main.xaml +723 -0
  309. flowglyph-0.1.0/tests/fixtures/reframework/Process.xaml +82 -0
  310. flowglyph-0.1.0/tests/fixtures/reframework/Tests/RunAllTests.xaml +332 -0
  311. flowglyph-0.1.0/tests/fixtures/reframework/Tests/RunAllTests_Logging.xaml +202 -0
  312. flowglyph-0.1.0/tests/fixtures/reframework/Tests/TestWorkflowTemplate.xaml +84 -0
  313. flowglyph-0.1.0/tests/fixtures/reframework/project.json +12 -0
  314. flowglyph-0.1.0/tests/fixtures/sap/ZSUPPLIER_INVOICE_SRV.edmx +43 -0
  315. flowglyph-0.1.0/tests/fixtures/sap/zbusinesspartner_v4.xml +46 -0
  316. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step0.zip +0 -0
  317. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step1.zip +0 -0
  318. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step2.zip +0 -0
  319. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step3.zip +0 -0
  320. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step4.zip +0 -0
  321. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/AribaProcure_Step5.zip +0 -0
  322. flowglyph-0.1.0/tests/fixtures/sap-cpi/btp-spend-analysis/LICENSE +201 -0
  323. flowglyph-0.1.0/tests/fixtures/sap-cpi/nightly-report/META-INF/MANIFEST.MF +5 -0
  324. flowglyph-0.1.0/tests/fixtures/sap-cpi/nightly-report/src/main/resources/scenarioflows/integrationflow/Nightly_Stock_Report.iflw +31 -0
  325. flowglyph-0.1.0/tests/fixtures/sap-cpi/notify/META-INF/MANIFEST.MF +5 -0
  326. flowglyph-0.1.0/tests/fixtures/sap-cpi/notify/src/main/resources/scenarioflows/integrationflow/Notify_Customer.iflw +37 -0
  327. flowglyph-0.1.0/tests/fixtures/sap-cpi/orders/META-INF/MANIFEST.MF +7 -0
  328. flowglyph-0.1.0/tests/fixtures/sap-cpi/orders/src/main/resources/parameters.prop +3 -0
  329. flowglyph-0.1.0/tests/fixtures/sap-cpi/orders/src/main/resources/scenarioflows/integrationflow/Orders_Inbound.iflw +89 -0
  330. flowglyph-0.1.0/tests/fixtures/sbpa/LICENSE +201 -0
  331. flowglyph-0.1.0/tests/fixtures/sbpa/invoice-approval.mtar +0 -0
  332. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Main.xaml +54 -0
  333. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Steps/Archive.xaml +11 -0
  334. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Steps/CleanUp.xaml +11 -0
  335. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Steps/Enqueue.xaml +11 -0
  336. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Steps/Report.xaml +11 -0
  337. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/Steps/SendMail.xaml +11 -0
  338. flowglyph-0.1.0/tests/fixtures/synthetic/control-flow/project.json +5 -0
  339. flowglyph-0.1.0/tests/fixtures/synthetic/doctype.xaml +3 -0
  340. flowglyph-0.1.0/tests/fixtures/synthetic/invoices/Main.xaml +24 -0
  341. flowglyph-0.1.0/tests/fixtures/synthetic/invoices/Steps/BookInvoice.xaml +12 -0
  342. flowglyph-0.1.0/tests/fixtures/synthetic/invoices/Steps/RequestApproval.xaml +11 -0
  343. flowglyph-0.1.0/tests/fixtures/synthetic/invoices/Steps/ValidateVendor.xaml +14 -0
  344. flowglyph-0.1.0/tests/fixtures/synthetic/invoices/project.json +5 -0
  345. flowglyph-0.1.0/tests/fixtures/synthetic/not-a-workflow.xaml +1 -0
  346. flowglyph-0.1.0/tests/golden/reframework/INDEX.md +87 -0
  347. flowglyph-0.1.0/tests/golden/reframework/catalog.jsonl +51 -0
  348. flowglyph-0.1.0/tests/golden/reframework/flowglyph.lock +1486 -0
  349. flowglyph-0.1.0/tests/golden/reframework/graph.json +809 -0
  350. flowglyph-0.1.0/tests/golden/reframework/taxonomy.txt +38 -0
  351. flowglyph-0.1.0/tests/golden/test_reframework.py +31 -0
  352. flowglyph-0.1.0/tests/unit/test_architecture.py +71 -0
  353. flowglyph-0.1.0/tests/unit/test_bpmn_adapter.py +89 -0
  354. flowglyph-0.1.0/tests/unit/test_catalog.py +183 -0
  355. flowglyph-0.1.0/tests/unit/test_compilers.py +208 -0
  356. flowglyph-0.1.0/tests/unit/test_context.py +95 -0
  357. flowglyph-0.1.0/tests/unit/test_contributing_guide.py +56 -0
  358. flowglyph-0.1.0/tests/unit/test_documents.py +160 -0
  359. flowglyph-0.1.0/tests/unit/test_enrichment.py +158 -0
  360. flowglyph-0.1.0/tests/unit/test_executors.py +577 -0
  361. flowglyph-0.1.0/tests/unit/test_gateway.py +233 -0
  362. flowglyph-0.1.0/tests/unit/test_graph.py +38 -0
  363. flowglyph-0.1.0/tests/unit/test_guide.py +55 -0
  364. flowglyph-0.1.0/tests/unit/test_ir.py +113 -0
  365. flowglyph-0.1.0/tests/unit/test_ledger.py +106 -0
  366. flowglyph-0.1.0/tests/unit/test_n8n_adapter.py +133 -0
  367. flowglyph-0.1.0/tests/unit/test_openapi_adapter.py +132 -0
  368. flowglyph-0.1.0/tests/unit/test_planner.py +372 -0
  369. flowglyph-0.1.0/tests/unit/test_planner_backends.py +261 -0
  370. flowglyph-0.1.0/tests/unit/test_planner_claude_code.py +133 -0
  371. flowglyph-0.1.0/tests/unit/test_policy.py +62 -0
  372. flowglyph-0.1.0/tests/unit/test_portability.py +31 -0
  373. flowglyph-0.1.0/tests/unit/test_report.py +57 -0
  374. flowglyph-0.1.0/tests/unit/test_sap_adapter.py +149 -0
  375. flowglyph-0.1.0/tests/unit/test_sap_cpi_adapter.py +199 -0
  376. flowglyph-0.1.0/tests/unit/test_sbpa_adapter.py +81 -0
  377. flowglyph-0.1.0/tests/unit/test_search.py +41 -0
  378. flowglyph-0.1.0/tests/unit/test_skill.py +49 -0
  379. flowglyph-0.1.0/tests/unit/test_sources.py +155 -0
  380. flowglyph-0.1.0/tests/unit/test_taxonomy.py +92 -0
  381. flowglyph-0.1.0/tests/unit/test_uipath_adapter.py +152 -0
  382. flowglyph-0.1.0/tests/unit/test_versioning.py +141 -0
  383. flowglyph-0.1.0/tests/unit/test_wiki.py +104 -0
  384. flowglyph-0.1.0/tests/unit/test_xaml.py +45 -0
@@ -0,0 +1,17 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ .coverage
8
+ coverage.xml
9
+ htmlcov/
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .flowglyph/
13
+ *.ledger.sqlite
14
+ node_modules/
15
+ scripts/dist/
16
+ .DS_Store
17
+ examples/*/out/
@@ -0,0 +1,252 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ Nothing yet.
11
+
12
+ ## [0.1.0] - 2026-11-07
13
+
14
+ The first release.
15
+
16
+ ### Added
17
+
18
+ - `HOWTO.md`: every tool, what it does and how to use it, checked against the CLI by the
19
+ test suite.
20
+ - An animated walkthrough (`docs/assets/walkthrough.gif` and `.mp4`): the six things FlowGlyph
21
+ does, each introduced on its own and shown on one folder, plus one short clip per use case on
22
+ its page in `docs/use-cases/`. Rendered frame by frame from `scripts/walkthrough/` by
23
+ `make walkthrough`; every line it shows is real output.
24
+ - README: the handover folder of a client taken to a new robot in six commands, with the real
25
+ output of each; `docs/use-cases/`: the same six as stories of their own, with who each is
26
+ for and how to tell it. Their commands are checked against the CLI by the test suite.
27
+ - Automation IR (`Capability`, `Workflow`, `Effects`, `Idempotency`) with JSON Schemas.
28
+ - UiPath adapter: typed arguments with defaults and annotations, a taxonomy of activities with
29
+ tri-state effects, workflow graphs with branches, transitive effects through invocations.
30
+ - Catalog with deterministic `save`/`load_catalog`, BM25 search, L0 cards, Markdown cards and
31
+ an index, a lock file with automatic semver bumps, and `flowglyph.overrides.yaml`.
32
+ - `flowglyph` command line: `extract`, `validate`, `diff`, `inspect` and `search`.
33
+ - README with Excalidraw diagrams rendered to light and dark SVG by `make diagrams`.
34
+ - OpenAPI 3.0 and 3.1 adapter: parameters and bodies as one input schema, local `$ref`
35
+ resolution with recursion cut-off, effects and idempotency from HTTP semantics and
36
+ `Idempotency-Key` headers, OAuth scopes and error responses.
37
+ - MCP gateway (`flowglyph serve`): L0/L1/L2 discovery tools, one tool per capability or
38
+ search-only exposure, JSON Schema validation, YAML policies with allow, deny and approval,
39
+ an SQLite idempotency ledger with atomic claims and TTL, an audit log without argument
40
+ values, and `flowglyph approve` / `approvals` for people.
41
+ - Planner (`flowglyph plan`): BM25 shortlist, a plan proposed by Claude with structured output
42
+ and server-side refusal fallbacks, and a deterministic resolver that rejects invented
43
+ capabilities and broken references and reports missing capabilities as gaps.
44
+ - `flowglyph plan` reads the requirements from the document the process arrived in: a PDF, a
45
+ Word or Excel file, a CSV, text or Markdown, or a folder holding all of them, through the new
46
+ `flowglyph[documents]` extra (`flowglyph.planner.documents.read_requirements` from Python).
47
+ - The planner works with any provider. `--via` selects the Anthropic API, a signed-in coding
48
+ assistant run headless (`claude-code`, `codex`, `gemini`, `cursor`, or any tool described with
49
+ a `CommandSpec`), any OpenAI-compatible server (OpenAI, Ollama, vLLM, LM Studio, OpenRouter)
50
+ through the standard library, or a plugin registered under `flowglyph.planners`. Plans use a
51
+ strict JSON Schema that all of them accept.
52
+ - SAP adapter (`--adapter sap`): reads OData V2 and V4 `$metadata` (EDMX) from SAP S/4HANA,
53
+ SAP Gateway or SAP BTP. One capability per operation the service allows, honouring
54
+ `sap:creatable`/`updatable`/`deletable` and the V4 Capabilities vocabulary, with typed keys and
55
+ bodies, SAP labels as descriptions, function imports, functions and bound actions.
56
+ - Extraction from whole trees and git repositories: `flowglyph extract <folder|file|git URL>`
57
+ reads every project and document it finds, records the origin and commit in the lock, and
58
+ `--adapter` limits it to one source type.
59
+ - `flowglyph idempotency`: the catalog and nothing else, one row per function with its effects,
60
+ idempotency and a status (`safe`, `keyed`, `declared`, `review`, `n/a`), filterable by kind, provider,
61
+ side effects or pending review, as a table, Markdown, CSV or JSON. Also `flowglyph.report`.
62
+ - `flowglyph adapters` lists the source formats available, plugins included.
63
+ - `flowglyph wiki build` and `wiki lint`: an LLM wiki of the catalog in the shape of Karpathy's
64
+ "LLM Wiki". Generated pages per capability, category and source with backlinks, an index, an
65
+ overview, an append-only log of ingests and lint passes, an `AGENTS.md` schema for the LLM that
66
+ maintains it, and Notes sections that survive every rebuild. Lint reports idempotency to
67
+ review, invocations outside the sources, orphan workflows, broken links and retired pages.
68
+ - The UiPath taxonomy covers cloud, infrastructure, directory and SaaS connector packages (Azure,
69
+ AWS, Google Cloud, Citrix, Hyper-V, VMware, Active Directory, Jira...) and derives effects from
70
+ the verb in an activity's name (`Get`, `Create`, `Set`, `Delete`, `...Scope`) where the category
71
+ alone cannot tell. On UiPath's IT automation solutions, unclassified activities drop from 118
72
+ to 1 of 172.
73
+ - Repository URLs that point at a folder download only that folder (sparse checkout), and the
74
+ checkout is named after the repository.
75
+ - Services or APIs published twice in one source, such as the same SAP service as OData V2 and
76
+ V4, keep separate ids. SAP metadata that uses the `sap:` prefix without declaring it is read.
77
+ - SAP Cloud Integration adapter (`--adapter sap-cpi`): iFlows exported as `.zip` (read in
78
+ memory, with size and compression limits) or unpacked. One capability per endpoint, effects from
79
+ receivers and steps, ProcessDirect calls resolved across iFlows (from steps, message end events,
80
+ local processes and exception subprocesses), idempotency declared by the iFlow itself, and a
81
+ design review whose findings reach `wiki lint`. Parameter values are never read.
82
+ - `wiki lint` lists the notes adapters attach to capabilities.
83
+ - `examples/sap-integration`: OData services and Cloud Integration iFlows taken through the
84
+ report, overrides, the wiki and the gateway, with real output. `make examples` regenerates the
85
+ committed example catalogs, and a test fails when they are out of date.
86
+ - Executors (ADR-0011): `flowglyph serve --connections flowglyph.connections.yaml` runs
87
+ capabilities for real instead of dry-running them. An `http` connection calls OpenAPI
88
+ operations, placing each argument in the path, query, headers, cookies or body; an `odata`
89
+ connection calls SAP OData V2 and V4 services with CSRF handling, OData literals and SAP error
90
+ messages; a `uipath` connection starts the published process of a UiPath project as an
91
+ Orchestrator job and waits for its output arguments. Authentication: none, bearer, basic, a
92
+ header, or OAuth client credentials, with every secret read from a named environment variable.
93
+ Redirects are never followed and only `http(s)` URLs are called.
94
+ - BPMN adapter (`--adapter bpmn`, ADR-0012): BPMN 2.0 processes with Camunda 7 (forms, external
95
+ task topics, classes, expressions, decision references) and Camunda 8 (job types, called
96
+ processes) extensions. Start forms become typed inputs, gateways keep their conditions and
97
+ default flows, boundary events become labelled edges, call activities link processes across
98
+ files, and missing implementations and default flows are reported.
99
+ - n8n adapter (`--adapter n8n`): workflows exported one per file or as a list. Webhooks become
100
+ callable `POST /webhook/...` capabilities, sub-workflows keep their declared inputs, schedules
101
+ their cron expression, `Execute Workflow` nodes link workflows by id, name or file, effects come
102
+ from each node's method or operation, and credentials are recorded by name.
103
+ - SAP Build Process Automation adapter (`--adapter sbpa`): `.mtar` exports and unpacked projects.
104
+ Processes take their inputs from the start form's schema and invoke their automations and
105
+ decisions in the graph, with SAP's own branch conditions; automations and decisions are
106
+ capabilities of their own. Archives are read in memory with size and compression limits,
107
+ shared with the SAP Cloud Integration adapter.
108
+ - Compilers (`flowglyph compile`, ADR-0013): any workflow graph, planned or extracted, compiles
109
+ into BPMN 2.0 with a diagram, plain or with the Camunda 7 (external task topics) or Camunda 8
110
+ (job types) extensions an engine needs, or into a UiPath Studio workflow: a Sequence for a
111
+ straight line, a Flowchart of FlowSteps and FlowDecisions when it branches, Invoke Workflow
112
+ File for UiPath workflows with their arguments listed, and a Comment for anything else. What
113
+ cannot be carried over exactly, such as conditions in another expression language, is
114
+ reported. Compiled BPMN reads back through the BPMN adapter into the same graph.
115
+ - Enrichment (`flowglyph enrich`, ADR-0014): a model describes capabilities whose source left
116
+ no description, only a placeholder or the adapter's boilerplate, and gives every capability
117
+ its business verb, entity and domain. It works through any planner backend, sees only what the
118
+ catalog knows (never sources or configuration), and answers for unknown ids are dropped.
119
+ Answers are cached in `flowglyph.enrichment.json` by source hash and reapplied by `extract`
120
+ before versioning, so reruns change nothing. IR 0.4.0 adds `Capability.generated`, the fields
121
+ a model wrote; cards say so. Idempotency is never enriched.
122
+ - Context for coding agents (`flowglyph context`, ADR-0015): per UiPath project, an `AGENTS.md`
123
+ and `.claude/rules/project-context.md` in the sections UiPath's own discovery agent uses, but
124
+ read from the sources rather than written by a model, plus what no model can tell by reading:
125
+ effects, retry safety and the call tree. One activity card per activity type, with a XAML
126
+ template from the project's richest use of it: settings kept, values as `[placeholders]`, the
127
+ namespaces to declare. Notes are kept on every run, and files FlowGlyph did not write are not
128
+ replaced without `--force`.
129
+ - The UiPath adapter records that template on each activity type (`x-xaml-template`); it is
130
+ documentation, so it never moves a version.
131
+ - An Agent Skill (`flowglyph skill`) teaches coding agents when and how to use FlowGlyph, and
132
+ the repository is a plugin for Claude Code, Codex, Cursor and Gemini CLI.
133
+ - `docs/guide.md`: how to use every feature, in the order you would use them, with samples to
134
+ follow from a clone. A test checks that every command and option it shows exists.
135
+ - Every planner backend can now answer with any pydantic model (`StructuredModel.answer`), not
136
+ only a plan, so new uses of a model need no new backend.
137
+ - `flowglyph.extract(..., refine=...)` applies a step after overrides and before versioning.
138
+ - `examples/uipath-reframework`: UiPath's ReFrameWork template through the call tree, the
139
+ idempotency report, overrides, a change made in Studio and its versions, the wiki and the
140
+ gateway, with real output.
141
+ - Documentation: an architecture guide by bounded context, a glossary, decision records 0005 to
142
+ 0010, and guides with tested examples for writing an adapter or a planner backend.
143
+
144
+ ### Changed
145
+
146
+ - The idempotency report shows `pure` for a capability without effects, as `inspect`, the wiki
147
+ and the context files do; `none` is only ever an idempotency mode.
148
+ - The `Else` of an `If` is guarded by `otherwise`, like a BPMN default flow, instead of
149
+ `not (<condition>)`; `Workflow.simulate` takes an `otherwise` edge when no other condition
150
+ of its source holds.
151
+ - Lock files record the shape of every parameter (types, required, nested properties and
152
+ items) and leave defaults out, so the format changed; catalogs are re-versioned from 1.0.0
153
+ on the next `extract`.
154
+ - `flowglyph` also exports `Parameter`, `Semantics`, `Security`, `Source`, `Extraction`,
155
+ `Diagnostic`, `Change`, `Bump` and `export_json_schemas`, everything needed to build a
156
+ capability or read what changed.
157
+ - IR 0.3.0 (ADR-0005): `Capability` gains typed `trigger`, `entry_point`, `configuration`,
158
+ `used_in` and `deprecated` fields instead of prefixed strings in `tags`. Presentation moves out
159
+ of the IR into `flowglyph.views`: `effects_code`, `retry_advice` and `l0_card` replace
160
+ `Effects.code()`, `Idempotency.advice()` and `Capability.card()`.
161
+ - Marking a capability deprecated is now a minor version bump, as semver requires.
162
+ - `flowglyph.catalog` is a package (`lock`, `versioning`, `overrides`, `extraction`, `model`);
163
+ its public names are unchanged.
164
+ - The gateway applies deny rules before validating arguments, so an agent is not asked to fix
165
+ the arguments of a call it may not make.
166
+ - The command line is split into one module per context; `flowglyph.cli.main:app` is unchanged.
167
+ - IR 0.2.0: nodes have a `join` (`all` or `any`) and skipped steps propagate, so a workflow
168
+ says what runs after an optional step. `Workflow.simulate` evaluates the rules. The UiPath
169
+ adapter marks branch merges as `any`; the planner chooses a join per step and warns about
170
+ steps that would be skipped with an optional predecessor.
171
+ - Dependency floors are the oldest versions the code works with (`pydantic>=2.12`,
172
+ `pyyaml>=6.0.1`, `typer>=0.19`, `rich>=13`, `mcp>=2.1`, `jsonschema>=4.18`,
173
+ `anthropic>=2.0`) instead of the versions locked for development.
174
+ - Connections must use `https://`; a connection that sets `allow_insecure: true` may use
175
+ `http://`. Every address, OAuth token URLs included, is checked when the file is loaded.
176
+ - The ledger keeps the arguments of each run, so `flowglyph approvals` shows what a person
177
+ approves, and `flowglyph approve` records an `approve` audit event with the user's name.
178
+ Every audit record has an `actor` field, `null` when the agent acted.
179
+
180
+ ### Changed
181
+
182
+ - Pipeline diagram: LLM enrichment drawn as shipped, the planner's document inputs, and the
183
+ coding-agent context as an output with its own consumer; token-flow diagram: an L1 card is
184
+ about 400 tokens, measured.
185
+
186
+ ### Fixed
187
+
188
+ - UiPath: a `TryCatch` is now a decision whose handlers are reached `on <ExceptionType>` and
189
+ whose `Finally` follows every branch, and a `Switch` a decision with one guarded edge per
190
+ case; both were flattened into a sequence, so error handlers and exclusive cases looked like
191
+ the happy path. An `If` whose branches hold nothing is no longer kept as a decision.
192
+ - n8n, SAP Build Process Automation, BPMN and SAP Cloud Integration: two branches that met
193
+ again in a folded node kept only one condition; the walk is now shared and keeps both.
194
+ - UiPath: the annotation of a workflow's top-level activity described the activity type
195
+ (`Sequence`, `Flowchart`) instead of only the workflow.
196
+ - Versioning: an input narrowed (a type or `null` no longer accepted, a nested property
197
+ dropped), an output widened, newly nullable or no longer required, and a capability that
198
+ stops being invocable are now major changes; they were minor. Wording changes anywhere in
199
+ a schema are a patch.
200
+ - The planner accepted arguments of the wrong type: a string output bound to an integer input,
201
+ a literal `"yes"` for a boolean, a string workflow input for a number. The resolver now compares
202
+ the type of every workflow input, step output and literal with the input it feeds and reports
203
+ each mismatch as a problem. `integer` fits `number`, `null` fits a nullable input, and `any`
204
+ on either side is not checked.
205
+ - The three most likely first mistakes printed a traceback. A `--policy` file or requirements
206
+ document that does not exist, `--via anthropic` without `ANTHROPIC_API_KEY` (or an
207
+ `ant auth login` profile), and a `--via claude-code`, `codex`, `gemini` or `cursor` whose
208
+ command is not on PATH are now one `error:` line that says what to do, before anything runs.
209
+ - XML sources that declare a DTD after the first 4 KiB, for example behind a long comment, are
210
+ refused like any other DTD.
211
+ - The command line printed source text as Rich markup, so diagnostics lost expressions such as
212
+ `[in_target]`. Source text is now escaped.
213
+ - The approval command the gateway suggests includes `--state` when the gateway keeps its state
214
+ elsewhere, and quotes its arguments for the shell.
215
+ - The OpenAI-compatible planner refuses a base URL that is not `http` or `https`, so
216
+ `OPENAI_BASE_URL` cannot point the standard library at local files.
217
+ - Catalogs, lock files, wikis and plans are written with LF line endings on every platform, so a
218
+ catalog saved on Windows is byte-identical to one saved on Linux or macOS.
219
+ - Repositories read from a Windows path are cached under their own name instead of the whole
220
+ path, and git runs with long paths enabled, so deep repositories clone on Windows.
221
+ - On Windows, command-line planner backends refuse a `.cmd` or `.bat` launcher when the
222
+ arguments it would receive contain cmd.exe syntax, such as the JSON Schema, instead of letting
223
+ cmd.exe cut them short or redirect them. Arguments without it, such as file paths, still work.
224
+ - `flowglyph diff --fail-on major` failed whenever a capability was added. Additions are now a
225
+ minor change and removals stay major, so the check fails only on changes that break a caller.
226
+ - Capabilities that cannot run on their own, such as UiPath activity types, were reported as
227
+ `review`, which no override could usefully settle. Their status is now `n/a`, in the report,
228
+ the CLI and wiki lint.
229
+ - UiPath arguments of .NET reference types (strings, arrays, objects such as exceptions or queue
230
+ items) accept `null`, which is how `Nothing` reaches a workflow; the gateway refused the most
231
+ common call to the ReFrameWork's `SetTransactionStatus`. Value types such as `Int32` do not,
232
+ unless declared `Nullable`, and `Int16`, `Byte`, `Single`, `Guid` and `Char` get their JSON types.
233
+ - An error that was not a `FlowGlyphError` raised by an executor escaped `Gateway.run`, leaving
234
+ the ledger row `running` until it expired and no audit line. Every run now ends as a result,
235
+ `failed` with the error text when the executor raised, and a `start` audit event is written
236
+ before executing.
237
+ - A `--ref` that starts with `-` reached git as an option (`--upload-pack=...` ran a command).
238
+ Such refs are refused, and git is told where its options end before the remote and the URL.
239
+ - An HTTP path argument of `..` called a different route; empty, `.` and `..` path values are
240
+ refused, and a header value with a line break fails cleanly instead of with a bare ValueError.
241
+ - `import flowglyph.gateway` without the `[mcp]` extra failed with a bare `ModuleNotFoundError`;
242
+ it now says which extra to install.
243
+ - Two capability ids that sanitise to the same MCP tool name collided and the last one won
244
+ silently; both now get a short hash suffix.
245
+ - Argument validation checks string formats, so `format: uuid` (SAP `Edm.Guid`) rejects
246
+ anything that is not a UUID, and every OData literal emitted without quotes must match the
247
+ shape of its Edm type.
248
+ - Capability titles, descriptions and cards lose control characters before they reach an MCP
249
+ client, and the server instructions say they are data from the sources, not instructions.
250
+
251
+ [Unreleased]: https://github.com/afernandeztem/FlowGlyph/compare/v0.1.0...HEAD
252
+ [0.1.0]: https://github.com/afernandeztem/FlowGlyph/releases/tag/v0.1.0
@@ -0,0 +1,83 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at a.fernandez.tem@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,249 @@
1
+ # Contributing to FlowGlyph
2
+
3
+ Thanks for taking the time to contribute. This document covers how to set up the project,
4
+ the conventions the codebase follows, and how changes get merged.
5
+
6
+ ## Development setup
7
+
8
+ You need [uv](https://docs.astral.sh/uv/) 0.13 or newer. Node 26 is only needed to
9
+ regenerate the README diagrams.
10
+
11
+ ```bash
12
+ git clone https://github.com/afernandeztem/FlowGlyph
13
+ cd FlowGlyph
14
+ make install # uv sync --all-extras + pre-commit hooks
15
+ make check # ruff, pyright, pytest
16
+ ```
17
+
18
+ Tests that call a real LLM are marked `llm` and skipped by default. `make test-llm` runs them
19
+ with the backend named in `FLOWGLYPH_PLANNER` (`anthropic` by default, which needs an
20
+ `ANTHROPIC_API_KEY`; `claude-code`, `codex`, `gemini` or `cursor` use that tool's own sign-in).
21
+ Every run uses real model capacity.
22
+
23
+ Before changing code, read [docs/guide.md](docs/guide.md) to see what FlowGlyph does from a
24
+ user's side, [docs/architecture.md](docs/architecture.md) for how the code is divided and
25
+ [docs/glossary.md](docs/glossary.md) for what its words mean.
26
+
27
+ ## Project layout
28
+
29
+ | Path | What lives there |
30
+ |---|---|
31
+ | `src/flowglyph/ir.py` | The Automation IR models. Changing them is a spec change, see below. |
32
+ | `src/flowglyph/views.py` | How the IR is shown: effects codes, retry advice, L0 cards. |
33
+ | `src/flowglyph/sources.py` | Folders, files and git URLs resolved to local files. |
34
+ | `src/flowglyph/adapters/` | One subpackage per source format. Adapters only produce IR. |
35
+ | `src/flowglyph/catalog/` | Extraction, lock file and versioning, overrides, search, persistence. |
36
+ | `src/flowglyph/report.py` | The idempotency report. |
37
+ | `src/flowglyph/wiki.py` | The LLM wiki: build and lint. |
38
+ | `src/flowglyph/gateway/` | MCP server, policy engine, idempotency ledger, audit log, executors. |
39
+ | `src/flowglyph/planner/` | Requirements to workflow IR, and the backends that propose plans. |
40
+ | `src/flowglyph/compilers/` | Workflow IR back to BPMN and UiPath XAML. |
41
+ | `src/flowglyph/context.py` | Context files and activity cards for coding agents. |
42
+ | `src/flowglyph/skill/SKILL.md` | The Agent Skill; `skills/flowglyph/SKILL.md` is a copy a test keeps identical. |
43
+ | `src/flowglyph/cli/` | The `flowglyph` command: one module per context in `commands/`. |
44
+ | `src/flowglyph/_internal/` | Private helpers. Not part of the public API. |
45
+ | `tests/unit/` | Fast tests per module. `test_architecture.py` enforces the dependency rules. |
46
+ | `tests/e2e/` | The command line and the MCP server, driven as a user or agent would. |
47
+ | `tests/golden/` | Expected outputs. Regenerate with `pytest --update-golden` and review the diff. |
48
+ | `tests/eval/` | Planner quality against a real model (`-m llm`). |
49
+ | `tests/fixtures/` | Sample sources. Third-party ones keep their license next to them and in `NOTICE`. |
50
+ | `docs/adr/` | Decision records: why things are the way they are. |
51
+
52
+ ## Code style
53
+
54
+ The bar is code that reads as if one careful person wrote all of it.
55
+
56
+ - English everywhere: code, docstrings, error messages, commit messages.
57
+ - Google-style docstrings on public modules, classes and functions, only when they say
58
+ something the signature does not. Private helpers usually need none.
59
+ - No inline comments that describe *what* a line does. A comment is allowed only to explain a
60
+ non-obvious *why*: a workaround, a spec reference, a deliberate trade-off.
61
+ - No section banners. If a module needs sections, it needs to be split into modules.
62
+ - No commented-out code, no emoji, no `TODO` without a linked issue.
63
+ - Full names over abbreviations. `workflow`, not `wf`; `activity`, not `a`.
64
+ - Data that crosses a module boundary is a typed model, never an anonymous `dict`.
65
+ - Project exceptions derive from `FlowGlyphError`. Never catch bare `Exception`.
66
+ - Keep functions small and single-purpose; ruff enforces the limits.
67
+
68
+ `ruff check`, `ruff format --check` and `pyright` (strict) must pass. Pre-commit runs all
69
+ three.
70
+
71
+ ## Changing the IR
72
+
73
+ The IR is the project's contract with every adapter, catalog and agent that consumes it.
74
+ Changes to `ir.py` need:
75
+
76
+ 1. An ADR in `docs/adr/` explaining the change and its migration path.
77
+ 2. An update to `docs/ir-spec.md` and the generated JSON Schemas (`make schemas`).
78
+ 3. A bump of `IR_VERSION` following semver: removing or renaming a field is a major change.
79
+
80
+ ## Writing an adapter
81
+
82
+ An adapter translates one source format into IR. It is a class with a `name`, a `version`, and
83
+ two methods; nothing to inherit. This one reads scheduled jobs from a `jobs.yaml` file:
84
+
85
+ <!-- adapter-example -->
86
+ ```python
87
+ import hashlib
88
+ from pathlib import Path
89
+ from typing import ClassVar
90
+
91
+ import yaml
92
+
93
+ from flowglyph import Capability, Effects, Trigger
94
+ from flowglyph.adapters import Diagnostic, Extraction
95
+ from flowglyph.ir import Source
96
+
97
+
98
+ class JobsAdapter:
99
+ """Scheduled jobs listed in a `jobs.yaml` file."""
100
+
101
+ name: ClassVar[str] = "jobs"
102
+ version: ClassVar[str] = "0.1.0"
103
+
104
+ def detect(self, path: Path) -> bool:
105
+ """Whether `path` is, or contains, a `jobs.yaml`."""
106
+ return path.name == "jobs.yaml" or (path / "jobs.yaml").is_file()
107
+
108
+ def extract(self, path: Path) -> Extraction:
109
+ """One capability per job."""
110
+ file = path if path.is_file() else path / "jobs.yaml"
111
+ data = file.read_bytes()
112
+ source_hash = "sha256:" + hashlib.sha256(data).hexdigest()
113
+ capabilities: list[Capability] = []
114
+ diagnostics: list[Diagnostic] = []
115
+ for job in yaml.safe_load(data).get("jobs", []):
116
+ if "schedule" not in job:
117
+ message = f"{job['name']} has no schedule"
118
+ diagnostics.append(Diagnostic("warning", file.name, message))
119
+ continue
120
+ capabilities.append(
121
+ Capability(
122
+ id=f"jobs/{job['name']}",
123
+ kind="workflow",
124
+ title=job["name"],
125
+ description=job.get("description", ""),
126
+ trigger=Trigger(kind="schedule", channel="cron", address=job["schedule"]),
127
+ effects=Effects(),
128
+ source=Source(
129
+ provider=self.name,
130
+ artifact=job["name"],
131
+ location=file.name,
132
+ source_hash=source_hash,
133
+ ),
134
+ invocable=False,
135
+ )
136
+ )
137
+ return Extraction(
138
+ capabilities=capabilities,
139
+ artifacts={file.name: source_hash},
140
+ diagnostics=diagnostics,
141
+ )
142
+ ```
143
+
144
+ Register it from your own package, and `flowglyph extract --adapter jobs` finds it:
145
+
146
+ ```toml
147
+ [project.entry-points."flowglyph.adapters"]
148
+ jobs = "flowglyph_jobs:JobsAdapter"
149
+ ```
150
+
151
+ In tests or scripts, `flowglyph.register_adapter("jobs", JobsAdapter)` does the same.
152
+
153
+ When a tree can hold many sources (every UiPath project in a repository, say), also define
154
+ `discover(root) -> list[Path]`; each path it returns is extracted on its own. Without it, the
155
+ adapter receives `root` whole when `detect` accepts it.
156
+
157
+ The rules every adapter follows:
158
+
159
+ - **Deterministic and offline.** The same bytes always give the same `Extraction`: no network,
160
+ no LLM, no clock, no randomness. Sort what you emit.
161
+ - **Sources are untrusted data.** Parse them; never execute, import or evaluate anything they
162
+ contain. Refuse XML that declares a DTD (built-in adapters use `_internal.xml.parse_xml`).
163
+ Read the names of externalized configuration, never its values.
164
+ - **Say unknown when you do not know.** `Effects()` is unknown everywhere, and that is a better
165
+ answer than a guess. Use `yes` and `no` only for what the format guarantees.
166
+ - **Declare only what the source declares.** Idempotency is `declared` only when the source
167
+ itself promises it; otherwise it is `inferred`, with an honest `confidence`.
168
+ - **Facts go in fields, not tags.** Use `trigger`, `entry_point`, `configuration`, `used_in` and
169
+ `deprecated`; keep `tags` for the source's own free labels.
170
+ - **Ids are stable.** An id never moves to a different operation, and does not change when a
171
+ file is reformatted. Prefix it with the adapter name.
172
+ - **Report, do not fail.** Problems with one artifact become a `Diagnostic`; raise
173
+ `AdapterError` only when nothing can be read.
174
+ - **Test with real samples.** Add fixtures under `tests/fixtures/` (with their license if they
175
+ are not yours), unit tests for each rule, and a golden test once the output is stable.
176
+
177
+ ## Adding a planner backend
178
+
179
+ A planner backend proposes a plan; the resolver then checks it against the catalog, so a backend
180
+ never has to be trusted. There are two ways to add one.
181
+
182
+ **A coding assistant with a headless mode** needs only a `CommandSpec`: the command line to run,
183
+ where the JSON Schema goes (`{schema}` or `{schema_file}`), and where the plan comes back (stdout,
184
+ a key in a JSON envelope, or `{output_file}`). Built-in presets are in
185
+ `src/flowglyph/planner/command.py`; add yours there and to `BUILT_IN` in `planner/backends.py`,
186
+ or use `CommandPlanModel(CommandSpec(...))` directly.
187
+
188
+ **Any other SDK or model** needs a class with a `propose` method, and a factory registered under
189
+ the `flowglyph.planners` entry point group:
190
+
191
+ <!-- planner-example -->
192
+ ```python
193
+ from collections.abc import Sequence
194
+ from typing import Any
195
+
196
+ import my_sdk
197
+
198
+ from flowglyph.planner import PlanModel
199
+ from flowglyph.planner.model import Plan, plan_json_schema
200
+ from flowglyph.planner.prompt import SYSTEM_PROMPT, request_text
201
+
202
+
203
+ class MySdkPlanModel:
204
+ """Proposes plans through my_sdk."""
205
+
206
+ def __init__(self, model: str) -> None:
207
+ self.model = model
208
+
209
+ def propose(self, requirements: str, candidates: Sequence[dict[str, Any]]) -> Plan:
210
+ """Send the shared prompt and schema; parse the answer as a plan."""
211
+ answer = my_sdk.complete(
212
+ model=self.model,
213
+ system=SYSTEM_PROMPT,
214
+ prompt=request_text(requirements, candidates),
215
+ json_schema=plan_json_schema(),
216
+ )
217
+ return Plan.model_validate_json(answer)
218
+
219
+
220
+ def my_sdk_planner(model: str | None, effort: str | None) -> PlanModel:
221
+ """Factory FlowGlyph calls with `--model` and `--effort`."""
222
+ return MySdkPlanModel(model or "my-default-model")
223
+ ```
224
+
225
+ ```toml
226
+ [project.entry-points."flowglyph.planners"]
227
+ my-sdk = "flowglyph_my_sdk:my_sdk_planner"
228
+ ```
229
+
230
+ `flowglyph plan requirements.md catalog --via my-sdk` then uses it, and
231
+ `FLOWGLYPH_PLANNER=my-sdk pytest -m llm` runs the planner evaluation against it. Use the shared
232
+ `SYSTEM_PROMPT`, `request_text` and `plan_json_schema` so every backend is asked the same thing.
233
+ Send nothing but the requirements and the candidate cards.
234
+
235
+ ## Commits and pull requests
236
+
237
+ - Use [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`,
238
+ `docs:`, `refactor:`, `test:`, `chore:`.
239
+ - Sign off every commit (`git commit -s`). This certifies the
240
+ [Developer Certificate of Origin](https://developercertificate.org/): that you wrote the
241
+ change or have the right to submit it under the project's license.
242
+ - Add an entry under `Unreleased` in `CHANGELOG.md` for user-facing changes.
243
+ - Keep pull requests focused. A refactor and a feature are two pull requests.
244
+
245
+ ## Reporting bugs and proposing features
246
+
247
+ Use the issue templates. For security issues, follow [SECURITY.md](SECURITY.md) instead.
248
+
249
+ By participating you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).