@jterrats/open-orchestra 1.0.1 → 1.0.3
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.
- package/AGENTS.md +7 -2
- package/CLAUDE.md +2 -2
- package/README.md +3 -0
- package/dist/args.js +12 -2
- package/dist/args.js.map +1 -1
- package/dist/assets/web-console.js +44 -0
- package/dist/autonomous-phase-lifecycle.js +23 -3
- package/dist/autonomous-phase-lifecycle.js.map +1 -1
- package/dist/autonomous-run-state.js +2 -0
- package/dist/autonomous-run-state.js.map +1 -1
- package/dist/benchmark.js +6 -0
- package/dist/benchmark.js.map +1 -1
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/command-manifest.js +4 -3
- package/dist/command-manifest.js.map +1 -1
- package/dist/command-utils.js +4 -5
- package/dist/command-utils.js.map +1 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/memory.js +18 -8
- package/dist/memory.js.map +1 -1
- package/dist/metrics-commands.js +8 -0
- package/dist/metrics-commands.js.map +1 -1
- package/dist/model-commands.js +6 -2
- package/dist/model-commands.js.map +1 -1
- package/dist/phase-executor.js +3 -0
- package/dist/phase-executor.js.map +1 -1
- package/dist/prompt-registry-update.js +20 -0
- package/dist/prompt-registry-update.js.map +1 -1
- package/dist/qa-coverage.js +15 -6
- package/dist/qa-coverage.js.map +1 -1
- package/dist/release-commands.js +42 -5
- package/dist/release-commands.js.map +1 -1
- package/dist/release-readiness.d.ts +3 -1
- package/dist/release-readiness.js +33 -6
- package/dist/release-readiness.js.map +1 -1
- package/dist/roles/core-roles.js +10 -5
- package/dist/roles/core-roles.js.map +1 -1
- package/dist/skills-catalog.js +130 -0
- package/dist/skills-catalog.js.map +1 -1
- package/dist/skills-commands.d.ts +1 -0
- package/dist/skills-commands.js +37 -1
- package/dist/skills-commands.js.map +1 -1
- package/dist/skills-planning.d.ts +2 -1
- package/dist/skills-planning.js +79 -11
- package/dist/skills-planning.js.map +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/task-graph-commands.js +36 -8
- package/dist/task-graph-commands.js.map +1 -1
- package/dist/types/metrics.d.ts +2 -0
- package/dist/types/model-config.d.ts +4 -0
- package/dist/types/skills.d.ts +9 -0
- package/dist/types/tasks.d.ts +8 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.js.map +1 -1
- package/dist/web-api.js +80 -7
- package/dist/web-api.js.map +1 -1
- package/dist/web-console/assets/{index-C9lx-V42.css → index-jxCY5eEc.css} +1 -1
- package/dist/web-console/index.html +2 -2
- package/dist/workflow-approval-service.js +13 -0
- package/dist/workflow-approval-service.js.map +1 -1
- package/dist/workflow-evidence-service.js +37 -2
- package/dist/workflow-evidence-service.js.map +1 -1
- package/dist/workflow-gates.d.ts +1 -0
- package/dist/workflow-gates.js +220 -1
- package/dist/workflow-gates.js.map +1 -1
- package/dist/workflow-phase-planner.js +51 -9
- package/dist/workflow-phase-planner.js.map +1 -1
- package/dist/workflow-run-commands.d.ts +1 -0
- package/dist/workflow-run-commands.js +11 -6
- package/dist/workflow-run-commands.js.map +1 -1
- package/dist/workflow-services.js +26 -0
- package/dist/workflow-services.js.map +1 -1
- package/dist/workflow-task-service.js +27 -2
- package/dist/workflow-task-service.js.map +1 -1
- package/docs/adoption-guide.md +22 -1
- package/docs/advisory-supervisor-architecture.md +206 -0
- package/docs/architecture.md +47 -41
- package/docs/autonomous-workflow.md +2 -2
- package/docs/backlog/ac-evidence-bugfix-stories-20260517.md +76 -0
- package/docs/backlog/dev-best-practices-hardening-story.md +69 -0
- package/docs/backlog/docs-public-internal-package-hygiene-story.md +62 -0
- package/docs/backlog/prompt-bank-registry-epic.md +159 -0
- package/docs/backlog/site-docs-manifest-story.md +56 -0
- package/docs/dev-team-specialist-role-profiles.md +1 -1
- package/docs/diagrams/diagram-master-prompt.md +207 -0
- package/docs/diagrams/enterprise-set/README.md +22 -0
- package/docs/diagrams/enterprise-set/lead-to-account-swimlanes.svg +38 -0
- package/docs/diagrams/enterprise-set/product-implementation-timeline.svg +45 -0
- package/docs/diagrams/enterprise-set/salesforce-enterprise-architecture.svg +54 -0
- package/docs/diagrams/experiments/pixel-v2-review.md +124 -0
- package/docs/diagrams/experiments/roadmap/diagram.mmd +14 -0
- package/docs/diagrams/experiments/roadmap/diagram.svg +48 -0
- package/docs/diagrams/experiments/roadmap/experiment.md +44 -0
- package/docs/diagrams/experiments/sfdc-implementation/diagram.mmd +54 -0
- package/docs/diagrams/experiments/sfdc-implementation/diagram.svg +72 -0
- package/docs/diagrams/experiments/sfdc-implementation/experiment.md +41 -0
- package/docs/diagrams/experiments/swimlane/diagram.mmd +40 -0
- package/docs/diagrams/experiments/swimlane/diagram.svg +70 -0
- package/docs/diagrams/experiments/swimlane/experiment.md +50 -0
- package/docs/diagrams/experiments/timeline/diagram.mmd +9 -0
- package/docs/diagrams/experiments/timeline/diagram.svg +29 -0
- package/docs/diagrams/experiments/timeline/experiment.md +34 -0
- package/docs/diagrams/final-artifact-hygiene.md +40 -0
- package/docs/diagrams/mermaid-target-strategy.md +106 -0
- package/docs/diagrams/payment-gateway/architecture.md +57 -0
- package/docs/diagrams/payment-gateway/architecture.mmd +39 -0
- package/docs/diagrams/payment-gateway/architecture.svg +171 -0
- package/docs/diagrams/prompt-bank.md +48 -0
- package/docs/diagrams/salesforce-integration/architecture.md +56 -0
- package/docs/diagrams/salesforce-integration/architecture.mmd +26 -0
- package/docs/diagrams/salesforce-integration/architecture.svg +123 -0
- package/docs/diagrams/source-fidelity-review.md +116 -0
- package/docs/diagrams/state-uml-recreated.drawio +336 -0
- package/docs/diagrams/state-uml-recreated.prompt.md +114 -0
- package/docs/diagrams/state-uml-recreated.prompt.v10.md +52 -0
- package/docs/diagrams/state-uml-recreated.prompt.v11.md +52 -0
- package/docs/diagrams/state-uml-recreated.prompt.v12.md +50 -0
- package/docs/diagrams/state-uml-recreated.prompt.v14.md +91 -0
- package/docs/diagrams/state-uml-recreated.prompt.v2.md +31 -0
- package/docs/diagrams/state-uml-recreated.prompt.v3.md +36 -0
- package/docs/diagrams/state-uml-recreated.prompt.v4.md +35 -0
- package/docs/diagrams/state-uml-recreated.prompt.v5.md +35 -0
- package/docs/diagrams/state-uml-recreated.prompt.v6.md +39 -0
- package/docs/diagrams/state-uml-recreated.prompt.v7.md +37 -0
- package/docs/diagrams/state-uml-recreated.prompt.v8.md +41 -0
- package/docs/diagrams/state-uml-recreated.prompt.v9.md +32 -0
- package/docs/diagrams/state-uml-recreated.svg +159 -0
- package/docs/diagrams/v14-stress-test/README.md +33 -0
- package/docs/diagrams/v14-stress-test/stress-test.svg +114 -0
- package/docs/external-artifact-import-bridge.md +56 -0
- package/docs/{setup-agents-applicability-review.md → external-baseline-applicability-review.md} +37 -40
- package/docs/{setup-agents-dogfooding-findings.md → external-baseline-dogfooding-findings.md} +10 -9
- package/docs/multi-agent-orchestrator-backlog.md +1 -1
- package/docs/orchestra-mvp.md +19 -0
- package/docs/persona-workflows.md +42 -0
- package/docs/release-test-matrix.md +21 -9
- package/docs/reports/ac-evidence-backfill-20260517.md +256 -0
- package/docs/reports/ac-evolution-reconciliation-20260517.md +366 -0
- package/docs/reports/ac-failure-evidence-20260517.md +115 -0
- package/docs/reports/ac-history-dry-run-20260517.md +434 -0
- package/docs/runtime-llm-flow.md +8 -0
- package/docs/site-content-workflow.md +96 -0
- package/docs/site-manifest.json +143 -0
- package/docs/skill-loading-strategy.md +19 -7
- package/docs/story-mapping-adoption-review.md +99 -0
- package/docs/traceability-flow.md +11 -0
- package/docs/workspace-repo-strategy.md +63 -0
- package/package.json +3 -1
- package/rules/agent-collaboration.mdc +2 -0
- package/rules/code-review-engineering.mdc +2 -0
- package/rules/delivery-quality-gates.mdc +12 -0
- package/rules/development-engineering.mdc +5 -0
- package/rules/devops-tooling.mdc +1 -0
- package/rules/diagram-quality.mdc +35 -0
- package/rules/dry-clean-code.mdc +1 -0
- package/rules/module-boundaries.mdc +71 -0
- package/rules/performance-reliability.mdc +1 -0
- package/rules/testing-discipline.mdc +17 -1
- package/skills/collection-standards/SKILL.md +65 -0
- package/skills/collection-standards/manifest.json +69 -0
- package/skills/diagram-export/SKILL.md +30 -0
- package/skills/qa-evidence-pack/SKILL.md +110 -0
- package/skills/qa-evidence-pack/manifest.json +60 -0
- package/docs/setup-agents-bridge.md +0 -61
- /package/dist/web-console/assets/{index-M3S0g1GK.js → index-BNESIVvk.js} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Swimlane Diagram Experiment
|
|
2
|
+
|
|
3
|
+
Task: DIAGRAM-SWIMLANE-EXPERIMENT
|
|
4
|
+
|
|
5
|
+
## Source Inventory
|
|
6
|
+
|
|
7
|
+
- `swimline-1.png`: five vertical lanes with colored headers, role icons, light lane backgrounds, process rectangles, decision diamonds, start/end rounded nodes, and orthogonal arrows across lanes.
|
|
8
|
+
- `Swimlane diagram - definitions, uses, examples.pdf`: long-form reference with swimlane illustrations; the useful visual pattern is a role-owned process flow with handoffs and decisions.
|
|
9
|
+
- `Swimlane Diagrams for Presentations.pdf`: presentation-oriented variants for layout and spacing reference.
|
|
10
|
+
|
|
11
|
+
## Element Contract
|
|
12
|
+
|
|
13
|
+
- Audience: product/operations reviewer validating process ownership and handoffs.
|
|
14
|
+
- Reading flow: left to right across departments, with retry paths returning to earlier lanes.
|
|
15
|
+
- Lanes: Client, Sales, Contracts, Construction, Handover.
|
|
16
|
+
- Nodes: start/end rounded pills, process rectangles, decision diamonds.
|
|
17
|
+
- Connectors: orthogonal arrows, lane-crossing handoffs, labels only when they disambiguate decision branches.
|
|
18
|
+
- Visual constraints: headers remain compact, lane bodies keep equal widths, arrows land on target edges, and decision branches avoid covering text.
|
|
19
|
+
|
|
20
|
+
## Prompt Used
|
|
21
|
+
|
|
22
|
+
Create an editable swimlane workflow diagram as SVG.
|
|
23
|
+
|
|
24
|
+
Use five vertical lanes: Client, Sales, Contracts, Construction, and Handover.
|
|
25
|
+
Each lane has a saturated blue/purple header with a simple white role icon and a
|
|
26
|
+
light blue body. Place nodes on a clear left-to-right process path:
|
|
27
|
+
|
|
28
|
+
1. Client submits PO.
|
|
29
|
+
2. Sales reviews costing.
|
|
30
|
+
3. Contracts reviews contract.
|
|
31
|
+
4. Decision: Contract okay?
|
|
32
|
+
5. If yes, set mobilization date, then Construction starts.
|
|
33
|
+
6. Decision: Terms accepted?
|
|
34
|
+
7. If yes, Construction finished, then Project handed over.
|
|
35
|
+
8. If no, Construction returns files to contractor and Completion date delayed.
|
|
36
|
+
9. If contract is not okay, complete requirements and return into the same review path.
|
|
37
|
+
|
|
38
|
+
Use rounded start/end nodes, rectangular process nodes, and diamond decisions.
|
|
39
|
+
Use orthogonal connectors only. Avoid diagonal connectors. Route arrows outside
|
|
40
|
+
node interiors. Add branch labels with at least 10px clearance from lines and
|
|
41
|
+
containers. After rendering, re-evaluate lane width, node text fit, connector
|
|
42
|
+
landing points, and unused whitespace.
|
|
43
|
+
|
|
44
|
+
## Evaluation Findings
|
|
45
|
+
|
|
46
|
+
- Swimlane references need explicit lane ownership and equal lane sizing; otherwise the flow becomes a generic process diagram.
|
|
47
|
+
- Decision labels are the highest-risk element because they can collide with vertical handoff lines.
|
|
48
|
+
- Icons are decorative but useful as first-scan lane identifiers; they should not drive layout.
|
|
49
|
+
- The generated SVG is readable, but a future high-fidelity pass should add a legend only when shape meaning is not obvious.
|
|
50
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
timeline
|
|
2
|
+
title Business Process Timeline
|
|
3
|
+
Discover : Collect goals and current-state pain
|
|
4
|
+
Map : Identify actors, systems, and flow
|
|
5
|
+
Design : Define target experience
|
|
6
|
+
Build : Implement the approved slice
|
|
7
|
+
Validate : Test against acceptance criteria
|
|
8
|
+
Launch : Release and monitor adoption
|
|
9
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1180" height="620" viewBox="0 0 1180 620" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Timeline infographic experiment</title>
|
|
3
|
+
<desc id="desc">Six-step alternating process timeline with numbered circular milestones.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<style>
|
|
6
|
+
.font{font-family:Arial,Helvetica,sans-serif}.title{fill:#263238;font-size:30px;font-weight:700;letter-spacing:0}.sub{fill:#607d8b;font-size:14px}.line{stroke:#8fa1b5;stroke-width:5;stroke-linecap:round}.stem{stroke:#b6c1ce;stroke-width:2}.card{fill:#fff;stroke:#d5dde8;stroke-width:1.5}.cardTitle{fill:#253044;font-size:16px;font-weight:700}.body{fill:#526174;font-size:12px}.num{fill:#fff;font-size:18px;font-weight:700}.icon{fill:#fff;font-size:22px;font-weight:700}
|
|
7
|
+
</style>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1180" height="620" fill="#fbfcfe"/>
|
|
10
|
+
<g class="font">
|
|
11
|
+
<text class="title" x="590" y="64" text-anchor="middle">Business Process Timeline</text>
|
|
12
|
+
<text class="sub" x="590" y="92" text-anchor="middle">Six staged milestones with alternating annotations and balanced spacing.</text>
|
|
13
|
+
<path class="line" d="M110 316H1070"/>
|
|
14
|
+
<g>
|
|
15
|
+
<path class="stem" d="M130 316V172"/><rect class="card" x="60" y="112" width="140" height="96" rx="8"/><text class="cardTitle" x="130" y="142" text-anchor="middle">Discover</text><text class="body" x="130" y="166" text-anchor="middle">Collect goals and</text><text class="body" x="130" y="184" text-anchor="middle">current-state pain.</text>
|
|
16
|
+
<circle cx="130" cy="316" r="34" fill="#ff6d00"/><text class="num" x="130" y="323" text-anchor="middle">01</text>
|
|
17
|
+
<path class="stem" d="M314 316V458"/><rect class="card" x="244" y="414" width="140" height="96" rx="8"/><text class="cardTitle" x="314" y="444" text-anchor="middle">Map</text><text class="body" x="314" y="468" text-anchor="middle">Identify actors,</text><text class="body" x="314" y="486" text-anchor="middle">systems, and flow.</text>
|
|
18
|
+
<circle cx="314" cy="316" r="34" fill="#00a6a6"/><text class="num" x="314" y="323" text-anchor="middle">02</text>
|
|
19
|
+
<path class="stem" d="M498 316V172"/><rect class="card" x="428" y="112" width="140" height="96" rx="8"/><text class="cardTitle" x="498" y="142" text-anchor="middle">Design</text><text class="body" x="498" y="166" text-anchor="middle">Define target</text><text class="body" x="498" y="184" text-anchor="middle">experience.</text>
|
|
20
|
+
<circle cx="498" cy="316" r="34" fill="#2f80ed"/><text class="num" x="498" y="323" text-anchor="middle">03</text>
|
|
21
|
+
<path class="stem" d="M682 316V458"/><rect class="card" x="612" y="414" width="140" height="96" rx="8"/><text class="cardTitle" x="682" y="444" text-anchor="middle">Build</text><text class="body" x="682" y="468" text-anchor="middle">Implement the</text><text class="body" x="682" y="486" text-anchor="middle">approved slice.</text>
|
|
22
|
+
<circle cx="682" cy="316" r="34" fill="#172b4d"/><text class="num" x="682" y="323" text-anchor="middle">04</text>
|
|
23
|
+
<path class="stem" d="M866 316V172"/><rect class="card" x="796" y="112" width="140" height="96" rx="8"/><text class="cardTitle" x="866" y="142" text-anchor="middle">Validate</text><text class="body" x="866" y="166" text-anchor="middle">Test against</text><text class="body" x="866" y="184" text-anchor="middle">acceptance criteria.</text>
|
|
24
|
+
<circle cx="866" cy="316" r="34" fill="#2e7d32"/><text class="num" x="866" y="323" text-anchor="middle">05</text>
|
|
25
|
+
<path class="stem" d="M1050 316V458"/><rect class="card" x="980" y="414" width="140" height="96" rx="8"/><text class="cardTitle" x="1050" y="444" text-anchor="middle">Launch</text><text class="body" x="1050" y="468" text-anchor="middle">Release and</text><text class="body" x="1050" y="486" text-anchor="middle">monitor adoption.</text>
|
|
26
|
+
<circle cx="1050" cy="316" r="34" fill="#6a1b9a"/><text class="num" x="1050" y="323" text-anchor="middle">06</text>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Timeline Infographic Diagram Experiment
|
|
2
|
+
|
|
3
|
+
Task: DIAGRAM-TIMELINE-EXPERIMENT
|
|
4
|
+
|
|
5
|
+
## Source Inventory
|
|
6
|
+
|
|
7
|
+
- Three downloaded timeline/process infographic PDFs from Vecteezy. The converted pages mostly include site chrome, but the visible previews show horizontal timeline patterns, circular milestones, icon markers, and alternating annotation blocks.
|
|
8
|
+
|
|
9
|
+
## Element Contract
|
|
10
|
+
|
|
11
|
+
- Audience: business presentation reviewer scanning a staged process.
|
|
12
|
+
- Reading flow: left to right along a single horizontal spine.
|
|
13
|
+
- Nodes: six milestones with numbered circular markers.
|
|
14
|
+
- Annotations: alternating above and below the spine to reduce crowding.
|
|
15
|
+
- Visual constraints: milestone labels must not sit on the line, icons must be centered, and connector stems must be vertical.
|
|
16
|
+
|
|
17
|
+
## Prompt Used
|
|
18
|
+
|
|
19
|
+
Create a clean six-step process timeline infographic as SVG.
|
|
20
|
+
|
|
21
|
+
Use a horizontal spine across the center with six evenly spaced circular markers.
|
|
22
|
+
Alternate annotation cards above and below the line. Each marker has a number,
|
|
23
|
+
short title, icon placeholder, and two-line description. Use a mixed palette
|
|
24
|
+
instead of one hue: orange, teal, blue, navy, green, and violet. Keep all text
|
|
25
|
+
inside cards. Re-evaluate marker spacing, card text fit, and stem clearance
|
|
26
|
+
after rendering.
|
|
27
|
+
|
|
28
|
+
## Evaluation Findings
|
|
29
|
+
|
|
30
|
+
- Timeline references often include website chrome in downloaded PDFs; the prompt must identify the actual diagram region before copying page structure.
|
|
31
|
+
- Alternating cards reduce vertical whitespace but require strict stem alignment.
|
|
32
|
+
- Numbered circles and icons should be separated; otherwise the marker becomes visually noisy.
|
|
33
|
+
- For future rules, add a source-region extraction step before diagram generation when the PDF is a web download rather than a direct asset.
|
|
34
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Diagram Final Artifact Hygiene
|
|
2
|
+
|
|
3
|
+
Use this checklist before handing off a diagram as final.
|
|
4
|
+
|
|
5
|
+
## Keep In Final Delivery
|
|
6
|
+
|
|
7
|
+
- Accepted editable source: `.drawio`, `.mmd`, source `.svg`, or equivalent.
|
|
8
|
+
- Accepted rendered output: `.svg`, `.png`, `.pdf`, or the format requested by
|
|
9
|
+
the user.
|
|
10
|
+
- Prompt master or final prompt when it adds reusable traceability.
|
|
11
|
+
- Final QA evidence: rendered screenshot, source comparison report for
|
|
12
|
+
recreations, lint output, or visual review checklist.
|
|
13
|
+
- Short handoff note with accepted artifact paths and known residual risks.
|
|
14
|
+
|
|
15
|
+
## Archive Or Exclude
|
|
16
|
+
|
|
17
|
+
- Preview iterations such as `preview-v1.png`, `preview-v2.png`, failed renders,
|
|
18
|
+
temporary exported images, and superseded SVGs.
|
|
19
|
+
- Incremental prompts that were consolidated into a prompt master.
|
|
20
|
+
- One-off visual correction notes that are not reusable rules.
|
|
21
|
+
- Source-specific PDF/page text that should not enter the reusable prompt bank.
|
|
22
|
+
|
|
23
|
+
## Archive Rules
|
|
24
|
+
|
|
25
|
+
- Keep audit-relevant iterations in workflow evidence, an explicit archive
|
|
26
|
+
folder, or an ignored output path.
|
|
27
|
+
- Do not package or present archived iterations as final deliverables.
|
|
28
|
+
- If the user asks for traceability, link to the archive/evidence from the
|
|
29
|
+
handoff instead of mixing intermediate artifacts into the final folder.
|
|
30
|
+
- If a prompt delta becomes reusable, rewrite it as a source-free rule before
|
|
31
|
+
promoting it to the prompt bank.
|
|
32
|
+
|
|
33
|
+
## QA Checklist
|
|
34
|
+
|
|
35
|
+
- Final source and final render are geometrically equivalent.
|
|
36
|
+
- Final render passes whole-canvas visual review.
|
|
37
|
+
- Intermediate artifacts are removed from the final delivery path or clearly
|
|
38
|
+
archived.
|
|
39
|
+
- Prompt bank candidates are source-free, reusable, and validated.
|
|
40
|
+
- Handoff lists only accepted artifact paths plus evidence paths.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Mermaid Target Strategy
|
|
2
|
+
|
|
3
|
+
Task: DIAGRAM-MERMAID-TARGET-STRATEGY
|
|
4
|
+
Date: 2026-05-16
|
|
5
|
+
|
|
6
|
+
## Position
|
|
7
|
+
|
|
8
|
+
Mermaid should be supported as the default semantic diagram target for docs,
|
|
9
|
+
architecture notes, pull requests, and offline agent evidence. It is not the
|
|
10
|
+
right target for high-fidelity recreation of PDF, Lucid, or presentation assets
|
|
11
|
+
where exact geometry, icon placement, connector routing, line jumps, or manual
|
|
12
|
+
label positioning matter.
|
|
13
|
+
|
|
14
|
+
When the user asks for a recreation, the acceptance target is pixel-perfect
|
|
15
|
+
source fidelity unless they explicitly accept an approximation. In that mode,
|
|
16
|
+
Mermaid can be used only as a semantic companion artifact; it is not the
|
|
17
|
+
authoritative recreation target.
|
|
18
|
+
|
|
19
|
+
Use this target order:
|
|
20
|
+
|
|
21
|
+
1. Mermaid first when the goal is explainability, reviewability, markdown-native
|
|
22
|
+
documentation, or fast validation.
|
|
23
|
+
2. draw.io XML when the goal is editable high-fidelity layout, controlled
|
|
24
|
+
connector anchors, bend points, line jumps, rotated labels, and SVG parity.
|
|
25
|
+
3. Lucid/Lucidspark when the goal is collaborative editing, stakeholder review,
|
|
26
|
+
live boards, or use of a visual tool already owned by the team.
|
|
27
|
+
|
|
28
|
+
## Decision Matrix
|
|
29
|
+
|
|
30
|
+
| Diagram family | Mermaid fit | Recommended Mermaid type | Escalate to draw.io/Lucid when |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| Swimlane workflow | Medium | `flowchart` with subgraphs | Equal lane sizing, exact header styling, lane icons, or complex retry routing are required. |
|
|
33
|
+
| Technology roadmap | Medium | `gantt` | Cards must be staggered freely, include component icon legends, or align to a branded roadmap template. |
|
|
34
|
+
| Timeline infographic | Medium-high | `timeline` or `flowchart` | The visual is a presentation infographic with alternating cards, decorative icons, or precise spacing. |
|
|
35
|
+
| Layered enterprise architecture | Medium | `flowchart` with subgraphs | The diagram has many system cards, badges, layer rails, dense integration lines, or needs pixel-level readability. |
|
|
36
|
+
| UML state machine | High for semantics, low for recreation | `stateDiagram-v2` | The task is to recreate a reference diagram with exact arrows, labels, internal actions, history markers, or line crossings. |
|
|
37
|
+
| Sequence/integration | High | `sequenceDiagram` | Stakeholder-facing visual branding or custom swimlanes are required. |
|
|
38
|
+
| Data model | High | `erDiagram` | Crow's-foot styling, domain colors, or physical layout are part of the deliverable. |
|
|
39
|
+
|
|
40
|
+
## Mermaid Implementation Rules
|
|
41
|
+
|
|
42
|
+
- Classify the work before authoring:
|
|
43
|
+
- `semantic`: explain the idea; Mermaid is usually enough.
|
|
44
|
+
- `inspired-by-reference`: borrow structure/style; Mermaid may be enough if
|
|
45
|
+
visual fidelity is not acceptance criteria.
|
|
46
|
+
- `recreation`: reproduce the source; use draw.io/Lucid as the authoritative
|
|
47
|
+
target and validate pixel-perfect gaps.
|
|
48
|
+
- Start from a diagram contract: purpose, audience, required elements, grouping,
|
|
49
|
+
relationships, reading flow, and validation criteria.
|
|
50
|
+
- Preserve semantics over visual fidelity. If Mermaid cannot express exact
|
|
51
|
+
placement, document the approximation.
|
|
52
|
+
- Prefer native Mermaid types:
|
|
53
|
+
- `flowchart` for workflows, swimlanes, layered architecture, component maps.
|
|
54
|
+
- `gantt` for roadmaps with actual dates.
|
|
55
|
+
- `timeline` for milestone narratives.
|
|
56
|
+
- `stateDiagram-v2` for lifecycle/state logic.
|
|
57
|
+
- `sequenceDiagram` for integration order.
|
|
58
|
+
- `erDiagram` for entity relationships.
|
|
59
|
+
- Keep labels short. Mermaid text wrapping is renderer-dependent.
|
|
60
|
+
- Avoid depending on exact connector paths. Mermaid owns layout.
|
|
61
|
+
- Use subgraphs as semantic groups, not as guaranteed layout containers.
|
|
62
|
+
- Run Mermaid lint/render validation before publishing.
|
|
63
|
+
- Capture residual gaps in the experiment or evidence file.
|
|
64
|
+
|
|
65
|
+
## Escalation Rules
|
|
66
|
+
|
|
67
|
+
Escalate from Mermaid to draw.io/Lucid when any of these are acceptance criteria:
|
|
68
|
+
|
|
69
|
+
- source-reference fidelity, near-pixel recreation, or pixel-perfect recreation.
|
|
70
|
+
- exact lane sizes, timeline card positions, or layer rails.
|
|
71
|
+
- explicit connector anchors, bend counts, line jumps, or no-line-over-label guarantees.
|
|
72
|
+
- rotated labels or non-horizontal text.
|
|
73
|
+
- branded icon libraries, dense badges, or presentation-quality visual hierarchy.
|
|
74
|
+
- manual stakeholder editing in a visual canvas.
|
|
75
|
+
- rendering must match screenshots across tools, not only describe the architecture.
|
|
76
|
+
|
|
77
|
+
## Validation Strategy
|
|
78
|
+
|
|
79
|
+
For Mermaid:
|
|
80
|
+
|
|
81
|
+
- validate syntax with `orchestra diagrams lint --file <diagram.mmd>`.
|
|
82
|
+
- render to SVG where local Mermaid tooling is available.
|
|
83
|
+
- visually inspect the rendered output for nonblank content, readable labels, and
|
|
84
|
+
grouping semantics.
|
|
85
|
+
- document known loss versus the source SVG/draw.io/Lucid output.
|
|
86
|
+
|
|
87
|
+
For draw.io/Lucid:
|
|
88
|
+
|
|
89
|
+
- for recreation, compare source and output as a pixel-perfect review, not only
|
|
90
|
+
as a semantic review.
|
|
91
|
+
- keep editable source and rendered SVG equivalent.
|
|
92
|
+
- run post-render visual QA for text fit, connector endpoints, z-order, line
|
|
93
|
+
overlaps, and label clearance.
|
|
94
|
+
- capture screenshots as evidence.
|
|
95
|
+
|
|
96
|
+
## Experiment Mapping
|
|
97
|
+
|
|
98
|
+
The recent SVG experiments now have Mermaid semantic counterparts:
|
|
99
|
+
|
|
100
|
+
- `docs/diagrams/experiments/swimlane/diagram.mmd`
|
|
101
|
+
- `docs/diagrams/experiments/roadmap/diagram.mmd`
|
|
102
|
+
- `docs/diagrams/experiments/timeline/diagram.mmd`
|
|
103
|
+
- `docs/diagrams/experiments/sfdc-implementation/diagram.mmd`
|
|
104
|
+
|
|
105
|
+
These Mermaid files should be reviewed as semantic approximations, not visual
|
|
106
|
+
replacements for the SVG experiments.
|
|
@@ -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.
|