@jterrats/open-orchestra 1.0.2 → 1.0.4

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 (151) hide show
  1. package/AGENTS.md +7 -2
  2. package/CLAUDE.md +2 -2
  3. package/README.md +3 -0
  4. package/dist/args.js +12 -2
  5. package/dist/args.js.map +1 -1
  6. package/dist/assets/web-console.js +44 -0
  7. package/dist/autonomous-phase-lifecycle.js +23 -3
  8. package/dist/autonomous-phase-lifecycle.js.map +1 -1
  9. package/dist/autonomous-run-state.js +2 -0
  10. package/dist/autonomous-run-state.js.map +1 -1
  11. package/dist/benchmark.js +6 -0
  12. package/dist/benchmark.js.map +1 -1
  13. package/dist/cli.js +4 -1
  14. package/dist/cli.js.map +1 -1
  15. package/dist/command-manifest.js +4 -3
  16. package/dist/command-manifest.js.map +1 -1
  17. package/dist/command-utils.js +4 -5
  18. package/dist/command-utils.js.map +1 -1
  19. package/dist/commands.d.ts +1 -1
  20. package/dist/commands.js +1 -1
  21. package/dist/commands.js.map +1 -1
  22. package/dist/metrics-commands.js +8 -0
  23. package/dist/metrics-commands.js.map +1 -1
  24. package/dist/phase-playbooks.js +27 -1
  25. package/dist/phase-playbooks.js.map +1 -1
  26. package/dist/roles/core-roles.js +10 -5
  27. package/dist/roles/core-roles.js.map +1 -1
  28. package/dist/skills-catalog.js +136 -0
  29. package/dist/skills-catalog.js.map +1 -1
  30. package/dist/skills-commands.d.ts +1 -0
  31. package/dist/skills-commands.js +37 -1
  32. package/dist/skills-commands.js.map +1 -1
  33. package/dist/skills-planning.d.ts +2 -1
  34. package/dist/skills-planning.js +79 -11
  35. package/dist/skills-planning.js.map +1 -1
  36. package/dist/skills.d.ts +1 -1
  37. package/dist/skills.js +1 -1
  38. package/dist/skills.js.map +1 -1
  39. package/dist/task-graph-commands.js +36 -8
  40. package/dist/task-graph-commands.js.map +1 -1
  41. package/dist/types/metrics.d.ts +2 -0
  42. package/dist/types/skills.d.ts +9 -0
  43. package/dist/types/tasks.d.ts +8 -1
  44. package/dist/types.d.ts +2 -2
  45. package/dist/types.js.map +1 -1
  46. package/dist/web-api.js +80 -7
  47. package/dist/web-api.js.map +1 -1
  48. package/dist/workflow-approval-service.js +13 -0
  49. package/dist/workflow-approval-service.js.map +1 -1
  50. package/dist/workflow-evidence-service.js +37 -2
  51. package/dist/workflow-evidence-service.js.map +1 -1
  52. package/dist/workflow-gates.js +56 -1
  53. package/dist/workflow-gates.js.map +1 -1
  54. package/dist/workflow-phase-planner.js +86 -13
  55. package/dist/workflow-phase-planner.js.map +1 -1
  56. package/dist/workflow-run-commands.d.ts +1 -0
  57. package/dist/workflow-run-commands.js +11 -6
  58. package/dist/workflow-run-commands.js.map +1 -1
  59. package/dist/workflow-services.js +24 -0
  60. package/dist/workflow-services.js.map +1 -1
  61. package/dist/workflow-task-service.js +27 -2
  62. package/dist/workflow-task-service.js.map +1 -1
  63. package/docs/adoption-guide.md +22 -1
  64. package/docs/advisory-supervisor-architecture.md +206 -0
  65. package/docs/architecture.md +47 -41
  66. package/docs/autonomous-workflow.md +2 -2
  67. package/docs/backlog/ac-evidence-bugfix-stories-20260517.md +76 -0
  68. package/docs/backlog/chaos-testing-stack-strategy.md +146 -0
  69. package/docs/backlog/dev-best-practices-hardening-story.md +69 -0
  70. package/docs/backlog/docs-public-internal-package-hygiene-story.md +62 -0
  71. package/docs/backlog/project-persona-registry-epic.md +350 -0
  72. package/docs/backlog/prompt-bank-registry-epic.md +159 -0
  73. package/docs/backlog/site-docs-manifest-story.md +56 -0
  74. package/docs/dev-team-specialist-role-profiles.md +1 -1
  75. package/docs/diagrams/diagram-master-prompt.md +207 -0
  76. package/docs/diagrams/enterprise-set/README.md +22 -0
  77. package/docs/diagrams/enterprise-set/lead-to-account-swimlanes.svg +38 -0
  78. package/docs/diagrams/enterprise-set/product-implementation-timeline.svg +45 -0
  79. package/docs/diagrams/enterprise-set/salesforce-enterprise-architecture.svg +54 -0
  80. package/docs/diagrams/experiments/pixel-v2-review.md +124 -0
  81. package/docs/diagrams/experiments/roadmap/diagram.mmd +14 -0
  82. package/docs/diagrams/experiments/roadmap/diagram.svg +48 -0
  83. package/docs/diagrams/experiments/roadmap/experiment.md +44 -0
  84. package/docs/diagrams/experiments/sfdc-implementation/diagram.mmd +54 -0
  85. package/docs/diagrams/experiments/sfdc-implementation/diagram.svg +72 -0
  86. package/docs/diagrams/experiments/sfdc-implementation/experiment.md +41 -0
  87. package/docs/diagrams/experiments/swimlane/diagram.mmd +40 -0
  88. package/docs/diagrams/experiments/swimlane/diagram.svg +70 -0
  89. package/docs/diagrams/experiments/swimlane/experiment.md +50 -0
  90. package/docs/diagrams/experiments/timeline/diagram.mmd +9 -0
  91. package/docs/diagrams/experiments/timeline/diagram.svg +29 -0
  92. package/docs/diagrams/experiments/timeline/experiment.md +34 -0
  93. package/docs/diagrams/final-artifact-hygiene.md +40 -0
  94. package/docs/diagrams/mermaid-target-strategy.md +106 -0
  95. package/docs/diagrams/payment-gateway/architecture.md +57 -0
  96. package/docs/diagrams/payment-gateway/architecture.mmd +39 -0
  97. package/docs/diagrams/payment-gateway/architecture.svg +171 -0
  98. package/docs/diagrams/prompt-bank.md +48 -0
  99. package/docs/diagrams/salesforce-integration/architecture.md +56 -0
  100. package/docs/diagrams/salesforce-integration/architecture.mmd +26 -0
  101. package/docs/diagrams/salesforce-integration/architecture.svg +123 -0
  102. package/docs/diagrams/source-fidelity-review.md +116 -0
  103. package/docs/diagrams/state-uml-recreated.drawio +336 -0
  104. package/docs/diagrams/state-uml-recreated.prompt.md +114 -0
  105. package/docs/diagrams/state-uml-recreated.prompt.v10.md +52 -0
  106. package/docs/diagrams/state-uml-recreated.prompt.v11.md +52 -0
  107. package/docs/diagrams/state-uml-recreated.prompt.v12.md +50 -0
  108. package/docs/diagrams/state-uml-recreated.prompt.v14.md +91 -0
  109. package/docs/diagrams/state-uml-recreated.prompt.v2.md +31 -0
  110. package/docs/diagrams/state-uml-recreated.prompt.v3.md +36 -0
  111. package/docs/diagrams/state-uml-recreated.prompt.v4.md +35 -0
  112. package/docs/diagrams/state-uml-recreated.prompt.v5.md +35 -0
  113. package/docs/diagrams/state-uml-recreated.prompt.v6.md +39 -0
  114. package/docs/diagrams/state-uml-recreated.prompt.v7.md +37 -0
  115. package/docs/diagrams/state-uml-recreated.prompt.v8.md +41 -0
  116. package/docs/diagrams/state-uml-recreated.prompt.v9.md +32 -0
  117. package/docs/diagrams/state-uml-recreated.svg +159 -0
  118. package/docs/diagrams/v14-stress-test/README.md +33 -0
  119. package/docs/diagrams/v14-stress-test/stress-test.svg +114 -0
  120. package/docs/external-artifact-import-bridge.md +56 -0
  121. package/docs/{setup-agents-applicability-review.md → external-baseline-applicability-review.md} +37 -40
  122. package/docs/{setup-agents-dogfooding-findings.md → external-baseline-dogfooding-findings.md} +10 -9
  123. package/docs/multi-agent-orchestrator-backlog.md +1 -1
  124. package/docs/orchestra-mvp.md +19 -0
  125. package/docs/persona-workflows.md +42 -0
  126. package/docs/release-test-matrix.md +21 -9
  127. package/docs/reports/ac-evidence-backfill-20260517.md +256 -0
  128. package/docs/reports/ac-evolution-reconciliation-20260517.md +366 -0
  129. package/docs/reports/ac-failure-evidence-20260517.md +115 -0
  130. package/docs/reports/ac-history-dry-run-20260517.md +434 -0
  131. package/docs/runtime-llm-flow.md +8 -0
  132. package/docs/site-content-workflow.md +96 -0
  133. package/docs/site-manifest.json +143 -0
  134. package/docs/skill-loading-strategy.md +18 -7
  135. package/docs/story-mapping-adoption-review.md +99 -0
  136. package/docs/workspace-repo-strategy.md +63 -0
  137. package/package.json +3 -1
  138. package/rules/agent-collaboration.mdc +2 -0
  139. package/rules/code-review-engineering.mdc +2 -0
  140. package/rules/delivery-quality-gates.mdc +12 -0
  141. package/rules/development-engineering.mdc +3 -0
  142. package/rules/diagram-quality.mdc +35 -0
  143. package/rules/module-boundaries.mdc +71 -0
  144. package/rules/testing-discipline.mdc +13 -0
  145. package/skills/chaos-resilience-testing/SKILL.md +127 -0
  146. package/skills/chaos-resilience-testing/manifest.json +61 -0
  147. package/skills/collection-standards/SKILL.md +2 -0
  148. package/skills/diagram-export/SKILL.md +30 -0
  149. package/skills/qa-evidence-pack/SKILL.md +110 -0
  150. package/skills/qa-evidence-pack/manifest.json +60 -0
  151. package/docs/setup-agents-bridge.md +0 -61
@@ -0,0 +1,57 @@
1
+ # Payment Gateway Architecture
2
+
3
+ Task: ARCH-PAYMENT-GATEWAY-DIAGRAM
4
+
5
+ ## Source Mode
6
+
7
+ `source-free`
8
+
9
+ No visual source reference was provided. This diagram is validated against its
10
+ own architecture contract and the current diagram quality rules.
11
+
12
+ ## Architecture Contract
13
+
14
+ - Audience: architect, security, developer, QA, and release reviewers.
15
+ - Required systems:
16
+ - Web interface for merchants, admins, and customers.
17
+ - APIs / middleware layer for payment orchestration.
18
+ - Payment gateway core service.
19
+ - Transaction database.
20
+ - Security layer.
21
+ - Added supporting elements:
22
+ - Identity provider for authentication.
23
+ - WAF / API gateway for edge protection.
24
+ - Token vault / KMS for card tokenization and key management.
25
+ - Fraud/risk engine for transaction scoring.
26
+ - Audit log / monitoring for compliance and operations.
27
+ - External payment processor / card network.
28
+ - Required relationships:
29
+ - Users access the web interface through edge security.
30
+ - Web interface calls APIs through the API gateway.
31
+ - Middleware orchestrates payment requests and routes them to the payment
32
+ gateway core.
33
+ - Gateway core stores transaction state in the database.
34
+ - Gateway core tokenizes sensitive payment data through token vault / KMS.
35
+ - Gateway core requests fraud/risk scoring before authorization.
36
+ - Gateway core sends authorization/capture/refund messages to the external
37
+ processor.
38
+ - Middleware and gateway core emit audit and operational events.
39
+ - Visual requirements:
40
+ - Security controls are visually distinct and readable.
41
+ - API/middleware and core payment responsibilities are separated.
42
+ - Connectors are orthogonal, visibly attached, and do not cover text.
43
+ - Parent containers leave visible padding around child nodes.
44
+ - Empty whitespace is intentional and supports scan order.
45
+
46
+ ## Validation Notes
47
+
48
+ - All requested systems are present.
49
+ - The security layer is shown as a distinct trust/control band.
50
+ - Connector labels sit in whitespace or on readable label backgrounds.
51
+ - The first render was reviewed and adjusted for label lanes and connector
52
+ endpoint clarity before acceptance.
53
+ - Preview `output/diagram-experiments/payment-gateway/preview-v6.png` is the
54
+ current visual candidate for review after applying prompt v14. The pass moved
55
+ competing labels into separate lanes, split and repositioned the long
56
+ application note, terminated `user traffic` at the Security Edge boundary, and
57
+ resized Security Controls so Audit / Monitoring remains fully contained.
@@ -0,0 +1,39 @@
1
+ flowchart LR
2
+ users["Users\nMerchants / Admins / Customers"]
3
+
4
+ subgraph edge["Security Edge"]
5
+ waf["WAF / API Gateway\nTLS, throttling, threat rules"]
6
+ idp["Identity Provider\nOIDC / MFA / service auth"]
7
+ end
8
+
9
+ subgraph app["Application Layer"]
10
+ web["Web Interface\ncheckout, admin, merchant portal"]
11
+ middleware["APIs / Middleware\norchestration, idempotency, routing"]
12
+ core["Payment Gateway Core\nauthorize, capture, refund"]
13
+ end
14
+
15
+ subgraph security["Security Controls"]
16
+ vault["Token Vault / KMS\ntokenization, keys, secrets"]
17
+ fraud["Fraud / Risk Engine\nscoring, rules, velocity checks"]
18
+ audit["Audit Log / Monitoring\nPCI evidence, traces, alerts"]
19
+ end
20
+
21
+ subgraph data["Data Layer"]
22
+ db["Transaction Database\norders, payments, ledger state"]
23
+ end
24
+
25
+ processor["External Processor / Card Network\nauthorization, settlement"]
26
+
27
+ users -->|"browser / API traffic"| waf
28
+ waf -->|"validated traffic"| web
29
+ waf -->|"API requests"| middleware
30
+ idp -->|"tokens / claims"| waf
31
+ web -->|"checkout + admin calls"| middleware
32
+ middleware -->|"payment commands"| core
33
+ core <-->|"transaction state"| db
34
+ core <-->|"tokenize / detokenize"| vault
35
+ core -->|"risk scoring"| fraud
36
+ fraud -->|"score + decision"| core
37
+ core <-->|"auth / capture / refund"| processor
38
+ middleware -->|"events + metrics"| audit
39
+ core -->|"payment events"| audit
@@ -0,0 +1,171 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1440" height="900" viewBox="0 0 1440 900" role="img" aria-labelledby="title desc">
2
+ <title id="title">Payment gateway architecture</title>
3
+ <desc id="desc">Architecture diagram showing users, security edge, web interface, APIs and middleware, payment gateway core, database, token vault, fraud engine, audit monitoring, and external processor.</desc>
4
+ <defs>
5
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto">
6
+ <path d="M0 0 L10 5 L0 10 z" fill="#475569"/>
7
+ </marker>
8
+ <marker id="arrow-start" viewBox="0 0 10 10" refX="1" refY="5" markerWidth="8" markerHeight="8" orient="auto">
9
+ <path d="M10 0 L0 5 L10 10 z" fill="#475569"/>
10
+ </marker>
11
+ <style>
12
+ .font{font-family:Arial,Helvetica,sans-serif}
13
+ .title{font-size:28px;font-weight:700;fill:#172033}
14
+ .subtitle{font-size:13px;fill:#4b596c}
15
+ .boundary{fill:#f7fafc;stroke:#94a3b8;stroke-width:1.5}
16
+ .edgeBoundary{fill:#f3f8ff;stroke:#89a9d8;stroke-width:1.5}
17
+ .appBoundary{fill:#f8fbf7;stroke:#93bd9b;stroke-width:1.5}
18
+ .securityBoundary{fill:#fff7ed;stroke:#e7b274;stroke-width:1.5}
19
+ .dataBoundary{fill:#f8f5ff;stroke:#b7a5e8;stroke-width:1.5}
20
+ .externalBoundary{fill:#fff8f8;stroke:#dda2a2;stroke-width:1.5}
21
+ .label{font-size:13px;font-weight:700;fill:#526174;text-transform:uppercase}
22
+ .card{fill:#fff;stroke:#64748b;stroke-width:1.5}
23
+ .cardTitle{font-size:17px;font-weight:700;fill:#1f2a3d}
24
+ .cardSub{font-size:12px;fill:#445267}
25
+ .badge{font-size:11px;font-weight:700;fill:#fff}
26
+ .edge{fill:none;stroke:#475569;stroke-width:2;marker-end:url(#arrow)}
27
+ .edgeBoth{fill:none;stroke:#475569;stroke-width:2;marker-start:url(#arrow-start);marker-end:url(#arrow)}
28
+ .labelBg{fill:#fff;stroke:#d8dee8;stroke-width:1}
29
+ .edgeLabel{font-size:12px;fill:#263445}
30
+ .note{font-size:12px;fill:#506074}
31
+ </style>
32
+ </defs>
33
+ <rect width="1440" height="900" fill="#ffffff"/>
34
+ <g class="font">
35
+ <text class="title" x="56" y="58">Payment Gateway Architecture</text>
36
+ <text class="subtitle" x="56" y="82">Source-free architecture candidate generated for visual validation.</text>
37
+
38
+ <rect class="card" x="56" y="362" width="166" height="100" rx="12"/>
39
+ <circle cx="88" cy="396" r="17" fill="#334155"/>
40
+ <text class="badge" x="88" y="400" text-anchor="middle">U</text>
41
+ <text class="cardTitle" x="118" y="392">Users</text>
42
+ <text class="cardSub" x="78" y="424">Merchants / admins</text>
43
+ <text class="cardSub" x="78" y="444">customers</text>
44
+
45
+ <rect class="edgeBoundary" x="274" y="170" width="254" height="484" rx="18"/>
46
+ <text class="label" x="304" y="204">Security Edge</text>
47
+ <rect class="card" x="314" y="256" width="174" height="104" rx="12"/>
48
+ <circle cx="346" cy="290" r="17" fill="#2563eb"/>
49
+ <text class="badge" x="346" y="294" text-anchor="middle">GW</text>
50
+ <text class="cardTitle" x="374" y="286">WAF / API</text>
51
+ <text class="cardTitle" x="374" y="306">Gateway</text>
52
+ <text class="cardSub" x="336" y="334">TLS, throttling</text>
53
+ <text class="cardSub" x="336" y="352">threat rules</text>
54
+
55
+ <rect class="card" x="314" y="456" width="174" height="104" rx="12"/>
56
+ <circle cx="346" cy="490" r="17" fill="#4f46e5"/>
57
+ <text class="badge" x="346" y="494" text-anchor="middle">ID</text>
58
+ <text class="cardTitle" x="374" y="486">Identity</text>
59
+ <text class="cardTitle" x="374" y="506">Provider</text>
60
+ <text class="cardSub" x="336" y="534">OIDC / MFA</text>
61
+ <text class="cardSub" x="336" y="552">service auth</text>
62
+
63
+ <rect class="appBoundary" x="584" y="118" width="404" height="620" rx="18"/>
64
+ <text class="label" x="616" y="152">Application Layer</text>
65
+ <rect class="card" x="632" y="214" width="206" height="112" rx="12"/>
66
+ <circle cx="664" cy="248" r="17" fill="#059669"/>
67
+ <text class="badge" x="664" y="252" text-anchor="middle">WEB</text>
68
+ <text class="cardTitle" x="696" y="244">Web Interface</text>
69
+ <text class="cardSub" x="658" y="278">checkout, admin</text>
70
+ <text class="cardSub" x="658" y="298">merchant portal</text>
71
+
72
+ <rect class="card" x="632" y="394" width="206" height="118" rx="12"/>
73
+ <circle cx="664" cy="428" r="17" fill="#0f766e"/>
74
+ <text class="badge" x="664" y="432" text-anchor="middle">API</text>
75
+ <text class="cardTitle" x="696" y="424">APIs / Middleware</text>
76
+ <text class="cardSub" x="658" y="460">orchestration</text>
77
+ <text class="cardSub" x="658" y="480">idempotency + routing</text>
78
+
79
+ <rect class="card" x="632" y="586" width="206" height="112" rx="12"/>
80
+ <circle cx="664" cy="620" r="17" fill="#0ea5e9"/>
81
+ <text class="badge" x="664" y="624" text-anchor="middle">PAY</text>
82
+ <text class="cardTitle" x="696" y="616">Gateway Core</text>
83
+ <text class="cardSub" x="658" y="650">authorize, capture</text>
84
+ <text class="cardSub" x="658" y="670">refund</text>
85
+
86
+ <rect class="securityBoundary" x="1038" y="118" width="326" height="482" rx="18"/>
87
+ <text class="label" x="1070" y="152">Security Controls</text>
88
+ <rect class="card" x="1086" y="210" width="228" height="92" rx="12"/>
89
+ <circle cx="1118" cy="242" r="17" fill="#d97706"/>
90
+ <text class="badge" x="1118" y="246" text-anchor="middle">KMS</text>
91
+ <text class="cardTitle" x="1150" y="238">Token Vault / KMS</text>
92
+ <text class="cardSub" x="1110" y="272">tokenization, keys</text>
93
+ <text class="cardSub" x="1110" y="290">secrets</text>
94
+
95
+ <rect class="card" x="1086" y="348" width="228" height="92" rx="12"/>
96
+ <circle cx="1118" cy="380" r="17" fill="#dc2626"/>
97
+ <text class="badge" x="1118" y="384" text-anchor="middle">FR</text>
98
+ <text class="cardTitle" x="1150" y="376">Fraud / Risk</text>
99
+ <text class="cardTitle" x="1150" y="396">Engine</text>
100
+ <text class="cardSub" x="1110" y="424">scoring + rules</text>
101
+
102
+ <rect class="card" x="1086" y="486" width="228" height="92" rx="12"/>
103
+ <circle cx="1118" cy="518" r="17" fill="#7c3aed"/>
104
+ <text class="badge" x="1118" y="522" text-anchor="middle">AUD</text>
105
+ <text class="cardTitle" x="1150" y="514">Audit / Monitoring</text>
106
+ <text class="cardSub" x="1110" y="548">PCI evidence</text>
107
+ <text class="cardSub" x="1110" y="566">traces + alerts</text>
108
+
109
+ <rect class="dataBoundary" x="1038" y="620" width="326" height="160" rx="18"/>
110
+ <text class="label" x="1070" y="654">Data Layer</text>
111
+ <rect class="card" x="1086" y="680" width="228" height="78" rx="12"/>
112
+ <circle cx="1118" cy="712" r="17" fill="#6d28d9"/>
113
+ <text class="badge" x="1118" y="716" text-anchor="middle">DB</text>
114
+ <text class="cardTitle" x="1150" y="708">Transaction DB</text>
115
+ <text class="cardSub" x="1110" y="738">orders, payments, ledger</text>
116
+
117
+ <rect class="externalBoundary" x="1020" y="812" width="360" height="60" rx="18"/>
118
+ <text class="label" x="1048" y="848">External Processor / Card Network</text>
119
+
120
+ <path class="edge" d="M222 412 H274"/>
121
+ <rect class="labelBg" x="224" y="388" width="86" height="20" rx="4"/>
122
+ <text class="edgeLabel" x="232" y="402">user traffic</text>
123
+
124
+ <path class="edge" d="M488 308 H632"/>
125
+ <rect class="labelBg" x="518" y="284" width="106" height="20" rx="4"/>
126
+ <text class="edgeLabel" x="526" y="298">validated UI</text>
127
+
128
+ <path class="edge" d="M488 326 H560 Q584 326 584 453 H632"/>
129
+ <rect class="labelBg" x="510" y="350" width="86" height="20" rx="4"/>
130
+ <text class="edgeLabel" x="518" y="364">API calls</text>
131
+
132
+ <path class="edge" d="M401 456 V360"/>
133
+ <rect class="labelBg" x="414" y="400" width="90" height="20" rx="4"/>
134
+ <text class="edgeLabel" x="422" y="414">auth claims</text>
135
+
136
+ <path class="edge" d="M735 326 V394"/>
137
+ <rect class="labelBg" x="752" y="350" width="116" height="20" rx="4"/>
138
+ <text class="edgeLabel" x="760" y="364">checkout calls</text>
139
+
140
+ <path class="edge" d="M735 512 V586"/>
141
+ <rect class="labelBg" x="752" y="540" width="136" height="20" rx="4"/>
142
+ <text class="edgeLabel" x="760" y="554">payment command</text>
143
+
144
+ <path class="edgeBoth" d="M838 686 H960 Q1000 686 1000 718 H1086"/>
145
+ <rect class="labelBg" x="906" y="706" width="126" height="20" rx="4"/>
146
+ <text class="edgeLabel" x="914" y="720">transaction state</text>
147
+
148
+ <path class="edgeBoth" d="M838 620 H930 Q958 620 958 256 H1086"/>
149
+ <rect class="labelBg" x="850" y="586" width="130" height="20" rx="4"/>
150
+ <text class="edgeLabel" x="858" y="600">token operations</text>
151
+
152
+ <path class="edge" d="M838 648 H966 Q1000 648 1000 394 H1086"/>
153
+ <rect class="labelBg" x="908" y="366" width="88" height="20" rx="4"/>
154
+ <text class="edgeLabel" x="916" y="380">risk score</text>
155
+
156
+ <path class="edge" d="M838 666 H944 Q982 666 982 532 H1086"/>
157
+ <rect class="labelBg" x="986" y="556" width="110" height="20" rx="4"/>
158
+ <text class="edgeLabel" x="994" y="570">payment events</text>
159
+
160
+ <path class="edge" d="M838 453 H1010 Q1038 453 1038 532 H1086"/>
161
+ <rect class="labelBg" x="852" y="460" width="104" height="20" rx="4"/>
162
+ <text class="edgeLabel" x="860" y="474">API metrics</text>
163
+
164
+ <path class="edgeBoth" d="M735 698 V838 H1020"/>
165
+ <rect class="labelBg" x="782" y="816" width="168" height="20" rx="4"/>
166
+ <text class="edgeLabel" x="790" y="830">auth / capture / refund</text>
167
+
168
+ <text class="note" x="752" y="754">Application responsibilities are separated</text>
169
+ <text class="note" x="752" y="772">from security controls and persistent state.</text>
170
+ </g>
171
+ </svg>
@@ -0,0 +1,48 @@
1
+ # Diagram Prompt Bank
2
+
3
+ Use this index to decide which diagram-generation prompt assets should feed the
4
+ master prompt and which should remain only as experiment history.
5
+
6
+ ## Keep In Prompt Bank
7
+
8
+ - `diagram-master-prompt.md`: canonical source-free prompt for diagram
9
+ generation, target selection, layout reflow, connector routing, validation,
10
+ evidence, and final artifact hygiene.
11
+ - `mermaid-target-strategy.md`: target-selection guidance for when Mermaid is
12
+ acceptable and when draw.io/Lucid-style editable geometry is needed.
13
+ - `v14-stress-test/README.md` and `v14-stress-test/stress-test.svg`: source-free
14
+ validation fixture for checking whether the prompt rules catch bounded text,
15
+ label lanes, containment, and connector route problems.
16
+
17
+ ## Keep As Visual Examples, Not Prompt Rules
18
+
19
+ - `enterprise-set/*.svg`: source-free diagram candidates useful for visual QA
20
+ practice. Do not copy their business labels into the master prompt.
21
+ - `payment-gateway/*`: architecture example useful for visual regression checks.
22
+ Do not promote payment-domain wording into the master prompt.
23
+ - `salesforce-integration/*`: architecture example useful for target-format
24
+ comparison. Do not promote platform-specific wording into the master prompt.
25
+
26
+ ## Keep As Experiment Archive Only
27
+
28
+ - `state-uml-recreated.prompt.md` through `state-uml-recreated.prompt.v11.md`:
29
+ historical deltas from a specific recreation exercise. Extract only generic
30
+ rules already represented in v12/v14.
31
+ - `state-uml-recreated.prompt.v12.md` and `state-uml-recreated.prompt.v14.md`:
32
+ reusable deltas that have been consolidated into `diagram-master-prompt.md`.
33
+ Keep them only as provenance until the master prompt is accepted.
34
+ - `experiments/**/experiment.md` and `source-fidelity-review.md`: these contain
35
+ downloaded-source observations and PDF/page-specific analysis. Keep them for
36
+ traceability, but exclude their source text from the prompt bank.
37
+ - `experiments/**/*.mmd` and `experiments/**/*.svg`: rendered experiment outputs.
38
+ Useful for manual comparison, not for master-prompt wording.
39
+
40
+ ## Promotion Criteria
41
+
42
+ - Promote only rules that are domain-agnostic and apply to any diagram type.
43
+ - Exclude source text, platform names, business labels, PDF wording, and
44
+ one-off coordinates from reusable prompt guidance.
45
+ - A prompt-bank candidate must include a validation rule, not only a drawing
46
+ instruction.
47
+ - If two regenerated versions preserve the same visual error, the rule is not
48
+ strong enough. Add a geometry-change requirement before keeping it.
@@ -0,0 +1,56 @@
1
+ # Salesforce Integration Architecture
2
+
3
+ Task: ARCH-SALESFORCE-INTEGRATION-DIAGRAM
4
+
5
+ ## Source Mode
6
+
7
+ `source-free`
8
+
9
+ No visual source reference was provided. The diagram is validated against this
10
+ contract rather than against a source screenshot.
11
+
12
+ ## Architecture Contract
13
+
14
+ - Audience: architect and delivery team reviewing integration boundaries.
15
+ - Systems:
16
+ - Experience Cloud as the user-facing portal.
17
+ - Salesforce Core as CRM and business process system of record.
18
+ - MuleSoft as API orchestration and integration broker.
19
+ - Data 360 as customer data unification and profile/segment layer.
20
+ - S3 bucket as file repository/object storage.
21
+ - Payment Gateway as external payment processor.
22
+ - Required relationships:
23
+ - Users access Experience Cloud.
24
+ - Experience Cloud invokes Salesforce services for portal workflows.
25
+ - Salesforce publishes and consumes APIs through MuleSoft.
26
+ - MuleSoft coordinates payment calls with the payment gateway.
27
+ - MuleSoft coordinates file upload/download metadata and object operations
28
+ with S3.
29
+ - Salesforce and Data 360 exchange customer/profile data.
30
+ - MuleSoft can feed integration events into Data 360 when needed.
31
+ - Visual requirements:
32
+ - Clear trust/system boundaries.
33
+ - Orthogonal connectors with arrowheads on target edges.
34
+ - No text overflow.
35
+ - Composite containers grow around their child nodes with visible padding.
36
+ - External services are visually distinct from Salesforce platform services.
37
+
38
+ ## Architect Result
39
+
40
+ The Architect decision recorded through Orchestra:
41
+
42
+ > Use a layered integration architecture with Salesforce core, Experience Cloud
43
+ > frontend, MuleSoft integration layer, Data 360 data layer, S3 file repository,
44
+ > and payment gateway external service.
45
+
46
+ ## Validation Notes
47
+
48
+ - All requested systems are present.
49
+ - Salesforce platform services are grouped together.
50
+ - External services are grouped separately.
51
+ - MuleSoft sits between Salesforce and external dependencies.
52
+ - Connectors are orthogonal and terminate at visible target edges.
53
+ - Parent containers have padding around child nodes and labels.
54
+ - The rendered SVG was reflowed after label placement so connector labels sit in
55
+ clear lanes and parent containers still contain their children after sizing
56
+ changes.
@@ -0,0 +1,26 @@
1
+ flowchart LR
2
+ user[External Users]
3
+
4
+ subgraph sf["Salesforce Platform Boundary"]
5
+ exp["Experience Cloud\nPortal / Self-Service"]
6
+ core["Salesforce Core\nCRM + Business Processes"]
7
+ d360["Data 360\nUnified Profiles + Segments"]
8
+ end
9
+
10
+ subgraph integration["Integration Layer"]
11
+ mulesoft["MuleSoft\nAPI Orchestration"]
12
+ end
13
+
14
+ subgraph external["External Services"]
15
+ s3["Amazon S3 Bucket\nFile Repository"]
16
+ pay["Payment Gateway\nPayments + Status"]
17
+ end
18
+
19
+ user -->|"portal access"| exp
20
+ exp -->|"authenticated workflows"| core
21
+ core <-->|"customer/profile sync"| d360
22
+ core <-->|"system APIs + events"| mulesoft
23
+ mulesoft <-->|"file metadata + object ops"| s3
24
+ mulesoft <-->|"payment auth/capture/status"| pay
25
+ mulesoft -->|"integration events"| d360
26
+
@@ -0,0 +1,123 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="760" viewBox="0 0 1280 760" role="img" aria-labelledby="title desc">
2
+ <title id="title">Salesforce integration architecture</title>
3
+ <desc id="desc">Architecture diagram showing Experience Cloud, Salesforce Core, Data 360, MuleSoft, S3 file repository, and payment gateway relationships.</desc>
4
+ <defs>
5
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto">
6
+ <path d="M0 0 L10 5 L0 10 z" fill="#526174"/>
7
+ </marker>
8
+ <marker id="arrow-start" viewBox="0 0 10 10" refX="1" refY="5" markerWidth="8" markerHeight="8" orient="auto">
9
+ <path d="M10 0 L0 5 L10 10 z" fill="#526174"/>
10
+ </marker>
11
+ <style>
12
+ .font{font-family:Arial,Helvetica,sans-serif}
13
+ .title{font-size:26px;font-weight:700;fill:#172033}
14
+ .subtitle{font-size:13px;fill:#4b596c}
15
+ .boundary{fill:#f3f7ff;stroke:#9fb4d8;stroke-width:1.5}
16
+ .boundaryExternal{fill:#f7faf8;stroke:#9bc3aa;stroke-width:1.5}
17
+ .boundaryIntegration{fill:#fff7ed;stroke:#e7b274;stroke-width:1.5}
18
+ .label{font-size:13px;font-weight:700;fill:#526174;text-transform:uppercase}
19
+ .card{fill:#fff;stroke:#6f7e92;stroke-width:1.5}
20
+ .cardTitle{font-size:17px;font-weight:700;fill:#1f2a3d}
21
+ .cardSub{font-size:12px;fill:#445267}
22
+ .badge{font-size:11px;font-weight:700;fill:#fff}
23
+ .edge{fill:none;stroke:#526174;stroke-width:2;marker-end:url(#arrow)}
24
+ .edgeBoth{fill:none;stroke:#526174;stroke-width:2;marker-start:url(#arrow-start);marker-end:url(#arrow)}
25
+ .edgeSoft{fill:none;stroke:#6b7b8f;stroke-width:1.8;stroke-dasharray:7 5;marker-end:url(#arrow)}
26
+ .labelBg{fill:#fff;stroke:#d8dee8;stroke-width:1}
27
+ .edgeLabel{font-size:12px;fill:#2f3a4c}
28
+ .note{font-size:12px;fill:#506074}
29
+ </style>
30
+ </defs>
31
+ <rect width="1280" height="760" fill="#ffffff"/>
32
+ <g class="font">
33
+ <text class="title" x="56" y="58">Salesforce Integration Architecture</text>
34
+ <text class="subtitle" x="56" y="82">Source-free architecture candidate generated from the Orchestra Architect handoff.</text>
35
+
36
+ <rect class="card" x="56" y="332" width="150" height="86" rx="12"/>
37
+ <circle cx="86" cy="362" r="16" fill="#334155"/>
38
+ <text class="badge" x="86" y="366" text-anchor="middle">U</text>
39
+ <text class="cardTitle" x="116" y="358">Users</text>
40
+ <text class="cardSub" x="76" y="386">Customers / partners</text>
41
+ <text class="cardSub" x="76" y="404">self-service access</text>
42
+
43
+ <rect class="boundary" x="250" y="132" width="468" height="560" rx="18"/>
44
+ <text class="label" x="278" y="166">Salesforce Platform Boundary</text>
45
+
46
+ <rect class="card" x="292" y="214" width="210" height="112" rx="12"/>
47
+ <circle cx="324" cy="246" r="17" fill="#0f65d8"/>
48
+ <text class="badge" x="324" y="250" text-anchor="middle">EC</text>
49
+ <text class="cardTitle" x="356" y="242">Experience Cloud</text>
50
+ <text class="cardSub" x="320" y="276">Portal workflows</text>
51
+ <text class="cardSub" x="320" y="296">authentication surface</text>
52
+
53
+ <rect class="card" x="292" y="424" width="210" height="120" rx="12"/>
54
+ <circle cx="324" cy="456" r="17" fill="#1798c1"/>
55
+ <text class="badge" x="324" y="460" text-anchor="middle">SF</text>
56
+ <text class="cardTitle" x="356" y="452">Salesforce Core</text>
57
+ <text class="cardSub" x="320" y="488">CRM records</text>
58
+ <text class="cardSub" x="320" y="508">business processes</text>
59
+
60
+ <rect class="card" x="532" y="424" width="150" height="120" rx="12"/>
61
+ <circle cx="564" cy="456" r="17" fill="#6952ff"/>
62
+ <text class="badge" x="564" y="460" text-anchor="middle">D3</text>
63
+ <text class="cardTitle" x="596" y="452">Data 360</text>
64
+ <text class="cardSub" x="556" y="488">Unified profiles</text>
65
+ <text class="cardSub" x="556" y="508">segments + signals</text>
66
+
67
+ <rect class="boundaryIntegration" x="784" y="318" width="212" height="242" rx="18"/>
68
+ <text class="label" x="812" y="352">Integration Layer</text>
69
+ <rect class="card" x="824" y="426" width="132" height="92" rx="12"/>
70
+ <circle cx="856" cy="456" r="17" fill="#00a1df"/>
71
+ <text class="badge" x="856" y="460" text-anchor="middle">M</text>
72
+ <text class="cardTitle" x="884" y="452">MuleSoft</text>
73
+ <text class="cardSub" x="846" y="482">API orchestration</text>
74
+ <text class="cardSub" x="846" y="500">events + routing</text>
75
+
76
+ <rect class="boundaryExternal" x="1028" y="174" width="220" height="392" rx="18"/>
77
+ <text class="label" x="1060" y="208">External Services</text>
78
+
79
+ <rect class="card" x="1060" y="252" width="156" height="92" rx="12"/>
80
+ <circle cx="1104" cy="284" r="17" fill="#e87912"/>
81
+ <text class="badge" x="1104" y="288" text-anchor="middle">S3</text>
82
+ <text class="cardTitle" x="1132" y="280">S3 Bucket</text>
83
+ <text class="cardSub" x="1098" y="314">file repository</text>
84
+ <text class="cardSub" x="1098" y="332">object storage</text>
85
+
86
+ <rect class="card" x="1060" y="418" width="156" height="102" rx="12"/>
87
+ <circle cx="1104" cy="450" r="17" fill="#0f766e"/>
88
+ <text class="badge" x="1104" y="454" text-anchor="middle">PG</text>
89
+ <text class="cardTitle" x="1132" y="444">Payment</text>
90
+ <text class="cardTitle" x="1132" y="464">Gateway</text>
91
+ <text class="cardSub" x="1098" y="494">payment auth</text>
92
+ <text class="cardSub" x="1098" y="512">status callbacks</text>
93
+
94
+ <path class="edge" d="M206 375 H292"/>
95
+ <text class="edgeLabel" x="222" y="362">portal access</text>
96
+
97
+ <path class="edge" d="M385 326 V424"/>
98
+ <text class="edgeLabel" x="404" y="378">workflow services</text>
99
+
100
+ <path class="edgeBoth" d="M502 484 H532"/>
101
+ <rect class="labelBg" x="510" y="550" width="130" height="20" rx="4"/>
102
+ <text class="edgeLabel" x="518" y="564">customer/profile sync</text>
103
+
104
+ <path class="edgeBoth" d="M682 484 H824"/>
105
+ <rect class="labelBg" x="702" y="456" width="108" height="20" rx="4"/>
106
+ <text class="edgeLabel" x="710" y="470">integration events</text>
107
+
108
+ <path class="edgeBoth" d="M397 544 V586 H756 Q784 586 784 494 H824"/>
109
+ <rect class="labelBg" x="560" y="592" width="126" height="20" rx="4"/>
110
+ <text class="edgeLabel" x="568" y="606">system APIs + events</text>
111
+
112
+ <path class="edgeBoth" d="M956 456 H1014 Q1028 456 1028 298 H1060"/>
113
+ <rect class="labelBg" x="928" y="390" width="96" height="20" rx="4"/>
114
+ <text class="edgeLabel" x="936" y="404">file/object ops</text>
115
+
116
+ <path class="edgeBoth" d="M956 486 H1060"/>
117
+ <rect class="labelBg" x="970" y="500" width="82" height="20" rx="4"/>
118
+ <text class="edgeLabel" x="978" y="514">payment API</text>
119
+
120
+ <text class="note" x="258" y="668">Composite platform container is sized around child services with visible padding.</text>
121
+ <text class="note" x="806" y="578">MuleSoft centralizes API policy and routing.</text>
122
+ </g>
123
+ </svg>
@@ -0,0 +1,116 @@
1
+ # Source Fidelity Review
2
+
3
+ Task: DIAGRAM-SOURCE-FIDELITY-REVIEW
4
+ Date: 2026-05-16
5
+
6
+ ## Clarification
7
+
8
+ The first diagram experiment batch produced type examples and findings. Those
9
+ outputs were reviewed for nonblank rendering, text fit, and broad structure.
10
+ They were not accepted as pixel-perfect recreations.
11
+
12
+ For future work, any task labeled as `recreation` must be evaluated pixel-perfect
13
+ against the source reference. Similar structure is not sufficient.
14
+
15
+ ## Required Recreation Workflow
16
+
17
+ 1. Classify the task:
18
+ - `semantic`: explain the concept.
19
+ - `inspired-by-reference`: reuse visual ideas without fidelity acceptance.
20
+ - `recreation`: reproduce the source.
21
+ 2. For `recreation`, extract the source region first. Ignore browser chrome,
22
+ page headers, footers, and download-site UI unless they are explicitly part
23
+ of the requested diagram.
24
+ 3. Build a source inventory:
25
+ - page/canvas size and aspect ratio.
26
+ - every container and nested container.
27
+ - all text, including line breaks, rotation, alignment, size, and approximate color.
28
+ - every connector, endpoint, arrowhead, bend point, line style, and label.
29
+ - icons, badges, legend entries, borders, fills, shadows, and z-order.
30
+ 4. Render the output.
31
+ 5. Compare source versus output by element or visual region.
32
+ 6. Correct and re-render until gaps are closed or explicitly documented.
33
+ 7. If the target cannot support required fidelity, reclassify the deliverable as
34
+ approximation and escalate to draw.io/Lucid for the authoritative artifact.
35
+
36
+ ## Required Source-Free Workflow
37
+
38
+ Diagrams without a source reference are not exempt from visual precision. They
39
+ must be pixel-perfect against their own declared contract before handoff.
40
+
41
+ 1. Define the contract before drawing: canvas size, diagram type, groups, nodes,
42
+ labels, relationships, reading flow, expected connector endpoints, and layout
43
+ constraints.
44
+ 2. Render the diagram.
45
+ 3. Inspect the render, not only the source file:
46
+ - text fits inside every container.
47
+ - containers are not too small or visually unbalanced.
48
+ - connector endpoints visibly touch the intended source and target edges.
49
+ - arrowheads are visible and not hidden behind shapes.
50
+ - lines do not cross labels, important symbols, or containers unless explicitly
51
+ justified.
52
+ - labels have clearance from borders, connectors, and arrowheads.
53
+ - whitespace is intentional and does not make the layout feel broken.
54
+ 4. Correct and re-render before delivery.
55
+ 5. Record residual issues if a diagram is accepted as an approximation.
56
+
57
+ ## Findings From Current Experiments
58
+
59
+ ### Swimlane
60
+
61
+ Current output is structurally similar but not pixel-perfect:
62
+
63
+ - header icons are approximated with text symbols.
64
+ - lane header colors and body colors are close but not measured from source.
65
+ - node positions and connector bends are simplified.
66
+ - source legend and typography are not fully recreated.
67
+
68
+ Target recommendation for recreation: draw.io or SVG with measured coordinates.
69
+ Mermaid recommendation: semantic swimlane only.
70
+
71
+ ### Technology Roadmap
72
+
73
+ Current output is a representative roadmap, not a source-accurate recreation:
74
+
75
+ - card sizes, shadows, and exact month grid positions differ.
76
+ - icon badges are simplified.
77
+ - source legend shape and title band are approximated.
78
+ - typography and card spacing were manually adjusted for readability, not exact fidelity.
79
+
80
+ Target recommendation for recreation: draw.io/SVG with extracted source metrics.
81
+ Mermaid recommendation: `gantt` semantic schedule.
82
+
83
+ ### Timeline Infographic
84
+
85
+ The downloaded PDF contains web page chrome. Current output intentionally uses
86
+ only the visible infographic idea and is not a recreation:
87
+
88
+ - source region extraction was not performed.
89
+ - exact colors, icons, and preview card details were not recreated.
90
+ - layout was normalized into a clean six-step diagram.
91
+
92
+ Target recommendation for recreation: first extract the actual infographic image
93
+ region, then recreate in draw.io/SVG. Mermaid recommendation: `timeline` semantic
94
+ milestones.
95
+
96
+ ### Layered Implementation Architecture
97
+
98
+ Current output is an abstraction, not a pixel-perfect recreation:
99
+
100
+ - many source micro-icons and vendor badges were collapsed.
101
+ - layer rail labels and system cards were simplified.
102
+ - connector count and routing are reduced.
103
+ - dense source labels were omitted to preserve readability.
104
+
105
+ Target recommendation for recreation: draw.io/Lucid with density budget and
106
+ source inventory. Mermaid recommendation: semantic layer/component map only.
107
+
108
+ ## Rule Candidates
109
+
110
+ - `recreation` requires pixel-perfect review.
111
+ - `inspired-by-reference` must not be described as recreation.
112
+ - PDF/web captures require source-region extraction before diagram authoring.
113
+ - Mermaid outputs must be labeled semantic unless exact layout is not acceptance criteria.
114
+ - Every recreation needs a source-vs-output gap table before handoff.
115
+ - Source-free diagrams need a contract-vs-output gap table before handoff when
116
+ any visual issue remains.