@xgent-ai/skills 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -11
- package/bin/xgent-skills.js +269 -9
- package/docs/claude-context-goal-guard.md +125 -0
- package/docs/codex-context-goal-guard.md +110 -0
- package/hooks/claude/context-goal-guard.js +139 -0
- package/hooks/claude/settings.example.json +26 -0
- package/hooks/codex/context-goal-guard.py +189 -0
- package/hooks/codex/hooks.example.json +26 -0
- package/package.json +7 -1
- package/skills/agi-mode/SKILL.md +225 -0
- package/skills/agi-mode/evals/baseline-coverage.md +96 -0
- package/skills/agi-mode/evals/scenarios.md +331 -0
- package/skills/agi-mode/evals/test_check_evidence.py +141 -0
- package/skills/agi-mode/playbooks/arena.md +47 -0
- package/skills/agi-mode/playbooks/authoring-a-skill.md +26 -0
- package/skills/agi-mode/playbooks/autonomous-run.md +39 -0
- package/skills/agi-mode/playbooks/bug-fix.md +27 -0
- package/skills/agi-mode/playbooks/design-prototype.md +41 -0
- package/skills/agi-mode/playbooks/eval.md +72 -0
- package/skills/agi-mode/playbooks/feature.md +26 -0
- package/skills/agi-mode/playbooks/forensics.md +31 -0
- package/skills/agi-mode/playbooks/hillclimb.md +73 -0
- package/skills/agi-mode/playbooks/investigation.md +29 -0
- package/skills/agi-mode/playbooks/migration-refactoring.md +27 -0
- package/skills/agi-mode/playbooks/optimization.md +27 -0
- package/skills/agi-mode/playbooks/pr-lifecycle.md +38 -0
- package/skills/agi-mode/playbooks/program.md +57 -0
- package/skills/agi-mode/playbooks/reflection.md +41 -0
- package/skills/agi-mode/playbooks/resource-cleanup.md +24 -0
- package/skills/agi-mode/playbooks/review.md +27 -0
- package/skills/agi-mode/playbooks/session-handoff.md +37 -0
- package/skills/agi-mode/playbooks/shipping.md +35 -0
- package/skills/agi-mode/playbooks/ui-delivery.md +34 -0
- package/skills/agi-mode/playbooks/unblock.md +54 -0
- package/skills/agi-mode/principles/autonomous-decisions.md +21 -0
- package/skills/agi-mode/principles/behavioral-tests.md +21 -0
- package/skills/agi-mode/principles/boundary-discipline.md +21 -0
- package/skills/agi-mode/principles/bounded-convergence.md +21 -0
- package/skills/agi-mode/principles/build-leverage.md +21 -0
- package/skills/agi-mode/principles/challenge-premises.md +21 -0
- package/skills/agi-mode/principles/complete-migrations.md +21 -0
- package/skills/agi-mode/principles/context-as-state.md +21 -0
- package/skills/agi-mode/principles/critical-path-throughput.md +21 -0
- package/skills/agi-mode/principles/domain-models-and-types.md +23 -0
- package/skills/agi-mode/principles/evidence-lifetime.md +21 -0
- package/skills/agi-mode/principles/experience-first.md +21 -0
- package/skills/agi-mode/principles/explore-alternatives.md +21 -0
- package/skills/agi-mode/principles/falsifiable-verification.md +21 -0
- package/skills/agi-mode/principles/foundations-first.md +21 -0
- package/skills/agi-mode/principles/idempotent-effects.md +21 -0
- package/skills/agi-mode/principles/information-first.md +21 -0
- package/skills/agi-mode/principles/minimize-complexity.md +21 -0
- package/skills/agi-mode/principles/outcome-ownership.md +21 -0
- package/skills/agi-mode/principles/prove-real-outcomes.md +21 -0
- package/skills/agi-mode/principles/redesign-from-constraints.md +21 -0
- package/skills/agi-mode/principles/root-cause.md +21 -0
- package/skills/agi-mode/principles/state-ownership.md +21 -0
- package/skills/agi-mode/principles/structural-learning.md +21 -0
- package/skills/agi-mode/principles/verifiable-units.md +21 -0
- package/skills/agi-mode/references/continuity.md +75 -0
- package/skills/agi-mode/references/eval-protocol.md +71 -0
- package/skills/agi-mode/references/evidence-contract.md +57 -0
- package/skills/agi-mode/references/evolution-evidence.md +71 -0
- package/skills/agi-mode/references/experiments.md +82 -0
- package/skills/agi-mode/references/reflection/divergent-reviewer.md +45 -0
- package/skills/agi-mode/references/reflection/judgment-reviewer.md +44 -0
- package/skills/agi-mode/references/reflection/synthesizer.md +39 -0
- package/skills/agi-mode/references/reflection/tooling-reviewer.md +57 -0
- package/skills/agi-mode/references/skill-evolution.md +50 -0
- package/skills/agi-mode/scripts/check_evidence.py +147 -0
- package/skills/apply-code-review/SKILL.md +53 -0
- package/skills/apply-code-review/agents/openai.yaml +4 -0
- package/skills/apply-code-review/references/record-contract.md +77 -0
- package/skills/apply-doc-review/SKILL.md +79 -0
- package/skills/apply-doc-review/agents/openai.yaml +4 -0
- package/skills/apply-doc-review/references/disposition-contract.md +57 -0
- package/skills/archify/LICENSE +22 -0
- package/skills/archify/SKILL.md +137 -0
- package/skills/archify/THIRD_PARTY_NOTICES.md +69 -0
- package/skills/archify/assets/JetBrainsMono-OFL.txt +93 -0
- package/skills/archify/assets/template.html +14937 -0
- package/skills/archify/bin/archify.mjs +2139 -0
- package/skills/archify/bin/open-artifact.mjs +86 -0
- package/skills/archify/bin/preview.mjs +653 -0
- package/skills/archify/bin/visual-check.mjs +829 -0
- package/skills/archify/brand-marks/README.md +31 -0
- package/skills/archify/brand-marks/catalog.json +131 -0
- package/skills/archify/delta/architecture-delta.mjs +1232 -0
- package/skills/archify/examples/agent-run.lifecycle.json +60 -0
- package/skills/archify/examples/agent-tool-call.workflow.json +94 -0
- package/skills/archify/examples/async-job-roundtrip.sequence.json +61 -0
- package/skills/archify/examples/brand-aware-delivery.architecture.json +47 -0
- package/skills/archify/examples/cache-miss-request.sequence.json +82 -0
- package/skills/archify/examples/checkout-platform.base.architecture.json +31 -0
- package/skills/archify/examples/checkout-platform.head.architecture.json +31 -0
- package/skills/archify/examples/dataflow-product-analytics.html +15048 -0
- package/skills/archify/examples/deployment-release.lifecycle.json +49 -0
- package/skills/archify/examples/event-stream.dataflow.json +57 -0
- package/skills/archify/examples/incident-response.workflow.json +64 -0
- package/skills/archify/examples/lifecycle-agent-run.html +14983 -0
- package/skills/archify/examples/product-analytics.dataflow.json +76 -0
- package/skills/archify/examples/production-deployment.architecture.json +71 -0
- package/skills/archify/examples/release-delivery.workflow.json +62 -0
- package/skills/archify/examples/sequence-cache-miss-request.html +15063 -0
- package/skills/archify/examples/web-app-rendered.html +15012 -0
- package/skills/archify/examples/web-app.architecture.json +46 -0
- package/skills/archify/examples/workflow-agent-tool-call-rendered.html +15054 -0
- package/skills/archify/migrations/workflow-v2.mjs +279 -0
- package/skills/archify/package-lock.json +149 -0
- package/skills/archify/package.json +39 -0
- package/skills/archify/recipes/scenarios.mjs +391 -0
- package/skills/archify/references/authoring-contract.md +247 -0
- package/skills/archify/references/brand-marks.md +65 -0
- package/skills/archify/references/delivery-contract.md +138 -0
- package/skills/archify/references/viewer-runtime.md +45 -0
- package/skills/archify/renderers/architecture/grid.mjs +62 -0
- package/skills/archify/renderers/architecture/render-architecture.mjs +1078 -0
- package/skills/archify/renderers/dataflow/README.md +104 -0
- package/skills/archify/renderers/dataflow/render-dataflow.mjs +483 -0
- package/skills/archify/renderers/lifecycle/README.md +115 -0
- package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +561 -0
- package/skills/archify/renderers/sequence/README.md +114 -0
- package/skills/archify/renderers/sequence/render-sequence.mjs +464 -0
- package/skills/archify/renderers/shared/brand-marks.mjs +563 -0
- package/skills/archify/renderers/shared/cli.mjs +218 -0
- package/skills/archify/renderers/shared/desktop-readability.mjs +26 -0
- package/skills/archify/renderers/shared/diagnostics.mjs +160 -0
- package/skills/archify/renderers/shared/engineering-profiles.mjs +157 -0
- package/skills/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
- package/skills/archify/renderers/shared/generated-validators.mjs +13 -0
- package/skills/archify/renderers/shared/geometry.mjs +1423 -0
- package/skills/archify/renderers/shared/i18n.mjs +595 -0
- package/skills/archify/renderers/shared/layout-report.mjs +40 -0
- package/skills/archify/renderers/shared/legend.mjs +217 -0
- package/skills/archify/renderers/shared/output-path.mjs +340 -0
- package/skills/archify/renderers/shared/repository-evidence.mjs +239 -0
- package/skills/archify/renderers/shared/repository-location.mjs +58 -0
- package/skills/archify/renderers/shared/text-fit.mjs +49 -0
- package/skills/archify/renderers/shared/utils.mjs +232 -0
- package/skills/archify/renderers/shared/validator.mjs +86 -0
- package/skills/archify/renderers/workflow/README.md +223 -0
- package/skills/archify/renderers/workflow/render-workflow.mjs +35 -0
- package/skills/archify/renderers/workflow/workflow-compiler.mjs +4400 -0
- package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
- package/skills/archify/schemas/README.md +211 -0
- package/skills/archify/schemas/architecture.schema.json +178 -0
- package/skills/archify/schemas/common.schema.json +115 -0
- package/skills/archify/schemas/dataflow.schema.json +243 -0
- package/skills/archify/schemas/lifecycle.schema.json +266 -0
- package/skills/archify/schemas/sequence.schema.json +223 -0
- package/skills/archify/schemas/workflow.schema.json +428 -0
- package/skills/archify/scripts/check-render-output.mjs +916 -0
- package/skills/archify/scripts/check-update.mjs +1667 -0
- package/skills/archify/scripts/generate-brand-marks.mjs +141 -0
- package/skills/archify/scripts/generate-validators.mjs +66 -0
- package/skills/archify/scripts/render-examples.mjs +26 -0
- package/skills/archify/scripts/update-contract.mjs +182 -0
- package/skills/archify/skill-release.json +10 -0
- package/skills/archify/test/adaptive-reader-layout.test.mjs +86 -0
- package/skills/archify/test/animation.test.mjs +179 -0
- package/skills/archify/test/architecture-compare-recovery.test.mjs +157 -0
- package/skills/archify/test/architecture-delta-markers.test.mjs +137 -0
- package/skills/archify/test/architecture-delta.test.mjs +705 -0
- package/skills/archify/test/artifact-receipt-flush.test.mjs +126 -0
- package/skills/archify/test/authored-reachability.test.mjs +95 -0
- package/skills/archify/test/authoring-safety-contract.test.mjs +54 -0
- package/skills/archify/test/automatic-port-spread.test.mjs +376 -0
- package/skills/archify/test/base-input-compatibility.test.mjs +42 -0
- package/skills/archify/test/brand-marks.test.mjs +678 -0
- package/skills/archify/test/chapter-delta-preview.test.mjs +157 -0
- package/skills/archify/test/chapter-handoff.test.mjs +97 -0
- package/skills/archify/test/chapter-rail.test.mjs +86 -0
- package/skills/archify/test/checkout-line-endings.test.mjs +72 -0
- package/skills/archify/test/ci-scope.test.mjs +59 -0
- package/skills/archify/test/clean-skill-staging.test.mjs +440 -0
- package/skills/archify/test/cli-output-types.test.mjs +201 -0
- package/skills/archify/test/cli.test.mjs +986 -0
- package/skills/archify/test/community-proof-intake.test.mjs +125 -0
- package/skills/archify/test/cursor-onboarding.test.mjs +74 -0
- package/skills/archify/test/degraded.test.mjs +161 -0
- package/skills/archify/test/delivery-contract.test.mjs +52 -0
- package/skills/archify/test/desktop-reader-browser.test.mjs +80 -0
- package/skills/archify/test/diagram-guide.test.mjs +92 -0
- package/skills/archify/test/engineering-profile.test.mjs +209 -0
- package/skills/archify/test/export-browser.test.mjs +305 -0
- package/skills/archify/test/export-cleanup-browser.test.mjs +294 -0
- package/skills/archify/test/finder-browser.test.mjs +274 -0
- package/skills/archify/test/finder.test.mjs +104 -0
- package/skills/archify/test/fixtures/automatic-routing-node-border-clearance.workflow.json +40 -0
- package/skills/archify/test/fixtures/fail-migration-cleanup.mjs +17 -0
- package/skills/archify/test/fixtures/issue-126/custom-widths.workflow.json +18 -0
- package/skills/archify/test/fixtures/issue-126/explicit-route.workflow.json +28 -0
- package/skills/archify/test/fixtures/issue-126/explicit-viewbox.workflow.json +19 -0
- package/skills/archify/test/fixtures/issue-126/labels.workflow.json +18 -0
- package/skills/archify/test/fixtures/v1-baseline/agent-run.lifecycle.json +64 -0
- package/skills/archify/test/fixtures/v1-baseline/agent-tool-call.workflow.json +88 -0
- package/skills/archify/test/fixtures/v1-baseline/cache-miss-request.sequence.json +75 -0
- package/skills/archify/test/fixtures/v1-baseline/event-stream.dataflow.json +57 -0
- package/skills/archify/test/fixtures/v1-baseline/product-analytics.dataflow.json +70 -0
- package/skills/archify/test/fixtures/v1-baseline/production-deployment.architecture.json +71 -0
- package/skills/archify/test/fixtures/v1-baseline/web-app.architecture.json +41 -0
- package/skills/archify/test/fixtures/v1-workflow-700x400.workflow.json +22 -0
- package/skills/archify/test/fixtures/v1-workflow-explicit-coordinates.workflow.json +47 -0
- package/skills/archify/test/focus-browser.test.mjs +226 -0
- package/skills/archify/test/gallery.test.mjs +130 -0
- package/skills/archify/test/generate-validators.test.mjs +59 -0
- package/skills/archify/test/generate-viewer.test.mjs +165 -0
- package/skills/archify/test/generated-artifact-xml.test.mjs +88 -0
- package/skills/archify/test/geometry.test.mjs +739 -0
- package/skills/archify/test/golden.mjs +207 -0
- package/skills/archify/test/grid.test.mjs +47 -0
- package/skills/archify/test/guide-page.test.mjs +85 -0
- package/skills/archify/test/guide.test.mjs +81 -0
- package/skills/archify/test/guided-views-browser.test.mjs +460 -0
- package/skills/archify/test/guided-views.test.mjs +144 -0
- package/skills/archify/test/helpers/desktop-browser.mjs +48 -0
- package/skills/archify/test/helpers/offline-fonts.mjs +76 -0
- package/skills/archify/test/helpers/viewer-click.mjs +72 -0
- package/skills/archify/test/helpers/xml.mjs +37 -0
- package/skills/archify/test/i18n.test.mjs +422 -0
- package/skills/archify/test/intent-trace-browser.test.mjs +284 -0
- package/skills/archify/test/intent-trace.test.mjs +111 -0
- package/skills/archify/test/landing.test.mjs +97 -0
- package/skills/archify/test/layout-rules.test.mjs +1498 -0
- package/skills/archify/test/legend-contract.test.mjs +404 -0
- package/skills/archify/test/motion-governor-browser.test.mjs +342 -0
- package/skills/archify/test/motion-governor.test.mjs +111 -0
- package/skills/archify/test/offline-font-browser.test.mjs +210 -0
- package/skills/archify/test/offline-self-containment.test.mjs +80 -0
- package/skills/archify/test/open-artifact.test.mjs +118 -0
- package/skills/archify/test/ordinary-model-floor.test.mjs +1052 -0
- package/skills/archify/test/output-path.test.mjs +587 -0
- package/skills/archify/test/presentation.test.mjs +71 -0
- package/skills/archify/test/preset-tryon.test.mjs +113 -0
- package/skills/archify/test/preview-contract.test.mjs +40 -0
- package/skills/archify/test/preview.test.mjs +530 -0
- package/skills/archify/test/proof-aperture.test.mjs +78 -0
- package/skills/archify/test/reach-share-card.test.mjs +149 -0
- package/skills/archify/test/reader-layout-browser.test.mjs +320 -0
- package/skills/archify/test/readme-showcase.test.mjs +319 -0
- package/skills/archify/test/real-repository-proof.test.mjs +209 -0
- package/skills/archify/test/relationship-direct-explorer.test.mjs +115 -0
- package/skills/archify/test/relationship-lens.test.mjs +128 -0
- package/skills/archify/test/relationship-permalink.test.mjs +130 -0
- package/skills/archify/test/relationship-pulse.test.mjs +122 -0
- package/skills/archify/test/release-identity.test.mjs +476 -0
- package/skills/archify/test/release-package-gates.test.mjs +750 -0
- package/skills/archify/test/render-output-checks.test.mjs +588 -0
- package/skills/archify/test/renderer-diagnostic-boundary.test.mjs +107 -0
- package/skills/archify/test/repair-receipt.test.mjs +181 -0
- package/skills/archify/test/repository-evidence-replacement.test.mjs +136 -0
- package/skills/archify/test/repository-evidence.test.mjs +605 -0
- package/skills/archify/test/repository-language-metadata.test.mjs +67 -0
- package/skills/archify/test/route-journey.test.mjs +125 -0
- package/skills/archify/test/route-probe-browser.test.mjs +363 -0
- package/skills/archify/test/route-probe.test.mjs +114 -0
- package/skills/archify/test/route-share-card.test.mjs +163 -0
- package/skills/archify/test/semantic-camera.test.mjs +88 -0
- package/skills/archify/test/semantic-flow.test.mjs +90 -0
- package/skills/archify/test/semantic-legend-gateway.test.mjs +156 -0
- package/skills/archify/test/semantic-lens-browser.test.mjs +372 -0
- package/skills/archify/test/semantic-lens.test.mjs +103 -0
- package/skills/archify/test/semantic-passport.test.mjs +99 -0
- package/skills/archify/test/semantic-radar.test.mjs +735 -0
- package/skills/archify/test/semantic-zoom.test.mjs +86 -0
- package/skills/archify/test/sequence-column-fit.test.mjs +137 -0
- package/skills/archify/test/settled-flow.test.mjs +97 -0
- package/skills/archify/test/share-card-export.test.mjs +132 -0
- package/skills/archify/test/site-language-continuity.test.mjs +569 -0
- package/skills/archify/test/site-language-integration.mjs +9 -0
- package/skills/archify/test/skill-metadata.test.mjs +84 -0
- package/skills/archify/test/stable-update-manifest.test.mjs +167 -0
- package/skills/archify/test/start-page.test.mjs +312 -0
- package/skills/archify/test/story-beat-navigator.test.mjs +103 -0
- package/skills/archify/test/story-carrier.test.mjs +90 -0
- package/skills/archify/test/story-director-strip.test.mjs +91 -0
- package/skills/archify/test/story-follow-camera.test.mjs +103 -0
- package/skills/archify/test/story-horizon.test.mjs +91 -0
- package/skills/archify/test/story-moment-link.test.mjs +93 -0
- package/skills/archify/test/story-shelf.test.mjs +84 -0
- package/skills/archify/test/story-trail.test.mjs +81 -0
- package/skills/archify/test/toolbar-polish.test.mjs +57 -0
- package/skills/archify/test/update-contract.test.mjs +133 -0
- package/skills/archify/test/update-notifier.test.mjs +3317 -0
- package/skills/archify/test/v1-compatibility.test.mjs +329 -0
- package/skills/archify/test/vertical-edge.test.mjs +68 -0
- package/skills/archify/test/viewer-camera-browser.test.mjs +395 -0
- package/skills/archify/test/viewer-chrome-layout.test.mjs +1104 -0
- package/skills/archify/test/viewer-identifiers-browser.test.mjs +135 -0
- package/skills/archify/test/visual-check.test.mjs +400 -0
- package/skills/archify/test/webm-artifact.smoke.mjs +1855 -0
- package/skills/archify/test/workflow-compiler-hard-contract.test.mjs +2136 -0
- package/skills/archify/test/workflow-compiler.test.mjs +1163 -0
- package/skills/archify/test/workflow-migration.test.mjs +620 -0
- package/skills/archify/test/workflow-semantic-contract.test.mjs +131 -0
- package/skills/architect/SKILL.md +83 -0
- package/skills/architect/references/design-red-flags.md +33 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/SKILL.md +13 -0
- package/skills/automate-me/SKILL.md +104 -0
- package/skills/autoresearch/SKILL.md +14 -0
- package/skills/debugging/SKILL.md +279 -0
- package/skills/dev-plan/SKILL.md +25 -18
- package/skills/dev-plan/references/execution-workflow.md +8 -61
- package/skills/dev-plan/references/plan-skeleton.md +43 -28
- package/skills/dev-plan/scripts/check_progress.sh +5 -1
- package/skills/documentation-writer/SKILL.md +204 -0
- package/skills/documentation-writer/assets/templates/ARCHITECTURE.md +49 -0
- package/skills/documentation-writer/assets/templates/CONCERNS.md +56 -0
- package/skills/documentation-writer/assets/templates/CONVENTIONS.md +52 -0
- package/skills/documentation-writer/assets/templates/FEATURES.md +43 -0
- package/skills/documentation-writer/assets/templates/INTEGRATIONS.md +48 -0
- package/skills/documentation-writer/assets/templates/STACK.md +56 -0
- package/skills/documentation-writer/assets/templates/STRUCTURE.md +44 -0
- package/skills/documentation-writer/assets/templates/TESTING.md +57 -0
- package/skills/documentation-writer/references/api-docs.md +185 -0
- package/skills/documentation-writer/references/architecture.md +134 -0
- package/skills/documentation-writer/references/codebase-map.md +113 -0
- package/skills/documentation-writer/references/inquiry-checkpoints.md +78 -0
- package/skills/documentation-writer/references/readme.md +89 -0
- package/skills/documentation-writer/references/stack-detection.md +134 -0
- package/skills/documentation-writer/references/user-manual.md +103 -0
- package/skills/documentation-writer/references/writing-style.md +220 -0
- package/skills/documentation-writer/scripts/check_doc.py +273 -0
- package/skills/documentation-writer/scripts/scan.py +712 -0
- package/skills/elintp/SKILL.md +27 -1
- package/skills/figure-it-out/SKILL.md +53 -0
- package/skills/gdpr-compliant/SKILL.md +283 -0
- package/skills/gdpr-compliant/references/Security.md +266 -0
- package/skills/gdpr-compliant/references/data-rights.md +177 -0
- package/skills/how/SKILL.md +58 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +52 -0
- package/skills/humanize-writing/SKILL.md +417 -0
- package/skills/humanize-writing/references/ai-tells.md +291 -0
- package/skills/kpi-dashboard-design/SKILL.md +103 -0
- package/skills/landing-page-conversion-audit/SKILL.md +122 -0
- package/skills/meeting-minutes/SKILL.md +235 -0
- package/skills/portal-app-exchange/SKILL.md +8 -17
- package/skills/portal-dev-setup/SKILL.md +137 -46
- package/skills/portal-dev-setup/puller.env.example +3 -2
- package/skills/portal-dev-setup/references/kafka.md +140 -0
- package/skills/portal-dev-setup/references/troubleshooting.md +22 -26
- package/skills/portal-dev-setup/scripts/onebox.sh +510 -56
- package/skills/portal-external-app/SKILL.md +57 -21
- package/skills/portal-external-app/references/contract-doc-template.md +1 -1
- package/skills/portal-external-app/references/integration-contract.md +4 -4
- package/skills/portal-external-app/references/public-entrypoints.md +100 -0
- package/skills/portal-external-app/references/quota-and-seats.md +12 -31
- package/skills/portal-external-app/references/registration-and-onebox.md +67 -11
- package/skills/portal-micro-app/SKILL.md +18 -28
- package/skills/portal-micro-app/references/manifest-and-acl.md +21 -3
- package/skills/portal-micro-app/references/open-api-and-extensions.md +1 -1
- package/skills/portal-micro-app/references/sdk-reference.md +1 -1
- package/skills/prd/SKILL.md +56 -38
- package/skills/prd/references/prd-skeleton.md +72 -34
- package/skills/prd/references/product-quality.md +89 -0
- package/skills/prd/references/spms-mapping.md +9 -7
- package/skills/react/SKILL.md +26 -4
- package/skills/react/references/actions.md +251 -0
- package/skills/react/references/data-fetching.md +25 -1
- package/skills/react/references/react19-migration.md +407 -0
- package/skills/reflect/SKILL.md +13 -0
- package/skills/review-code/SKILL.md +63 -0
- package/skills/review-code/agents/openai.yaml +4 -0
- package/skills/review-code/references/git-scopes.md +38 -0
- package/skills/review-code/references/report-contract.md +56 -0
- package/skills/review-code/references/review-lenses.md +33 -0
- package/skills/review-dev-plan/SKILL.md +88 -0
- package/skills/review-dev-plan/agents/openai.yaml +4 -0
- package/skills/review-dev-plan/references/report-contract.md +59 -0
- package/skills/review-dev-plan/references/review-lenses.md +82 -0
- package/skills/review-prd/SKILL.md +84 -0
- package/skills/review-prd/agents/openai.yaml +4 -0
- package/skills/review-prd/references/report-contract.md +64 -0
- package/skills/review-prd/references/review-lenses.md +82 -0
- package/skills/review-prd-dev-gaps/SKILL.md +84 -0
- package/skills/review-prd-dev-gaps/agents/openai.yaml +4 -0
- package/skills/review-prd-dev-gaps/references/report-contract.md +72 -0
- package/skills/security-audit/SKILL.md +191 -0
- package/skills/security-audit/references/language-patterns.md +221 -0
- package/skills/security-audit/references/report-format.md +194 -0
- package/skills/security-audit/references/secret-patterns.md +178 -0
- package/skills/security-audit/references/vuln-categories.md +288 -0
- package/skills/security-audit/references/vulnerable-packages.md +111 -0
- package/skills/sql-optimization/SKILL.md +296 -0
- package/skills/summarize/SKILL.md +1 -0
- package/skills/swarm/references/teams/product.md +2 -2
- package/skills/tdd/SKILL.md +42 -0
- package/skills/teach/SKILL.md +21 -0
- package/skills/test-plan/SKILL.md +12 -11
- package/skills/test-plan/references/case-taxonomy.md +3 -2
- package/skills/why/SKILL.md +158 -0
- package/skills/why/references/epistemics.md +144 -0
- package/skills/why/references/investigator-prompt.md +103 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/code-archaeology.md +88 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +99 -0
- package/skills/why/references/sources/incident-postmortem.md +15 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/sentry.md +100 -0
- package/skills/why/references/sources/slack.md +54 -0
- package/skills/why/references/synthesizer-prompt.md +135 -0
- package/skills/xgent-app-release/SKILL.md +97 -28
- package/skills/xgent-app-release/references/build-and-package.md +8 -3
- package/skills/xgent-app-release/references/embed-csp.mjs +126 -0
- package/skills/xgent-app-release/references/frontend-archive.md +67 -0
- package/skills/xgent-app-release/references/public-delivery.md +75 -0
- package/skills/xgent-app-release/references/publish-api.md +62 -56
- package/skills/xgent-app-release/references/troubleshooting.md +18 -2
- package/skills/xgent-app-release/references/verify-preflight.mjs +50 -0
- package/skills/xgent-app-release/scripts/npm-token.mjs +8 -3
- package/skills/xgent-app-release/scripts/preflight.mjs +13 -2
- package/skills/xgent-init/SKILL.md +23 -82
- package/skills/xgent-init/references/external-app-AGENTS.template.md +149 -0
- package/skills/xgent-init/references/fill-guide.md +10 -22
- package/skills/xgent-init/scripts/check-docs.mjs +14 -86
- package/vendor/impeccable/VERSION.json +10 -16
- package/vendor/impeccable/bundle/blobs/{daa2a8ecd874f9f940dfd72aaa329318b06bb9be25515be85fea84c871b637a6 → 00c067253d37cd20a41dbe9c806d6a72cbff983ad1418b3c3e447998f577b9c2} +18 -11
- package/vendor/impeccable/bundle/blobs/{4ce929b8cafd37247ea4c148bbe39a9afe15908d1abf4a8248c5122275d16499 → 00d167d9183c8d0c6c0682055107382e6672bacf7a712de0abc8f157c2cb2210} +3 -2
- package/vendor/impeccable/bundle/blobs/{a9515f6f084d8f51c378eb3cdc6db1f12e06dba2d32fc61b7ee7950fa2586f2e → 016c082dcd2aa8f3c080a757c8ed335c6070a904bd2f39668bb9d3e6f95929c1} +1 -1
- package/vendor/impeccable/bundle/blobs/0221a193d111a9de33a785706a603e55dd974a115f549dbdf74e0f9ec72bde7d +101 -0
- package/vendor/impeccable/bundle/blobs/055c571f2960b8f929d6a8d3806a4d32dfcb9750b3ef8b60adc8930fff34b559 +101 -0
- package/vendor/impeccable/bundle/blobs/{3aa908c18db91d5f31d6bba6402eab6afc4e0b75137f841a86bd012386e0d8e2 → 0605c8729dc638a46798e90ab12486fe3ae3372a869757cfb387a08e23b3c84a} +18 -11
- package/vendor/impeccable/bundle/blobs/{ec58806f16fc7ba29bccef08f2e158cd00be077ce05d45e943a59bd26dc6dc55 → 0648e4e06d01cabc91fa7dc19256ceedeeeea213b9265e9d36b0918370e16fb2} +6 -0
- package/vendor/impeccable/bundle/blobs/06b20bd42e5682a42c5d6fbfaad4c55e66ff9b9d99a604bd31d3545af120fc2d +101 -0
- package/vendor/impeccable/bundle/blobs/{420e2fdee2b7f555d9a37ce348cf62610ddd98f96b1a0a511796ba600881588c → 08346755b13f1a3f7c6fb4e512387884b80467aaeff109fd41f5521d2a95635a} +3 -1
- package/vendor/impeccable/bundle/blobs/{8f651cb1f8cde0acc5cc511b77fddd98558a527f54974698a1650b0fd7e849a7 → 08398fa2d8e2b06b849f1c0f032e1e93b832e9294aed35c1c7f62b938d62ee80} +1 -1
- package/vendor/impeccable/bundle/blobs/087f6715114e901c2ce00b438e75b82fd48978c020a782f3dc361d39eb7198a6 +26 -0
- package/vendor/impeccable/bundle/blobs/{bc7a5128cfed46148396c08798b6b9429406fbe477e84e331a36ee2840b6b776 → 09310582ed23393b171eb99ad4a288cc422ac53c26d76311586ce54c6df77b22} +3 -1
- package/vendor/impeccable/bundle/blobs/{633903ba7cb38ed502448a66691fbf655805786a2f06be67043f12294ad08e86 → 0bc2bc36ca6e74f9f610392f1a4fb8f57b2676238ba1f9c65cd8714f5d27e8a2} +5 -0
- package/vendor/impeccable/bundle/blobs/0c064c9975f25f6eb5cf7911c2eeafd3e695d729f8c86a49a24ff2d76cb3cd94 +63 -0
- package/vendor/impeccable/bundle/blobs/{4a7d8695741e2cd354baada215b06798c050aa7a8e1ca6814f0e395e054d1ab1 → 0ccf57f758eb0d53bc32c5c77156f016e528d20fe2c2740662bf19964dfbb00b} +18 -11
- package/vendor/impeccable/bundle/blobs/0dd1e6ccf053cb80e057caf7bf2fef30fd0197a41d907a1a8d2d2d02f6978674 +63 -0
- package/vendor/impeccable/bundle/blobs/{943b0d7c9ce4f6802d8440a07b2ad3c61cbd1cc00ab63962bab7eea9ca584d20 → 0ed5986d1503399f48c11104df5e523a63be2d6558770ebfbbeb2323ca3f2ad3} +5 -5
- package/vendor/impeccable/bundle/blobs/14c9c9a7816026dd77494d06b8d1777c8d64785126b0c9ac8db5ebd996dfd6b6 +101 -0
- package/vendor/impeccable/bundle/blobs/{54cb270e8826380caefc8c40642a5d973f27df46bfdb762d822541a0c72a9877 → 14ef0ab84c10331f8af6b4124387a3f80b493175a04a3f89200719b4b5aea221} +18 -11
- package/vendor/impeccable/bundle/blobs/{6abbf5979db5cb1d7965bf5f91d589e984843069c587f4d1e63aab135bbace0f → 1547005438784032de3254cb35bff393e8187d7a459d0c20a693d9bfb0b5c1a4} +5 -0
- package/vendor/impeccable/bundle/blobs/162b814ddd1133923b9584bb95f85959e64844c94341d6bf10a81c06ab7cc02c +101 -0
- package/vendor/impeccable/bundle/blobs/16498466a97a5b19a593d5b3f245468c71784bea069d7fc8aa9690db5ac1d968 +29 -0
- package/vendor/impeccable/bundle/blobs/{b31ff29c7a1ea979c6d039f7e8d17007410697ab49536690dca109f0af3f20f8 → 16ba7fca1973c5faf53dd2ca523559129c0fe9e5f8d50b645f527afa78186cd2} +9 -0
- package/vendor/impeccable/bundle/blobs/1725ca4aa546a34770f29191b58bf8dc14957d4258fb9e7d02f7b1c59c412ea4 +63 -0
- package/vendor/impeccable/bundle/blobs/{598bfed550954471ba4d257d46b4d608cd82e4cdbf36d07bf93c5f4a563f7727 → 1898529e994bf0a31ee9ff3f87c343caea3d8a7e0986f404e129fbf89078ade0} +4 -3
- package/vendor/impeccable/bundle/blobs/{6e20041e209e8705d14aa9c4fb8cca3f0d743791de633785e5b46e2dd1ff1a6b → 19b439d7d16e139357459d3874f739ea94dbdffeb2a0e201df1620ed1e40574d} +1 -1
- package/vendor/impeccable/bundle/blobs/{04af9f2d6883fe76f9539d310d9c369052822a24886d2c330ab1e3fe5981c8a1 → 1b289c8c09de9d4442109ada91b1fa3a190e113a310cab7aa26a3633c5df0bb0} +1 -1
- package/vendor/impeccable/bundle/blobs/{eb3213b9c9f4d6b2f153e7b457f13aa131bcf633695229dad4eac39a920bdf38 → 1bb3bdce54386e96e21b5956713a80583e6b3b9d1170f3bb8dec3819fa341bc3} +5 -5
- package/vendor/impeccable/bundle/blobs/{e71d6b97680084a7ccec01844e658cbd2042aec00da0c91bec62a240ad7dcf6a → 1c11cb8ea42536c7a51e197f1aa32198960bb89262da2eaf32e0feb03c70792c} +18 -11
- package/vendor/impeccable/bundle/blobs/{f0c4d0615c7d520dfc2536c01cc7f1f3aab9b60ddc399ba01289fe62edb12370 → 1c6258015ed02c522948f8f1a3b6457395a8f7954497b87c1cd83f1791f9f819} +1 -1
- package/vendor/impeccable/bundle/blobs/{27c4b6c90ad12a186136f9ece9cb1830d4a6e36b11382ab334efc4543f8082de → 1d7145fd5bf65282b2e05cf42faf41766d68e83e2b75f460b3b62d81ada5e5d7} +18 -11
- package/vendor/impeccable/bundle/blobs/{1484a7ae206ab4f0e6262b21afe0f6307a629ed27d28fb7de69536a6800a4883 → 1e2f696760ee55fb154bdcc302c7d7b0fbb807e0308130594bd892dae14dc9ea} +5 -0
- package/vendor/impeccable/bundle/blobs/{6989120346e87907d59cc6d4708dd9dee29227ad583fbefee28935395b68ce34 → 1f6c3a1d7344f44eaa88b6f38334ad7d7b60201709589039a58cee73de486f5d} +1 -1
- package/vendor/impeccable/bundle/blobs/207d443cabe4e6fe1351f91785748957f757bf1e7aeca405433c0329dad46a15 +63 -0
- package/vendor/impeccable/bundle/blobs/{f7916d0113da7a19d4e03c113d5563d181457e44f1646ecab9191cfee5ae776d → 20e2111b3e065e8e8054f715ea3902e64b77886b30d2bddee723558f22942620} +4 -3
- package/vendor/impeccable/bundle/blobs/21e78c8a77badb3f83290cd4577ed3b24bd4dd3b57136d7da75733d4f3ee9ac0 +19 -0
- package/vendor/impeccable/bundle/blobs/{0f83648f6b425225290305bced51eacebacf9bf9bc05e21cdbad46863fbc89ce → 223f08673b267f81d7586f686afe05d7cd7529a8e11ac37d979f95c2ceaae8ce} +1 -1
- package/vendor/impeccable/bundle/blobs/2499b18f26639694344ca95682f47c65494f730cfff88aa9bd2aa83a22e5926d +101 -0
- package/vendor/impeccable/bundle/blobs/{074575671f24cf4298d06f0019f76e94f62e9a6ed205fce05b8e507341e64266 → 26cd88d10f8a14ed0ddb6e6b21e5e2c981f410eac93afa179202c354d7d1c0d5} +3 -1
- package/vendor/impeccable/bundle/blobs/{5f24c5a97b4ffcabc7c432b064cfdd04c7a2ad52f52e765be648dc0aadab8f38 → 275dd1b6e63bbd30d2713227c4f79b880a8bc4e01cc48d392068bb86939d3afa} +1 -1
- package/vendor/impeccable/bundle/blobs/{356cfa0ebf61589cf5d52691d101a69d69256062fe1d11d71d95d41a78289cbd → 28f65b42c1ce9aaea35dc37a51257d7c703bb7f6553ebe3b8ca238a1007251e0} +3 -1
- package/vendor/impeccable/bundle/blobs/{a1dbde501ffabb50f30f28f2de6755b5e91b3d4028292c5a3abd3358106eb457 → 2ac1624b1253f3b6fcf2da54d54293624176539b2e9609a49245e7e46c65ca5f} +5 -0
- package/vendor/impeccable/bundle/blobs/{3895765e9434400dfc1b30e364be002cf499c1718fb2431e65b907c14ae2cb27 → 2b9379cdb329890eebe2384fbaa23f771745f30d8cfc43e180ebd092e69bcd2f} +4 -3
- package/vendor/impeccable/bundle/blobs/{1a9180cec754f8afd354e7cb759750247e97c5bd26d3242ad4c45e315069e8c0 → 2bc5d62463cc83d6417df7b8f4a02b4135e2b1bb654aa7727890662496f86e3d} +5 -0
- package/vendor/impeccable/bundle/blobs/2ce1722bd1a9f366182d9357d629796b1448f7a0126a854df507eb044d891cab +26 -0
- package/vendor/impeccable/bundle/blobs/{e21af575fcc0f1df54ae422bea4dfa1e5211422606908919f6a86e19e0d5c20c → 3149a87bbed84bffe3558d5eaf1dc596b2e84d3c1be290fc7b1c13e481ae0803} +4 -3
- package/vendor/impeccable/bundle/blobs/3253eab02b62efa80abc74a5c85da08f3e2c6c20dff8dec38f4d236cbbfa0f3c +63 -0
- package/vendor/impeccable/bundle/blobs/{38c2e839e130008b6da814ab9c16f3fcbbedfdf721a9638eebd31a9e65341a7a → 37680abf9a8e446619fcd33862718f483d197bf2652f966adca8dc54d2909b9d} +3 -2
- package/vendor/impeccable/bundle/blobs/385a0efe833bd4afe4a257e7159590de0cf1b7fd8f7b213b732f1e537c62dab7 +21 -0
- package/vendor/impeccable/bundle/blobs/{8a1c872773996dfa1c1eb765ac7ed8e8d41f99d4f12f090b4725b694e85eaa62 → 3898bd9b56a042e860a0db4fb4dd81ac81126fa218b604702e2ac0c2287ae09b} +9 -0
- package/vendor/impeccable/bundle/blobs/3b2b60f23fa8ed9d73e721e17142c3933dc5318fa9a251742a76fee890ac81a8 +26 -0
- package/vendor/impeccable/bundle/blobs/3bd55b35c253f7841ca4e6e1a855a4b477d59aa2daf6e61e93fd685caaaff131 +63 -0
- package/vendor/impeccable/bundle/blobs/{dde1b74aeab3d90320e134f0ed0422bef99917dcab4c1749aa1720a2c94f725f → 3bed76a0d528e2d73da8acae4dc63702bdb5baca5ab11600d70e75fc9f2ba90b} +5 -0
- package/vendor/impeccable/bundle/blobs/{9b2fc50c5062073d097140cde85602bba181e325ec6b9eea1bd3da74582acb9d → 3ef9a43006bc68d83bc958fc8401e59f9beb6379048f5ced047747fdad05b895} +5 -5
- package/vendor/impeccable/bundle/blobs/{30e006fdee873bac23edaeadce0371161625e021e3cf442dff4b05bb82297ba1 → 400419aaa20f710e1a7e5ca1fce9e8bc995c4db84053f40cf778d987619e0210} +1 -1
- package/vendor/impeccable/bundle/blobs/40cd6024312a1339aa66801df533afa543e60c36e708f0f9659dd8d558f83dce +63 -0
- package/vendor/impeccable/bundle/blobs/{55e95137b3f9198c1d4dfc425366b82f1ef5f77d602682b2edf91f2ce9296289 → 412dd9a5238aee223397591fe49b3bd27b6b53d649a0e67ed8570f3e199cebb9} +1 -1
- package/vendor/impeccable/bundle/blobs/{181e814c1b9317098b2300c1b02ad0d137b6d82bd1e7e8cc64de4d00b4c50c25 → 41ef23c048ab739f48afdce26a2678d36ee40bcced34ef4b969d1d8ffafca64c} +3 -1
- package/vendor/impeccable/bundle/blobs/{edddeb3fad88adec9a055b1bf9d5c75418cbe97a13b1a7f6765e73249e482563 → 42831c3cd874346d8e7f120808d91e6ed3cda5c3eca6eefd76b126659536bc87} +5 -1
- package/vendor/impeccable/bundle/blobs/{e3c331cc21d9a216e25e08628610ea99c97e150893c3d26e5c0cecc532f26d7b → 43dbfcb7c2e54c9cca9fce66024f17c06a2f2be645547b718b75c8828a463de2} +1 -1
- package/vendor/impeccable/bundle/blobs/4435529820c3fc2eceae8b1ee35c906a34c7612fb860117e896152b45aee0770 +26 -0
- package/vendor/impeccable/bundle/blobs/44a60aedcc350c2d7d501d0f830a31a586a6511a9ff9b4e361cb328bb747339d +101 -0
- package/vendor/impeccable/bundle/blobs/{c6a0ec6c28ae55fe539f0f41a507b1638495afd285d6eb15c00245fc8cc7e7fe → 45dcea8da47cc21f447041daa942cf5d92cddde9a5a02c196cedbd159c829304} +5 -0
- package/vendor/impeccable/bundle/blobs/{015725eeca94f52bffd2132d4cb49bc3eb1ee76e6ac7378c065e629d59f56613 → 4700adf4542874f204c680ebad8317a97bf7169dbc04147082618ab59ce70c7d} +3 -2
- package/vendor/impeccable/bundle/blobs/4777bbeaff2efcd6a2a66b07aacaaf57cd32f3fab1c1da5a0513937fafb48bd1 +63 -0
- package/vendor/impeccable/bundle/blobs/{b6022a8c7200e96b0b55c2ff599a01d64123a2f5fe01557d4ca5192a6e0f0b0c → 484ea165f6d49ecc15b7a5c5623e377f2e203f4dad366df23eae99255ecf4572} +18 -11
- package/vendor/impeccable/bundle/blobs/485774d58dfd5796956024cdd9c12f05e692a3703f70b12a02ab43918885c3fd +101 -0
- package/vendor/impeccable/bundle/blobs/{3bf5d8661351831dbb2195e3b677fea1f128ca319c0589d538b66d9c9d7dddbc → 488da2e7406c6b4b5c92d7bc8cbd370cdaafc82a5f3ab5adbcffb21d1d1c4df4} +3 -1
- package/vendor/impeccable/bundle/blobs/{6f1d52863482fa0f6fff877f0cc8f6dd0b4230d28050b0d267e082776e61a332 → 492a8030d11e2f4908d934bd817bd6d16a3164056c74a7172f60e2cec5ff3055} +5 -0
- package/vendor/impeccable/bundle/blobs/{51e2f8963377f142ebdc9864e0ecc5aa1e5b7d344ed72d0e9d748d2d3d8c71b3 → 4972f28d96897c8dec891f0de7a0d9d51f36030ff780ed9d960241c75413da2b} +5 -5
- package/vendor/impeccable/bundle/blobs/4a6f0386bff78bb42efa285df2919e75209ec336672cf5fff91ba66ffb352eaa +63 -0
- package/vendor/impeccable/bundle/blobs/{12c1afcd15e86d840b89a78c6d17ce6d1b5609bac713d59271c6ab5932975dac → 4e3cc4d0e229ca96dd2e28fb2da0478a7f0bb64e447d07a652c425d8fbc57573} +3 -1
- package/vendor/impeccable/bundle/blobs/4ea8e05d0f88d24f182ad554da84317f90b9730e29fad262143ddf423a1f8645 +26 -0
- package/vendor/impeccable/bundle/blobs/{402656ca6df17bad1cd55ede0a966a7bb5b187cf4f89c517851f9efe7f14c0fd → 50d4b14134fc06daeac0aab6960800f171ef85250d3bcce6f246cf81e824463f} +3 -2
- package/vendor/impeccable/bundle/blobs/{43852ca5917de66704f73f9019d15482bb1efd92f2eefaeeeae23610b4c0c6a0 → 50f3b5714ca3e2c1bcf070003733407935ee050609d3123c2c065489fbc9950b} +5 -0
- package/vendor/impeccable/bundle/blobs/{f597742c8e5562263d3bce725cb55e920d8c2c60223f41a632d523ca30cdd12b → 51032bb883137007127d30189b44b516d0e6140271bf5881da7eca76f8bd282c} +3 -1
- package/vendor/impeccable/bundle/blobs/{13bd27aa8573e6d45d8bbf9f3fc991e4719d28a7e8f709009a4a5a49a227fff3 → 511ecde67e6bd976c9bdfa8d92f0dba359621344f8135c2a5ce5a66b385a4cb5} +5 -0
- package/vendor/impeccable/bundle/blobs/514a27fc9830455828d337cfc2fa95fa86be8e5464501bbabb9aca09a66b40ad +63 -0
- package/vendor/impeccable/bundle/blobs/{78ac93689928a580c2f90242cbaa96dda3fa4e55ff1f1d00e412b2a62ad85232 → 529cb2ace696ec11a86f4b010c9b137acf282072e483932181be1871df2aa690} +18 -11
- package/vendor/impeccable/bundle/blobs/53628d05b7eff0d4f48b95e48fad40266452fe1b42f398bd88dd9328353e0dd8 +101 -0
- package/vendor/impeccable/bundle/blobs/{00023f9e7f2e27604fde978b56510a8f837b76eeadd93221d11adcf4c98f1a10 → 53de37260c4f1c37e467557e9b038faa0f285b056bb2b95f435e0a7d1b69b0de} +3 -2
- package/vendor/impeccable/bundle/blobs/{0dbbef70048cc3ae44e6710ff09992ce14ad049ce8ed519b0ff8a1ddb4633f4e → 5415103ca4422ea1422e23bfe9f9bae181f5d6d6407442f7fba31856ada58d12} +3 -1
- package/vendor/impeccable/bundle/blobs/{af34b8af89edb10e228c0482754423f48238fce816eceb8703b8781c130da54e → 56285b28b0ffe471761c2ad062d3f933ed2346ca1b617f1323a30fed99a1a852} +1 -1
- package/vendor/impeccable/bundle/blobs/{12fefe52d80d25014e5f7e2f9b278275a675653d3d99ae8f0ecf344cdb9abbe6 → 56cc1bba51e6805de370160ce4a9399fef3740571204f13c3c751725870305e5} +3 -1
- package/vendor/impeccable/bundle/blobs/571f5c3bcf01c9b1bd02ab853a54db3f88375c4b8f39dd67d53e983a33e08bb7 +26 -0
- package/vendor/impeccable/bundle/blobs/{5ce02fc8f353d7f659535fb80e453963dc047a07c4396adf098fe010b479e7c0 → 5855d7595b0212bb8d521e0265378d437df8d2343d5f8a30408c3edde0a14d96} +3 -2
- package/vendor/impeccable/bundle/blobs/{2b21f0142ee88a11dbe2593362f5a910718a61062e3a64e7ff936ef1e74fd394 → 5a07d4769a741cd00fdf8c95b943ef072eb12cd0c9e2c2d2622d5fe0a4fa3894} +5 -5
- package/vendor/impeccable/bundle/blobs/{3dd45e1c32db3d3163a96ef198954905807b25cb9a1d206a7d77986f21d27652 → 5a9626fb8c1e9051155c68626fe7c765a55be325113245d44b4991fc3d3b014e} +5 -0
- package/vendor/impeccable/bundle/blobs/{d07e3131cdf3e392e59eaa3e2f59fcb0799d9494df4adfee12a21067fb8365ce → 5e354ae11913d5846faa3681a9ed98b68d1881fbbb1ecebf0769e3010bb0a426} +5 -0
- package/vendor/impeccable/bundle/blobs/{ad389ab12800738b0e5c97618278b7a824654b25990166ec9f389caa5c3386ca → 5e6eea05456108b8766cf354dda998e90b6a5ecca7f15d807e28659ee78c306f} +5 -0
- package/vendor/impeccable/bundle/blobs/{85b9c2d051de94ee9129c58be111946f73035ca62bbd2a3936f4fa48768fe5cf → 634257e766b1fecacd25e27dbfc7e21ef3b440b01e94e92b8b17711018d8a661} +18 -11
- package/vendor/impeccable/bundle/blobs/6428239079f98fd6500e9fd032dd289b52052da7a4364ff357b0a5341b6444db +63 -0
- package/vendor/impeccable/bundle/blobs/{f424dafa190533cd32c0bc3e4131d0c472d58e16bb191eab14f0ae73c2cea917 → 647bab2f5cf6279d58d808f4df05d1ac63c1c86c6df9d13406ae776458653995} +5 -0
- package/vendor/impeccable/bundle/blobs/{8e7bb79db7331b93f99de314dd5599de8587ec0b6c25e26cf1efab25c0777fcb → 6528f2aebe4a425b724de293c8f6dc8a42ca80c7f1ed3039b8b9a813b004956a} +4 -3
- package/vendor/impeccable/bundle/blobs/{89eb0206a0d9308c6c6a7cc01bc4fd8812d2bd34bb9a831988c5d86fac2c60de → 6575a657642ccdab42d0743ceaee06621c77811b4dc4f21c616e28aabf5e28ef} +1 -1
- package/vendor/impeccable/bundle/blobs/66d60356172ccafdd334fca9bf33243c8409216a733dcde0d66a24fd70ee8132 +1 -0
- package/vendor/impeccable/bundle/blobs/{759bab1d8adc071fdde2efcf6e2157aa4026f3c2b4f3c342a8070bf328011616 → 69cad1ae7355825ef320ac9638a1c9675ba9fda01c9a0fa12244cc4a1973e550} +2 -2
- package/vendor/impeccable/bundle/blobs/6d21d8e2729effaecc5b6239dadbcffb1ec8d51e8bdadeb47a39827266a61c5e +26 -0
- package/vendor/impeccable/bundle/blobs/{ff882c59c9aced92338aa194cc99a521ea2f083fd22eef3b1c1225e06bc72f66 → 6d9258a49c0b0583ec255eeb1092554298d5eea676fb9391f5a5a1377c3fd770} +4 -3
- package/vendor/impeccable/bundle/blobs/{68bc52a604731ca024610051fc763f4d78a53eb2a45d35b40a8c0383043baa63 → 6f4dfe968f47302ea64dca0e02f8c6d81497d93e4f436d09236e305456cbcc02} +4 -3
- package/vendor/impeccable/bundle/blobs/{f97a6891c80bbbc728edefcf4b638d1a823b38f3cb16ecd0fbb717734cc5c0c8 → 6f7f1639a933ed88e116aa8ab0cfb951096930d14f413349ae22ed04e28d2358} +5 -5
- package/vendor/impeccable/bundle/blobs/713a942482531ef8ef103adf48d9decd7327697450e444289aa0479458e4ee1f +101 -0
- package/vendor/impeccable/bundle/blobs/{6d47503587ad6da17ac529f44a96123bbb96a9c91a7a9350b7690fc467561a5d → 7212014fb2477d1d54aedaa79cdb861071a58afb2ae6d4dc5a495fa4810c6f8a} +5 -5
- package/vendor/impeccable/bundle/blobs/{21bc91f6e07691e82b7bba99f9e1d956f9d7a6810dcdc18d231fe73b53a13b23 → 73f8bdec7d9a97476fd7d7e0b4114b5c3e9c7b84c22cbb876cd18c3e64a9b8c5} +5 -0
- package/vendor/impeccable/bundle/blobs/{a8547c8565979894f0c07f92a96ac2a38e681a31fbf155ffeefc7566e185d9c2 → 754e9f0aa2101245a83cb17d8cc5bc49cf87997b29a83dedbfff283dbd0a8c4f} +5 -0
- package/vendor/impeccable/bundle/blobs/{84df879a0332a56ece4bff1922ecf4f50635951b3c67e67eb46f31bc5d30fa9a → 765d3e890cd7f58ca94b6834181052166e9c4f9ef06278dc241da4d64da2d595} +3 -1
- package/vendor/impeccable/bundle/blobs/778cedc9199b407d3e23fa1041e38d548b00b1101a33517aa2a2eb299f9d0edc +26 -0
- package/vendor/impeccable/bundle/blobs/{ef0b8eca20e1321cf7216fd0bda41ce54b0cca197cfd1b075eb51f3436f59059 → 77ae09542fbc10aa4e8b119d6fd19359908a47c13c30068d6a150bfdb50e3e10} +1 -1
- package/vendor/impeccable/bundle/blobs/{15b4837dccb27d7382e2f134ef050b244c4488b1906e0308f288112183cc09ac → 796bbd8231413fcbf22eb7e6f40c402842aa4b10b1894545a7b05d9201ca7c4a} +18 -11
- package/vendor/impeccable/bundle/blobs/{5e3616ac45568f239fda3a4764f7d3bf3473b8b5eefd91e402dd9208a4b851d1 → 7af7fcc09c6b14f26ba78734460a2f9dddd2dcd2e2fa0c47c682f539e2f4cad5} +1 -1
- package/vendor/impeccable/bundle/blobs/7b1a4cc5ce94837c8309962a204c47361927e442b7a1c3cc472f90276eca8b8c +63 -0
- package/vendor/impeccable/bundle/blobs/7c417abe75f0ce4341b6f5acbadcafbbeabcc32cdb13c930aecc5cabda9f9242 +26 -0
- package/vendor/impeccable/bundle/blobs/7e36403ed58e0e82c0e42bf2fbea1c066b8e63276978647a6f1e44bf1edb23fb +63 -0
- package/vendor/impeccable/bundle/blobs/80191b3580a996a2045105976f728e0f46de22c412fc7640741add9767b2d8f4 +101 -0
- package/vendor/impeccable/bundle/blobs/814610dee1081abc4213476ff0c4ae3e8f457909550d250ea0f89953687c85c6 +63 -0
- package/vendor/impeccable/bundle/blobs/8157b5a376e46980117f1ad6d08b24ee7be966f5de64b041bd213d486ea8c077 +26 -0
- package/vendor/impeccable/bundle/blobs/{bad9250670c18d89722563fd747bae4c4bec64d1db0ee09d12d4fea04fe271b8 → 8373668da1aa37c39888809ed9e834a7edfcb884af12f74934c270d004fba626} +3 -2
- package/vendor/impeccable/bundle/blobs/{46250caaec1bd69619a5b28a73cb3c845b319d029b0af9228aaa7001e7e0104a → 83d614fec61078175383012a088f49a9c0bb08b9ebd2b651c77cb94a323474ab} +5 -0
- package/vendor/impeccable/bundle/blobs/{a5371492582dbeb69b24a1a2947b256a2da8a4d55917af709bbab6e452d9d23c → 8449781319a33d4a10a7fab9bfa4812241c303b95f33703b300b097dba51089a} +18 -11
- package/vendor/impeccable/bundle/blobs/{12d2a8043ae8668ad29c32bfa92995849fc49cb016e6ebd4f7e59539d96e7b03 → 857c4a0db5859f1fa91152db684528299dfc552525f50f416d1625a270e12671} +5 -5
- package/vendor/impeccable/bundle/blobs/{bead87679caad7c537dd7c04c3bb78be56ac7eec279ad6aad7322f48ff2df2d9 → 871a8e4d749b807c693ebabd83defbd6c76e1bd2a0f53a28a460cb1308ba8634} +6 -0
- package/vendor/impeccable/bundle/blobs/{cf3ae16765e7b5bc333ef76e24ab37f080e3d62e931c4986158e3cbcda6b9f7a → 881a58aadf300bcc8f4947243e82192ae8dd7f14822a70fabc84fc74a5f9199c} +5 -5
- package/vendor/impeccable/bundle/blobs/{896da399bafcffb0623bdd81bb18709d6eab25c9d5917e739c8798f31ff0d076 → 88549c11ea55d5dfc9f551db9a9c270d7362a9d42aa83db7747c9a7f020e1255} +5 -5
- package/vendor/impeccable/bundle/blobs/9287af96048c58ed0e72493cf7eb90c3957d4ba8b19e70ecf5d1f54264e9e597 +101 -0
- package/vendor/impeccable/bundle/blobs/92b7ab84c828fa888f4882c417c3d7f8fde2e5445b40f96f4fc8181a3e058afc +101 -0
- package/vendor/impeccable/bundle/blobs/{e2f98c4136d0ab70ec32fcdef58edb20ed8ec4f6cc067e0dae952b22cfd6a471 → 93c53421c3376f695fe9dad5c82102f74bb5dd15e4ced81bb4ad50a71e5f1027} +1 -1
- package/vendor/impeccable/bundle/blobs/{a8f4056a85706c0c8f80ec48e9b437e198464100aa42786f9252051f4b931c19 → 95f0c7935a6d0375e09ae67ae0066c0ce7b583bf1d445d268cc4d2f4f900b1bb} +3 -1
- package/vendor/impeccable/bundle/blobs/98384b78af087855dbb526ec1e870a676ecd87f57237643dfea815317dad8a07 +26 -0
- package/vendor/impeccable/bundle/blobs/{948326fab89f0d5c07355a06b9b9c30d08bba2e3a673a0151ebbf5a39dff7b9a → 99e4a6facdb07986aa721bda8a4e35466b30091f32e38d7a71d9fcbe3591f65a} +5 -0
- package/vendor/impeccable/bundle/blobs/{44a91b3f0810f43829d8584e912812444d15614e4b57ca8070aee7ab899f7c1e → 9a4aa0d4903eabee987fdc92053466ff7f6eb0604797aee0efe67d67999b3eae} +5 -5
- package/vendor/impeccable/bundle/blobs/{9b85b85443aec09918befb83208c72f475457db8261a8fc5e83ef7eec474c869 → 9d45e5f6c082de6df4a2cfff11deb969715c49b5d9891d100dd1b2252c5bdcdd} +18 -11
- package/vendor/impeccable/bundle/blobs/9db3c0857f4c2c8877b1fe24a47a229fee0de76ec9057bd8ee95f0677fb58d74 +26 -0
- package/vendor/impeccable/bundle/blobs/{5738bcf9ac21dbb2113fd0c5cc7e4bbfc8174778916ab5843644332b3dbbc36e → 9e82126a2e08aa365f9c430d383cf6e1921e04d1e0a1b5777716ff97828cfad8} +5 -5
- package/vendor/impeccable/bundle/blobs/{b3782f2d9215eb0f5df4fe3c0e0bec07cef011e1836d4d0e45ef02bc48d3adde → 9f2993499adadfdef4065a9a7fb69c75f888d892d4ee6bdbe62619bc772f495c} +1 -1
- package/vendor/impeccable/bundle/blobs/{1c804990fd8ac23a4b19c42972b5ae591d17f620d0006f0f32927c8db5d5bf50 → a1af8b8a97665a3692eb39872c235796684a387a0b83785872f81aebd9dab046} +18 -11
- package/vendor/impeccable/bundle/blobs/{824b994782a1fe68a244bbdff7218a2e0854655d90cc0fb5ade7ef9259ba6305 → a27399e3056c77a28ddd310fb5b4dee6e8e440dfa1737f7e38815097bec4c3a9} +5 -5
- package/vendor/impeccable/bundle/blobs/a569989e6a3d6453b4c45e9474e162a15cc54e11732ac6baa7990a6e7cccc0b5 +21 -0
- package/vendor/impeccable/bundle/blobs/a75b892696469e3ccd2af33c9eef793e635efc3c5ac45336b0c1373d90c856b0 +63 -0
- package/vendor/impeccable/bundle/blobs/{3ba92d4aa840ec1b6c2fda224339489d6dd65eedf43bb45836af02584d1faa88 → a7e8e60df83c6f47590467094ab2a13f1fe28ce45959a4e69dd89575a4208646} +5 -0
- package/vendor/impeccable/bundle/blobs/{e49d2b0110c55751da3c965b4ae4d294aa676c961a09f8efbbbf22c1ec7c4fa0 → a892e337eee548d53252abb72ba5aa85cbcf556ffd8dc74e05534652c010d574} +1 -1
- package/vendor/impeccable/bundle/blobs/{8f0867db7c6f6a54348a0d951f198a1bd852cd12505d821e6e1ac6bd42e7fcea → a93397adc906e245c69b42d4b25931fc92dc75baa60ca9a3749ba23b52ba01a0} +3 -2
- package/vendor/impeccable/bundle/blobs/{424b2e75cb204e2dca7db4a40dfe5a81f78dc0fc58ac4790e8b7bbf2f330bba4 → a9e63b2df611805e845e0bb1cca1a0c27e83640a78185c9fd9de90d53a539cdc} +5 -0
- package/vendor/impeccable/bundle/blobs/ab80e6a971baa66342548a846ce3fb69824ef9ef4e0f26c6f02685f225d00bbd +26 -0
- package/vendor/impeccable/bundle/blobs/af35b5fb6e45acb6483a5fbb864c3eaa9c57bacc43857f48183c836041c670ae +101 -0
- package/vendor/impeccable/bundle/blobs/af5842c4844b692b817319d5375611d4211dc7f459fb12da358baefc3a6cd373 +63 -0
- package/vendor/impeccable/bundle/blobs/b2732083f8f1d1924d38f84f179491430aebda8e0fd1f1d0785e3f883bcf3a40 +63 -0
- package/vendor/impeccable/bundle/blobs/b3b1d5a4c80ce279d88896601deee9ccfeacdae0d0cd433600985a5f7ac93c72 +26 -0
- package/vendor/impeccable/bundle/blobs/{fd5579dbae1fc2495b7dddde48df9673acebd27953bbb56d506d3b470375c9e9 → b4be5499f404a926cdd2c55d8fb7409ba74a56b3d0c7d865594cc0254d3e499a} +5 -0
- package/vendor/impeccable/bundle/blobs/{2fd096823e4a93f19edd421a69e10f90ebb630a014c673d1802a927c6f47b7d2 → b626e0677288a1660e9ce80c4f0454b527010239681f6b8dcc0f36b4a4d6bcb2} +3 -1
- package/vendor/impeccable/bundle/blobs/{33b6b32c0c3c0c4a2b22bd2275176b1c88a006dd94592a854f629911a0b21cdc → b719be9c5d4ced5d649ec6c0c90630196e7ee513d0da482aef13c705fdc23ab6} +3 -1
- package/vendor/impeccable/bundle/blobs/{df0eb9e9a484fc7b8a0f3e50573a7d7f81e0f17598ac30d9f3fe5a6c6aa5fefa → b8938fea3399aa639b4c873248035c219658069eef7be62672254e2f72c056f4} +5 -0
- package/vendor/impeccable/bundle/blobs/{ee0a15fcfc244b76b896a2650a17b35e444d4311166b69a3cfa32d11f8f44851 → ba0d96d88ab40fad1cb522e60b11affc568cfe9d340110ac5e71f834ac3d0f4a} +12 -0
- package/vendor/impeccable/bundle/blobs/{426c7f5437dd3c23a4cfaef6964dc7f1e038480f92238499b85f3ce7e4472bf4 → bc48bca63dff44e1f0205bafb64e16b2d6fb294ace405dbc9ae06a3bc6107154} +3 -1
- package/vendor/impeccable/bundle/blobs/{c3ad2a5fa570876af6645c48d246c664859e19f253d2dc9e0ead34e785d5b40a → bdd676c8f29295addfdbceaab285bb1184ec3ef7ff60501908b97ea8269580c4} +3 -2
- package/vendor/impeccable/bundle/blobs/{38d4d404030c6ea935d3223db1eeb22c45d04a94f41f98e02a43cdc5af7ff2e3 → c06effcdc60859157208d3b7ee23d56160f2386f6a2dfa2514ba82fe21828ae0} +1 -1
- package/vendor/impeccable/bundle/blobs/c100b67a4ae248ad564182b181acb1ee2fe64c00049aeef62d4e7a3213726f37 +26 -0
- package/vendor/impeccable/bundle/blobs/c2dfc965319745c403b99e00e9e97de15f1300ea721bd3f708f0ac47aadc537b +101 -0
- package/vendor/impeccable/bundle/blobs/{e9da72a13eb3411d6bbb316953022f62abc4434f505e5345907b216eda9f793b → c6b3bc811eb23d90ff9add1e0e5b40999a0bbbab364f5e6d08061f36d30429a5} +1 -1
- package/vendor/impeccable/bundle/blobs/{82a5e564563333aabb7ab4d2f8c26c785dfe2c2416ac6e9f30cba31440676194 → cdf8a88b9865599c58fe285041d2d46eea7d9bd2d4075d82de358191742b20ad} +5 -5
- package/vendor/impeccable/bundle/blobs/cf3d3a296890ac1ee363fee930f252e20d0935cd575367ad017b3cdc2dc5a50d +26 -0
- package/vendor/impeccable/bundle/blobs/{a1e4febca3455787d7c753fe177a150dccde6e742957de400b0307247802d200 → d2e16da9bb6b33c931378d1bf57dcfff5dc426a71434bc352cec6aece715a66f} +18 -11
- package/vendor/impeccable/bundle/blobs/{c36f6aac0ddf52eabbb21df09fd3310540dca6b09e7a4017d18e94c06c469405 → d4a9e18a879bbb92aa0a56e16b45481090dffa4470efdecf52fb0da8c900be5d} +5 -5
- package/vendor/impeccable/bundle/blobs/{869fa5390b84bfd00d072f5280a9002ea3e3936edf5985241be641a87f03ff7b → d57c3e0453f601ad688911fca4471057c7b46b561fcd42a1e12a581101c5186c} +1 -1
- package/vendor/impeccable/bundle/blobs/{910461b1c1f8216155165955c860a884a1e2f557cb38f21ef512ea90ef6503c2 → d5f83912eda93d42f93522bb74aeff0ea04d9c559577ec52fcccc130dd03166d} +2 -1
- package/vendor/impeccable/bundle/blobs/{9deb14303b421b5a9232755b5b9f317716f33e1e211557a98a00a9c409775c4d → d6489d7f3e607ce3f8514a7a7d3a0eb5e8f1ac55859eaf7d5c31b53de8fab9f3} +18 -11
- package/vendor/impeccable/bundle/blobs/{37080ea5e5b381adb7eae7a427231b0ad0dee0f0916fc1d6b673b7101a5b425b → d6a51f4df6d76f16b95ab81268a689f4c5936d505c5bb25c80ad7423f927bbc6} +5 -0
- package/vendor/impeccable/bundle/blobs/{61c72fdde649bf7f2e0668e48f9d222666c81672100b5f2265940e7aa13c8767 → d7b99a57652cb8741d57a15ba7e06de4707fac02a97e5e001179da007272f2b8} +3 -1
- package/vendor/impeccable/bundle/blobs/{57402ef6fd9d0745f8c60d778f77da83a8b16edf751fa1013598a0f6e5f0f541 → d9963fd73bf6129fe0c8ec25c5148f50617ec85683b8eeae7e411c9a42e2db33} +2 -1
- package/vendor/impeccable/bundle/blobs/{581409ace104a81744b7d08f5398a2c207cf76d9e50751f807b4382eaf66454f → da3b2399814db89d67959268c646601957d3e8c641b09a5bdbce84217c1c2cfe} +5 -5
- package/vendor/impeccable/bundle/blobs/{249f0437a52ab3eb4bc4d4a9f38e085334c0fbb7795e88dd419e32b5f58c924d → dc3aeccbea3e997704ce8b170f56b0eaf343a14ad4fedb22a6dbee0f205aa37f} +5 -0
- package/vendor/impeccable/bundle/blobs/{433a79eee3ce4c99e79a7aebe3a6d8ec9ff70216772e0c2ff9dce3a01d672963 → dcc1572e739cdabcbf084f276b447cb686aa18459896e6d8fe29f4d7d807bd1d} +5 -5
- package/vendor/impeccable/bundle/blobs/{2d7086992c07df1fc734cdf9c420c4bd8ad409ab7909e07c8b486c303d420732 → dd66761b291c7dbca6e9efd22023e38f8c53ad310f3a6cdab5dc7ecd7ae8f31f} +3 -2
- package/vendor/impeccable/bundle/blobs/dd953992625c240fd1842aaf533a865aabd09487cbc16fa01fe8bb4b4365b843 +101 -0
- package/vendor/impeccable/bundle/blobs/{df4f14df1daaad1606b682995f649da19a85debf264092447b3b7ddb8b4bc1ce → de70398719140e4951aa111e9625de5ed916ad1ef0877e4ab6f6b4a7e3cc5f8f} +18 -11
- package/vendor/impeccable/bundle/blobs/{8b23562ccc3e41609ce6e67fdad6cc57b6c961964c329eff6975a1b4c5471c0d → deaaa533475b6a9f7dd52e01a1f1997aa3af146694334981650f8c846f939559} +3 -1
- package/vendor/impeccable/bundle/blobs/{041535231366047a0beeb5daa64ea9c23d5a566580f7dafdb8c0623cb4a7e76b → e07176229b8a330970ca3c9c5e3dd68c2aaeb726285e30f471e91053d7f8e798} +1 -1
- package/vendor/impeccable/bundle/blobs/{115e1c3f1b58b5129910ed925dbf65d61d5ac4c2036618847555ce40098aae97 → e1075ea5b34ac9c60f7c5bda97356eeaf1b683b599592d324fd3704f0852ad7a} +18 -11
- package/vendor/impeccable/bundle/blobs/e3af212117e0c552b0976687200fe8f95846a01725a482e8e4dbfd75e40dbfa6 +26 -0
- package/vendor/impeccable/bundle/blobs/e3c2031978cd670d7150ff3140f12cf8b6882ef638ea9a9985caffa9a80c8713 +63 -0
- package/vendor/impeccable/bundle/blobs/e6e18e7c23cfe82961d90b9714cb466c20bd83f222ac63e9339b6b2c304e1787 +26 -0
- package/vendor/impeccable/bundle/blobs/e7af7ad18b307a3171fcf49421df2a557f93289d27af2430f10ee74e2a2fc2d3 +101 -0
- package/vendor/impeccable/bundle/blobs/{b161198874e4e77599bc31691e78790be14bacc2eb03be168c8a7543ece9fbe1 → e85da3098368807689009184eca2bb09a91bdb6cb1be3e7a61f91f1ae31cd69b} +18 -11
- package/vendor/impeccable/bundle/blobs/{6bdbc3f745ceee15e10b050f109ce42bbeb53ab3c3b5239257de1d596654dee7 → e8720f3aa41135211cc58cc299a39eeda86c75651f4279cc1ede8db10dcc0584} +4 -0
- package/vendor/impeccable/bundle/blobs/e9861052457cc1ddc42c687bb8c33a877834ced94fed74af2a4f00f6bae50795 +101 -0
- package/vendor/impeccable/bundle/blobs/{d1faa55eb956033d28e9f27fd2bc2a9f62c5da0f0abd6534819cc0a04db54d9d → eb3e86876c20f1cfc443dcbe48d8f41fea6e815082a304610be432272429a06d} +5 -0
- package/vendor/impeccable/bundle/blobs/{0e1819750e5448311a051d35ab6d0be0830418f78ca872ef10469fafebb27d4f → eba472f6190541c28e2e647ed019f43564ba5b92d629963f34c899175b25b31e} +5 -5
- package/vendor/impeccable/bundle/blobs/{f173ff03f989f162cee815feb2d8ca72daf00019c48694d89db16d52171a79c0 → eba609589a5a051643a7bae60b7cceef7cfe44d0f8bd9229e61473ac75910fb3} +1 -1
- package/vendor/impeccable/bundle/blobs/{8eb466778023fccea641654d662157b123eeb360f4a0875bf6fbe3d93680851c → ec81b008d2641402e3352b09b1a90562ef7a24598d7c5aded475038cce63aca0} +1 -1
- package/vendor/impeccable/bundle/blobs/{4acfb9e38f6e09f7484e36fc19704d69eab159436ee9329168be74c493042f22 → ec86b8633fbeb14ef2272f220fdd98089972b03b99da83e49eeb6a8b73b00617} +3 -1
- package/vendor/impeccable/bundle/blobs/{d15a2914d93e07a4956acd5c8b8211af17380f527acd10d8acf4f4920badaaaf → ef2e97cd690baf6fe5c895dd2d8844aff9fcc4a8bc04973402678a739c81d712} +4 -3
- package/vendor/impeccable/bundle/blobs/f0fbe529f63961a027bada2e6a3cbe86f4af0dba4b8e1010da22b007f9002f66 +63 -0
- package/vendor/impeccable/bundle/blobs/{c02feba25a961a72647ad317aba2d65baeeed53c4cdcc072f25bb37f4d867d43 → f254d59ff973e907cacdc2c34b8b4de075437d292de31dac30e10a9d7035086c} +3 -2
- package/vendor/impeccable/bundle/blobs/f5efb1b1dd4cd18e1d4789d7c8e0188f4342b25fffd53af6088ba8b67774fb99 +26 -0
- package/vendor/impeccable/bundle/blobs/{7af0a8665057c83b39bca2c8c7427ef2343734f70d4128c377113a6726a1e3b1 → f68a3d68ac92606e91aa8878e003d9432ddd09aa97ca01c6b3ce46c937dca316} +524 -4
- package/vendor/impeccable/bundle/blobs/{381ff89aa76e82a0d98456ec31cb117555ae045539fba47c45056daa50f611ca → f84b653ede0804d21e6210c6d21fd5352023914fedceae6ff14e20f1e93b06e7} +5 -5
- package/vendor/impeccable/bundle/blobs/{5b30a06646ad5e453d6b5ed1b8d446f69fca3cd13b8aeda28f0d0b2cbe8f62d1 → fb32d99751c5fc24493ff4460be1767bd5236dc820fd337775067c0620d1a7a6} +3 -1
- package/vendor/impeccable/bundle/blobs/{733504a70ed20bcfca9c26c353f7b88f8491d24f3f2fe124dc1e73b28eefa296 → fb5fec24adafa48df43eece6907c1c986a4772cbdc64142c881f00c3b312e9ca} +18 -11
- package/vendor/impeccable/bundle/blobs/fc149b5bc7a8d0cc9b9bf86e5013793f3857c1c302212e9aaf101cb95427386b +101 -0
- package/vendor/impeccable/bundle/manifest.json +413 -298
- package/skills/grafton-view-dev/SKILL.md +0 -195
- package/skills/grafton-view-dev/references/bindings.md +0 -120
- package/skills/grafton-view-dev/references/components.md +0 -168
- package/skills/grafton-view-dev/references/recipes.md +0 -208
- package/skills/grafton-view-dev/references/schema.md +0 -86
- package/skills/grafton-view-dev/references/stores.md +0 -310
- package/skills/portal-backend-app/SKILL.md +0 -56
- package/skills/portal-backend-app/references/gate-and-tokens.md +0 -93
- package/skills/portal-backend-app/references/wiring-and-conventions.md +0 -71
- package/skills/xgent-init/references/external-app-CLAUDE.template.md +0 -249
- package/vendor/impeccable/bundle/blobs/800cf1c0392b24de7c0a1c6ea6778ecb433dec71c49a150bce96a98477527b2f +0 -1
|
@@ -0,0 +1,1232 @@
|
|
|
1
|
+
import { parseRepositoryRemote } from '../renderers/shared/repository-location.mjs';
|
|
2
|
+
|
|
3
|
+
const COMPARATOR_VERSION = 1;
|
|
4
|
+
const CANONICAL_VERSION = 1;
|
|
5
|
+
|
|
6
|
+
export class ArchitectureDeltaError extends Error {
|
|
7
|
+
constructor(code, message, details = {}) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = 'ArchitectureDeltaError';
|
|
10
|
+
this.code = code;
|
|
11
|
+
this.details = details;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const codepointOrder = (left, right) => (left < right ? -1 : left > right ? 1 : 0);
|
|
16
|
+
const sorted = (values) => [...values].sort((left, right) => codepointOrder(String(left), String(right)));
|
|
17
|
+
|
|
18
|
+
function canonical(value) {
|
|
19
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(',')}]`;
|
|
20
|
+
if (value && typeof value === 'object') {
|
|
21
|
+
return `{${Object.keys(value).sort(codepointOrder).map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`).join(',')}}`;
|
|
22
|
+
}
|
|
23
|
+
return JSON.stringify(value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const equal = (left, right) => canonical(left) === canonical(right);
|
|
27
|
+
|
|
28
|
+
function sortedObjects(values) {
|
|
29
|
+
return [...values].sort((left, right) => codepointOrder(canonical(left), canonical(right)));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function sortedBy(values, keyFor) {
|
|
33
|
+
return [...values].sort((left, right) => codepointOrder(String(keyFor(left)), String(keyFor(right))));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function normalizeRepository(repository) {
|
|
37
|
+
if (!repository) return undefined;
|
|
38
|
+
const location = parseRepositoryRemote(repository.url, { authored: true });
|
|
39
|
+
const url = location?.url || String(repository.url || '');
|
|
40
|
+
return {
|
|
41
|
+
url: location?.provider === 'github' ? url.toLowerCase() : url,
|
|
42
|
+
revision: String(repository.revision || '').toLowerCase(),
|
|
43
|
+
...(repository.provider !== undefined ? { provider: repository.provider } : {}),
|
|
44
|
+
...(repository.link_mode !== undefined ? { link_mode: repository.link_mode } : {}),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function normalizeComponent(component) {
|
|
49
|
+
return {
|
|
50
|
+
...component,
|
|
51
|
+
...(Array.isArray(component.sources) ? { sources: sortedObjects(component.sources) } : {}),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function normalizeBoundary(boundary) {
|
|
56
|
+
return { ...boundary, wraps: sorted(boundary.wraps || []) };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function canonicalArchitecture(diagram) {
|
|
60
|
+
const meta = { ...(diagram.meta || {}) };
|
|
61
|
+
delete meta.output;
|
|
62
|
+
if (meta.repository) meta.repository = normalizeRepository(meta.repository);
|
|
63
|
+
return {
|
|
64
|
+
schema_version: diagram.schema_version,
|
|
65
|
+
diagram_type: diagram.diagram_type,
|
|
66
|
+
meta,
|
|
67
|
+
...(diagram.layout ? { layout: diagram.layout } : {}),
|
|
68
|
+
components: sortedBy((diagram.components || []).map(normalizeComponent), (component) => component.id),
|
|
69
|
+
boundaries: sortedBy((diagram.boundaries || []).map(normalizeBoundary), boundaryKey),
|
|
70
|
+
connections: sortedBy(diagram.connections || [], (connection) => connection.id || ''),
|
|
71
|
+
...(diagram.cards ? { cards: diagram.cards } : {}),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function canonicalArchitectureJson(diagram) {
|
|
76
|
+
return canonical(canonicalArchitecture(diagram));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function fail(code, message, details) {
|
|
80
|
+
throw new ArchitectureDeltaError(code, message, details);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function requireComparableShape(diagram, side) {
|
|
84
|
+
if (diagram?.schema_version !== 1) {
|
|
85
|
+
fail('delta/schema-version-mismatch', `${side} must use schema_version 1.`, { side, path: '/schema_version', actual: diagram?.schema_version });
|
|
86
|
+
}
|
|
87
|
+
if (diagram?.diagram_type !== 'architecture') {
|
|
88
|
+
fail('delta/type-mismatch', `${side} must use diagram_type architecture.`, { side, path: '/diagram_type', actual: diagram?.diagram_type });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function stableIndex(items, collection, side, missingCode = 'delta/stable-id-required') {
|
|
93
|
+
const index = new Map();
|
|
94
|
+
const missing = [];
|
|
95
|
+
const duplicates = [];
|
|
96
|
+
(items || []).forEach((item, itemIndex) => {
|
|
97
|
+
if (!item?.id) missing.push(`/${collection}/${itemIndex}/id`);
|
|
98
|
+
else if (index.has(item.id)) duplicates.push(item.id);
|
|
99
|
+
else index.set(item.id, item);
|
|
100
|
+
});
|
|
101
|
+
if (missing.length) {
|
|
102
|
+
fail(missingCode, `${side} ${collection} require authored stable ids for comparison.`, {
|
|
103
|
+
side,
|
|
104
|
+
paths: sorted(missing),
|
|
105
|
+
supportedFixes: [`add a unique id to every ${collection} item`],
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (duplicates.length) {
|
|
109
|
+
fail('delta/duplicate-stable-id', `${side} ${collection} contain duplicate ids.`, {
|
|
110
|
+
side,
|
|
111
|
+
collection,
|
|
112
|
+
ids: sorted(new Set(duplicates)),
|
|
113
|
+
supportedFixes: [`make every ${collection} id unique`],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return index;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const boundaryKey = (boundary) => `${boundary.kind}\u001f${boundary.label}`;
|
|
120
|
+
|
|
121
|
+
function boundaryIndex(boundaries, side) {
|
|
122
|
+
const index = new Map();
|
|
123
|
+
const ambiguous = [];
|
|
124
|
+
for (const boundary of boundaries || []) {
|
|
125
|
+
const key = boundaryKey(boundary);
|
|
126
|
+
if (index.has(key)) ambiguous.push(`${boundary.kind}:${boundary.label}`);
|
|
127
|
+
else index.set(key, boundary);
|
|
128
|
+
}
|
|
129
|
+
if (ambiguous.length) {
|
|
130
|
+
fail('delta/boundary-key-ambiguous', `${side} boundary kind + label keys must be unique.`, {
|
|
131
|
+
side,
|
|
132
|
+
boundaries: sorted(new Set(ambiguous)),
|
|
133
|
+
supportedFixes: ['rename one duplicate boundary or add stable boundary ids in a future schema version'],
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return index;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function normalizedField(item, field) {
|
|
140
|
+
const value = item?.[field];
|
|
141
|
+
if (field === 'sources' && Array.isArray(value)) return sortedObjects(value);
|
|
142
|
+
if (field === 'wraps' && Array.isArray(value)) return sorted(value);
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function fieldChanges(before, after, groups) {
|
|
147
|
+
const classifications = [];
|
|
148
|
+
const changedFields = [];
|
|
149
|
+
for (const [classification, fields] of Object.entries(groups)) {
|
|
150
|
+
const changed = fields.filter((field) => !equal(normalizedField(before, field), normalizedField(after, field)));
|
|
151
|
+
if (changed.length) classifications.push(classification);
|
|
152
|
+
changedFields.push(...changed.map((field) => `/${field}`));
|
|
153
|
+
}
|
|
154
|
+
return { classifications: sorted(classifications), changedFields: sorted(changedFields) };
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const COMPONENT_FIELDS = {
|
|
158
|
+
semantic: ['type', 'label', 'sublabel', 'tag', 'brand'],
|
|
159
|
+
evidence: ['sources'],
|
|
160
|
+
geometry: ['row', 'col', 'pos', 'size'],
|
|
161
|
+
};
|
|
162
|
+
const CONNECTION_FIELDS = {
|
|
163
|
+
topology: ['from', 'to'],
|
|
164
|
+
semantic: ['label', 'variant'],
|
|
165
|
+
geometry: ['fromSide', 'toSide', 'route', 'via', 'labelAt', 'labelDx', 'labelDy', 'labelSegment', 'width'],
|
|
166
|
+
};
|
|
167
|
+
const BOUNDARY_FIELDS = { scope: ['wraps'], geometry: ['pad'] };
|
|
168
|
+
|
|
169
|
+
function statusFor(classifications, kind) {
|
|
170
|
+
if (classifications.some((value) => ['topology', 'semantic', 'scope'].includes(value))) return 'changed';
|
|
171
|
+
if (classifications.includes('evidence')) return 'evidence-changed';
|
|
172
|
+
if (classifications.includes('geometry')) return kind === 'connection' ? 'rerouted' : kind === 'component' ? 'moved' : 'geometry-changed';
|
|
173
|
+
return 'same';
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function compareEntities(baseIndex, headIndex, kind, groups, describe) {
|
|
177
|
+
const changes = [];
|
|
178
|
+
const identityClassification = kind === 'connection' ? 'topology' : kind === 'boundary' ? 'scope' : 'semantic';
|
|
179
|
+
for (const id of sorted(new Set([...baseIndex.keys(), ...headIndex.keys()]))) {
|
|
180
|
+
const base = baseIndex.get(id);
|
|
181
|
+
const head = headIndex.get(id);
|
|
182
|
+
if (!base) changes.push({ ...describe(id, undefined, head), status: 'added', classifications: [identityClassification], changedFields: [] });
|
|
183
|
+
else if (!head) changes.push({ ...describe(id, base, undefined), status: 'removed', classifications: [identityClassification], changedFields: [] });
|
|
184
|
+
else {
|
|
185
|
+
const fields = fieldChanges(base, head, groups);
|
|
186
|
+
const status = statusFor(fields.classifications, kind);
|
|
187
|
+
if (status !== 'same') changes.push({ ...describe(id, base, head), status, ...fields });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return changes;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function summaryFor(changes, shape) {
|
|
194
|
+
const summary = Object.fromEntries(shape.map((key) => [key, 0]));
|
|
195
|
+
for (const change of changes) {
|
|
196
|
+
const key = change.status.replace(/-([a-z])/g, (_all, letter) => letter.toUpperCase());
|
|
197
|
+
if (Object.hasOwn(summary, key)) summary[key] += 1;
|
|
198
|
+
}
|
|
199
|
+
return summary;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function presentationChanged(base, head) {
|
|
203
|
+
const basePresentation = {
|
|
204
|
+
title: base.meta?.title,
|
|
205
|
+
locale: base.meta?.locale,
|
|
206
|
+
subtitle: base.meta?.subtitle,
|
|
207
|
+
animation: base.meta?.animation,
|
|
208
|
+
visual_preset: base.meta?.visual_preset,
|
|
209
|
+
quality_profile: base.meta?.quality_profile,
|
|
210
|
+
engineering_profile: base.meta?.engineering_profile,
|
|
211
|
+
legend: base.meta?.legend,
|
|
212
|
+
views: base.meta?.views,
|
|
213
|
+
viewBox: base.meta?.viewBox,
|
|
214
|
+
layout: base.layout,
|
|
215
|
+
cards: base.cards,
|
|
216
|
+
};
|
|
217
|
+
const headPresentation = {
|
|
218
|
+
title: head.meta?.title,
|
|
219
|
+
locale: head.meta?.locale,
|
|
220
|
+
subtitle: head.meta?.subtitle,
|
|
221
|
+
animation: head.meta?.animation,
|
|
222
|
+
visual_preset: head.meta?.visual_preset,
|
|
223
|
+
quality_profile: head.meta?.quality_profile,
|
|
224
|
+
engineering_profile: head.meta?.engineering_profile,
|
|
225
|
+
legend: head.meta?.legend,
|
|
226
|
+
views: head.meta?.views,
|
|
227
|
+
viewBox: head.meta?.viewBox,
|
|
228
|
+
layout: head.layout,
|
|
229
|
+
cards: head.cards,
|
|
230
|
+
};
|
|
231
|
+
return !equal(basePresentation, headPresentation);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function compareArchitecture(base, head, evidence = {}) {
|
|
235
|
+
requireComparableShape(base, 'base');
|
|
236
|
+
requireComparableShape(head, 'head');
|
|
237
|
+
const baseComponents = stableIndex(base.components, 'components', 'base');
|
|
238
|
+
const headComponents = stableIndex(head.components, 'components', 'head');
|
|
239
|
+
const shared = sorted([...baseComponents.keys()].filter((id) => headComponents.has(id)));
|
|
240
|
+
if (!shared.length) {
|
|
241
|
+
fail('delta/no-shared-component-id', 'The snapshots share no component id, so Archify cannot prove that they describe the same system.', {
|
|
242
|
+
supportedFixes: ['preserve at least one authored component id across snapshots'],
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const baseConnections = stableIndex(base.connections, 'connections', 'base', 'delta/relationship-id-required');
|
|
247
|
+
const headConnections = stableIndex(head.connections, 'connections', 'head', 'delta/relationship-id-required');
|
|
248
|
+
const baseBoundaries = boundaryIndex(base.boundaries, 'base');
|
|
249
|
+
const headBoundaries = boundaryIndex(head.boundaries, 'head');
|
|
250
|
+
|
|
251
|
+
const baseRepository = normalizeRepository(base.meta?.repository);
|
|
252
|
+
const headRepository = normalizeRepository(head.meta?.repository);
|
|
253
|
+
const identity = (repository) => parseRepositoryRemote(repository.url, { authored: true })?.identity || repository.url;
|
|
254
|
+
if (baseRepository && headRepository && identity(baseRepository) !== identity(headRepository)) {
|
|
255
|
+
fail('delta/repository-mismatch', 'The snapshots name different repositories.', {
|
|
256
|
+
baseRepository: baseRepository.url,
|
|
257
|
+
headRepository: headRepository.url,
|
|
258
|
+
supportedFixes: ['compare snapshots from the same repository or remove repository evidence from both inputs'],
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const proofLevel = baseRepository && headRepository
|
|
262
|
+
&& evidence.baseVerified && evidence.headVerified
|
|
263
|
+
&& /^[a-f0-9]{40}$/.test(baseRepository.revision)
|
|
264
|
+
&& /^[a-f0-9]{40}$/.test(headRepository.revision)
|
|
265
|
+
? 'revision-pinned'
|
|
266
|
+
: 'authored';
|
|
267
|
+
|
|
268
|
+
const components = compareEntities(baseComponents, headComponents, 'component', COMPONENT_FIELDS, (id, before, after) => ({
|
|
269
|
+
id,
|
|
270
|
+
baseLabel: before?.label,
|
|
271
|
+
headLabel: after?.label,
|
|
272
|
+
}));
|
|
273
|
+
const connections = compareEntities(baseConnections, headConnections, 'connection', CONNECTION_FIELDS, (id, before, after) => ({
|
|
274
|
+
id,
|
|
275
|
+
...(before ? { base: { from: before.from, to: before.to, label: before.label || '' } } : {}),
|
|
276
|
+
...(after ? { head: { from: after.from, to: after.to, label: after.label || '' } } : {}),
|
|
277
|
+
}));
|
|
278
|
+
const boundaries = compareEntities(baseBoundaries, headBoundaries, 'boundary', BOUNDARY_FIELDS, (_key, before, after) => ({
|
|
279
|
+
key: `${(after || before).kind}:${(after || before).label}`,
|
|
280
|
+
kind: (after || before).kind,
|
|
281
|
+
label: (after || before).label,
|
|
282
|
+
}));
|
|
283
|
+
const provenanceChanged = !equal(baseRepository, headRepository);
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
schemaVersion: 1,
|
|
287
|
+
ok: true,
|
|
288
|
+
command: 'compare',
|
|
289
|
+
type: 'architecture',
|
|
290
|
+
comparatorVersion: COMPARATOR_VERSION,
|
|
291
|
+
canonicalVersion: CANONICAL_VERSION,
|
|
292
|
+
completeness: 'complete',
|
|
293
|
+
proofLevel,
|
|
294
|
+
base: {
|
|
295
|
+
title: base.meta?.title || '',
|
|
296
|
+
...(evidence.baseRawSha256 ? { rawSha256: evidence.baseRawSha256 } : {}),
|
|
297
|
+
...(evidence.baseSemanticSha256 ? { semanticSha256: evidence.baseSemanticSha256 } : {}),
|
|
298
|
+
...(Number.isInteger(evidence.baseBytes) ? { bytes: evidence.baseBytes } : {}),
|
|
299
|
+
...(baseRepository?.revision ? { revision: baseRepository.revision } : {}),
|
|
300
|
+
},
|
|
301
|
+
head: {
|
|
302
|
+
title: head.meta?.title || '',
|
|
303
|
+
...(evidence.headRawSha256 ? { rawSha256: evidence.headRawSha256 } : {}),
|
|
304
|
+
...(evidence.headSemanticSha256 ? { semanticSha256: evidence.headSemanticSha256 } : {}),
|
|
305
|
+
...(Number.isInteger(evidence.headBytes) ? { bytes: evidence.headBytes } : {}),
|
|
306
|
+
...(headRepository?.revision ? { revision: headRepository.revision } : {}),
|
|
307
|
+
},
|
|
308
|
+
summary: {
|
|
309
|
+
components: summaryFor(components, ['added', 'changed', 'evidenceChanged', 'removed', 'moved']),
|
|
310
|
+
connections: summaryFor(connections, ['added', 'changed', 'removed', 'rerouted']),
|
|
311
|
+
boundaries: summaryFor(boundaries, ['added', 'changed', 'removed', 'geometryChanged']),
|
|
312
|
+
presentationChanged: presentationChanged(base, head),
|
|
313
|
+
provenanceChanged,
|
|
314
|
+
},
|
|
315
|
+
changes: { components, connections, boundaries },
|
|
316
|
+
identity: {
|
|
317
|
+
components: 'components[].id',
|
|
318
|
+
connections: 'connections[].id (required)',
|
|
319
|
+
boundaries: 'boundaries[].kind + boundaries[].label (derived)',
|
|
320
|
+
},
|
|
321
|
+
view: { visualPreset: head.meta?.visual_preset || 'classic' },
|
|
322
|
+
limitations: [
|
|
323
|
+
'Authored Architecture IR only; no runtime impact, causality, risk, or mergeability is inferred.',
|
|
324
|
+
'Boundary identity is conservatively derived from kind + label.',
|
|
325
|
+
],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function esc(value) {
|
|
330
|
+
return String(value ?? '').replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const safeJson = (value) => JSON.stringify(value, null, 2).replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026');
|
|
334
|
+
|
|
335
|
+
export function extractArchitectureSvg(html) {
|
|
336
|
+
const match = html.match(/<svg viewBox="0 0 [^"]+" role="img"[\s\S]*?<\/svg>/);
|
|
337
|
+
if (!match) fail('delta/svg-missing', 'A validated Architecture artifact did not contain its primary SVG.');
|
|
338
|
+
return match[0];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function extractArtifactCss(html) {
|
|
342
|
+
const match = html.match(/<style>([\s\S]*?)<\/style>/);
|
|
343
|
+
if (!match) fail('delta/css-missing', 'A validated Architecture artifact did not contain its stylesheet.');
|
|
344
|
+
return match[1];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function changeMap(changes) {
|
|
348
|
+
return new Map(changes.map((change) => [change.id, change]));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function boundaryChangeMap(changes) {
|
|
352
|
+
return new Map(changes.map((change) => [`${change.kind}:${esc(change.label)}`, change]));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function addState(tag, change, side, forcedState) {
|
|
356
|
+
const append = (attributes) => tag.endsWith('/>')
|
|
357
|
+
? tag.replace(/\/>$/, `${attributes}/>`)
|
|
358
|
+
: tag.replace(/>$/, `${attributes}>`);
|
|
359
|
+
if (!change && !forcedState) return append(' data-delta-state="same"');
|
|
360
|
+
let state = forcedState || change.status;
|
|
361
|
+
if (change?.status === 'added' && side === 'base') state = 'same';
|
|
362
|
+
if (change?.status === 'removed' && side === 'head') state = 'same';
|
|
363
|
+
const classes = change?.classifications?.join(',') || '';
|
|
364
|
+
return append(` data-delta-state="${esc(state)}"${classes ? ` data-delta-classifications="${esc(classes)}"` : ''}`);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
function markerFor(state) {
|
|
368
|
+
return ({ added: '+', removed: '−', changed: '~', moved: '↔', 'moved-from': '↔', rerouted: '↔', 'geometry-changed': '↔', 'evidence-changed': 'E' })[state] || '';
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function addNodeMarker(group, state) {
|
|
372
|
+
const symbol = markerFor(state);
|
|
373
|
+
if (!symbol) return group;
|
|
374
|
+
const box = group.match(/<rect x="([^"]+)" y="([^"]+)" width="([^"]+)"/);
|
|
375
|
+
if (!box) return group;
|
|
376
|
+
const x = Number(box[1]) + Number(box[3]) - 9;
|
|
377
|
+
const y = Number(box[2]) + 9;
|
|
378
|
+
return group.replace(/<\/g>$/, `\n <g class="delta-node-marker" aria-hidden="true"><circle cx="${x}" cy="${y}" r="8"/><text x="${x}" y="${y + 3}" text-anchor="middle">${symbol}</text></g>\n </g>`);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function prefixSvgIds(svg, prefix) {
|
|
382
|
+
const ids = [...svg.matchAll(/\sid="([^"]+)"/g)].map((match) => match[1]);
|
|
383
|
+
let result = svg.replace(/(\s)id="([^"]+)"/g, (_match, space, id) => `${space}id="${prefix}-${id}"`);
|
|
384
|
+
for (const id of ids) {
|
|
385
|
+
result = result.replaceAll(`url(#${id})`, `url(#${prefix}-${id})`).replaceAll(`href="#${id}"`, `href="#${prefix}-${id}"`);
|
|
386
|
+
}
|
|
387
|
+
result = result.replace(/aria-labelledby="([^"]+)"/g, (_match, value) => `aria-labelledby="${value.split(/\s+/).map((id) => `${prefix}-${id}`).join(' ')}"`);
|
|
388
|
+
return result;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function staticize(svg) {
|
|
392
|
+
return svg.replaceAll('tabindex="0" role="button"', 'role="group"').replaceAll(' aria-pressed="false"', '').replaceAll('aria-label="Focus ', 'aria-label="');
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function nodeGroupRanges(svg) {
|
|
396
|
+
const ranges = [];
|
|
397
|
+
const opener = /<g\s+[^>]*\bdata-node-id="([^"]+)"[^>]*>/g;
|
|
398
|
+
let open;
|
|
399
|
+
while ((open = opener.exec(svg))) {
|
|
400
|
+
const tags = /<\/?g\b[^>]*>/g;
|
|
401
|
+
tags.lastIndex = open.index;
|
|
402
|
+
let depth = 0;
|
|
403
|
+
let tag;
|
|
404
|
+
while ((tag = tags.exec(svg))) {
|
|
405
|
+
depth += tag[0].startsWith('</') ? -1 : 1;
|
|
406
|
+
if (depth === 0) {
|
|
407
|
+
ranges.push({ id: open[1], start: open.index, end: tags.lastIndex });
|
|
408
|
+
opener.lastIndex = tags.lastIndex;
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return ranges;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function transformNodeGroups(svg, transform) {
|
|
417
|
+
const ranges = nodeGroupRanges(svg);
|
|
418
|
+
let cursor = 0;
|
|
419
|
+
const parts = [];
|
|
420
|
+
for (const range of ranges) {
|
|
421
|
+
parts.push(svg.slice(cursor, range.start));
|
|
422
|
+
parts.push(transform(svg.slice(range.start, range.end), range.id));
|
|
423
|
+
cursor = range.end;
|
|
424
|
+
}
|
|
425
|
+
parts.push(svg.slice(cursor));
|
|
426
|
+
return parts.join('');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
const BOUNDARY_FRAME_RE = /<rect data-graph-role="structural-frame"[^>]*data-composition-frame-kind="([^"]+)"[^>]*data-composition-frame-label="([^"]+)"[^>]*\/>/g;
|
|
430
|
+
const BOUNDARY_LABEL_RE = /<g data-graph-role="structural-frame-label"[^>]*data-composition-frame-kind="([^"]+)"[^>]*data-composition-frame-label="([^"]+)"[^>]*>[\s\S]*?<\/g>/g;
|
|
431
|
+
|
|
432
|
+
function boundaryElements(svg) {
|
|
433
|
+
const collect = (pattern, part) => [...svg.matchAll(pattern)].map((match) => ({
|
|
434
|
+
start: match.index,
|
|
435
|
+
end: match.index + match[0].length,
|
|
436
|
+
markup: match[0],
|
|
437
|
+
key: `${match[1]}:${match[2]}`,
|
|
438
|
+
part,
|
|
439
|
+
}));
|
|
440
|
+
return [
|
|
441
|
+
...collect(BOUNDARY_FRAME_RE, 'frame'),
|
|
442
|
+
...collect(BOUNDARY_LABEL_RE, 'label'),
|
|
443
|
+
].sort((left, right) => left.start - right.start);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function transformBoundaryElements(svg, transform) {
|
|
447
|
+
let cursor = 0;
|
|
448
|
+
const parts = [];
|
|
449
|
+
for (const element of boundaryElements(svg)) {
|
|
450
|
+
parts.push(svg.slice(cursor, element.start));
|
|
451
|
+
parts.push(transform(element.markup, element.key, element.part));
|
|
452
|
+
cursor = element.end;
|
|
453
|
+
}
|
|
454
|
+
parts.push(svg.slice(cursor));
|
|
455
|
+
return parts.join('');
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function annotateArchitectureSideSvg(svg, receipt, side) {
|
|
459
|
+
const nodes = changeMap(receipt.changes.components);
|
|
460
|
+
const edges = changeMap(receipt.changes.connections);
|
|
461
|
+
const boundaries = boundaryChangeMap(receipt.changes.boundaries);
|
|
462
|
+
let result = transformBoundaryElements(svg, (markup, key, part) => {
|
|
463
|
+
const change = boundaries.get(key);
|
|
464
|
+
if (!change) return markup;
|
|
465
|
+
if (part === 'frame') {
|
|
466
|
+
return addState(markup, change, side)
|
|
467
|
+
.replace(/\/>$/, ` data-delta-boundary-key="${esc(change.key)}"/>`);
|
|
468
|
+
}
|
|
469
|
+
return markup.replace(
|
|
470
|
+
/<text[^>]*>/,
|
|
471
|
+
(tag) => tag.replace(/>$/, ` data-delta-state="${change.status}" data-delta-boundary-state="${change.status}" data-delta-boundary-key="${esc(change.key)}">`),
|
|
472
|
+
);
|
|
473
|
+
});
|
|
474
|
+
result = transformNodeGroups(result, (group, id) => {
|
|
475
|
+
const change = nodes.get(id);
|
|
476
|
+
if ((side === 'base' && change?.status === 'added') || (side === 'head' && change?.status === 'removed')) return group;
|
|
477
|
+
const tagged = group.replace(/^<g[^>]+>/, (tag) => addState(tag, change, side));
|
|
478
|
+
return addNodeMarker(tagged, change?.status);
|
|
479
|
+
});
|
|
480
|
+
result = result.replace(/<(?:path|g)\s+[^>]*\bdata-edge-id="([^"]+)"[^>]*>/g, (tag, id) => addState(tag, edges.get(id), side));
|
|
481
|
+
return prefixSvgIds(staticize(result), side);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
function elementById(svg, kind, id) {
|
|
485
|
+
const safe = id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
486
|
+
if (kind === 'node') {
|
|
487
|
+
const range = nodeGroupRanges(svg).find((candidate) => candidate.id === id);
|
|
488
|
+
return range ? svg.slice(range.start, range.end) : '';
|
|
489
|
+
}
|
|
490
|
+
const path = svg.match(new RegExp(`<path\\s+[^>]*\\bdata-edge-id="${safe}"[^>]*/>`))?.[0] || '';
|
|
491
|
+
const label = svg.match(new RegExp(`<g\\s+[^>]*\\bdata-edge-id="${safe}"[^>]*>[\\s\\S]*?<\\/g>`))?.[0] || '';
|
|
492
|
+
return [path, label].filter(Boolean).join('\n');
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function forceElementState(markup, state, classifications = []) {
|
|
496
|
+
let result;
|
|
497
|
+
if (markup.includes('data-node-id=')) {
|
|
498
|
+
result = markup.replace(/^<g\s+[^>]*>/, (tag) => addState(tag, { classifications }, 'delta', state));
|
|
499
|
+
} else {
|
|
500
|
+
result = markup
|
|
501
|
+
.replace(/<path\s+[^>]*\bdata-edge-id="[^"]+"[^>]*\/>/g, (tag) => addState(tag, { classifications }, 'delta', state))
|
|
502
|
+
.replace(/<g\s+[^>]*\bdata-edge-id="[^"]+"[^>]*>/g, (tag) => addState(tag, { classifications }, 'delta', state));
|
|
503
|
+
}
|
|
504
|
+
result = result.replace(/\bid="node-/, 'id="base-node-');
|
|
505
|
+
if (markup.includes('data-node-id=')) result = addNodeMarker(result, state);
|
|
506
|
+
return result;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function boundaryMarkupByKey(svg, key) {
|
|
510
|
+
return boundaryElements(svg)
|
|
511
|
+
.filter((element) => element.key === key)
|
|
512
|
+
.map((element) => element.markup)
|
|
513
|
+
.join('\n');
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function boundaryMarkupParts(markup) {
|
|
517
|
+
const parts = { frame: '', label: '' };
|
|
518
|
+
for (const element of boundaryElements(markup)) parts[element.part] = element.markup;
|
|
519
|
+
return parts;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
function forceBoundaryState(markup, state, key, classifications = []) {
|
|
523
|
+
return markup
|
|
524
|
+
.replace(/^<rect[^>]+\/>/, (tag) => addState(tag, { classifications }, 'delta', state).replace(/\/>$/, ` data-delta-boundary-key="${esc(key)}"/>`))
|
|
525
|
+
.replace(
|
|
526
|
+
/<rect data-graph-role="structural-frame-label-mask"[^>]*\/>/,
|
|
527
|
+
(tag) => addState(tag, { classifications }, 'delta', state)
|
|
528
|
+
.replace(/\/>$/, ` data-delta-boundary-state="${state}" data-delta-boundary-mask-key="${esc(key)}"/>`),
|
|
529
|
+
)
|
|
530
|
+
.replace(/<text[^>]*>/, (tag) => tag.replace(/>$/, ` data-delta-state="${state}" data-delta-boundary-state="${state}" data-delta-boundary-key="${esc(key)}">`));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function viewBoxSize(svg) {
|
|
534
|
+
const match = svg.match(/viewBox="0 0 ([\d.]+) ([\d.]+)"/);
|
|
535
|
+
return match ? [Number(match[1]), Number(match[2])] : [0, 0];
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function edgeSymbolMarkup(markup, state) {
|
|
539
|
+
const symbol = markerFor(state);
|
|
540
|
+
const point = markup.match(/data-composition-points="([\d.-]+),([\d.-]+)/);
|
|
541
|
+
const edgeId = markup.match(/\bdata-edge-id="([^"]+)"/)?.[1];
|
|
542
|
+
if (!symbol || !point) return '';
|
|
543
|
+
return `<text class="delta-edge-marker" data-delta-state="${state}"${edgeId ? ` data-edge-id="${esc(edgeId)}"` : ''} x="${Number(point[1]) + 9}" y="${Number(point[2]) - 7}" aria-hidden="true">${symbol}</text>`;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
function boundarySymbolMarkup(markup, state) {
|
|
547
|
+
const symbol = markerFor(state);
|
|
548
|
+
const frame = markup.match(/<rect[^>]*\bx="([\d.-]+)"\s+y="([\d.-]+)"\s+width="([\d.-]+)"/);
|
|
549
|
+
if (!symbol || !frame) return '';
|
|
550
|
+
const x = Number(frame[1]) + Number(frame[3]) - 12;
|
|
551
|
+
const y = Number(frame[2]) + 16;
|
|
552
|
+
return `<text class="delta-boundary-marker" data-delta-state="${state}" x="${x}" y="${y}" text-anchor="middle" aria-hidden="true">${symbol}</text>`;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export function buildDeltaSvg(baseSvg, headSvg, receipt) {
|
|
556
|
+
const [baseW, baseH] = viewBoxSize(baseSvg);
|
|
557
|
+
const [headW, headH] = viewBoxSize(headSvg);
|
|
558
|
+
// Baseline paths and their definitions must travel together in a namespace
|
|
559
|
+
// distinct from the current snapshot before the final Delta prefix is added.
|
|
560
|
+
const baseRelationshipsSvg = prefixSvgIds(baseSvg, 'base');
|
|
561
|
+
const nodes = changeMap(receipt.changes.components);
|
|
562
|
+
const edges = changeMap(receipt.changes.connections);
|
|
563
|
+
const boundaries = boundaryChangeMap(receipt.changes.boundaries);
|
|
564
|
+
const baseNodePhantoms = [];
|
|
565
|
+
const baseEdgePhantoms = [];
|
|
566
|
+
const baseBoundaryFramePhantoms = [];
|
|
567
|
+
const baseBoundaryLabelPhantoms = [];
|
|
568
|
+
const edgeMarkers = [];
|
|
569
|
+
const boundaryMarkers = [];
|
|
570
|
+
|
|
571
|
+
for (const change of nodes.values()) {
|
|
572
|
+
if (change.status === 'removed') baseNodePhantoms.push(forceElementState(elementById(baseSvg, 'node', change.id), 'removed', change.classifications));
|
|
573
|
+
else if (change.classifications.includes('geometry')) baseNodePhantoms.push(forceElementState(elementById(baseSvg, 'node', change.id), 'moved-from', change.classifications));
|
|
574
|
+
}
|
|
575
|
+
for (const change of edges.values()) {
|
|
576
|
+
if (change.status === 'removed' || change.classifications.includes('topology')) {
|
|
577
|
+
const phantom = forceElementState(elementById(baseRelationshipsSvg, 'edge', change.id), 'removed', change.classifications);
|
|
578
|
+
baseEdgePhantoms.push(phantom);
|
|
579
|
+
edgeMarkers.push(edgeSymbolMarkup(phantom, 'removed'));
|
|
580
|
+
} else if (change.classifications.includes('geometry')) {
|
|
581
|
+
const phantom = forceElementState(elementById(baseRelationshipsSvg, 'edge', change.id), 'moved-from', change.classifications);
|
|
582
|
+
baseEdgePhantoms.push(phantom);
|
|
583
|
+
edgeMarkers.push(edgeSymbolMarkup(phantom, 'moved-from'));
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
for (const change of boundaries.values()) {
|
|
587
|
+
const renderedKey = `${change.kind}:${esc(change.label)}`;
|
|
588
|
+
if (change.status === 'removed') {
|
|
589
|
+
const phantom = forceBoundaryState(boundaryMarkupByKey(baseSvg, renderedKey), 'removed', change.key, change.classifications);
|
|
590
|
+
const parts = boundaryMarkupParts(phantom);
|
|
591
|
+
baseBoundaryFramePhantoms.push(parts.frame);
|
|
592
|
+
baseBoundaryLabelPhantoms.push(parts.label);
|
|
593
|
+
boundaryMarkers.push(boundarySymbolMarkup(phantom, 'removed'));
|
|
594
|
+
}
|
|
595
|
+
else if (change.status === 'changed' || change.status === 'geometry-changed') {
|
|
596
|
+
const phantom = forceBoundaryState(boundaryMarkupByKey(baseSvg, renderedKey), 'moved-from', change.key, change.classifications);
|
|
597
|
+
const parts = boundaryMarkupParts(phantom);
|
|
598
|
+
baseBoundaryFramePhantoms.push(parts.frame);
|
|
599
|
+
baseBoundaryLabelPhantoms.push(parts.label);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
let delta = annotateArchitectureSideSvg(headSvg, receipt, 'head');
|
|
604
|
+
if (baseEdgePhantoms.length) {
|
|
605
|
+
const baseDefinitions = baseRelationshipsSvg.match(/<defs>([\s\S]*?)<\/defs>/)?.[1] || '';
|
|
606
|
+
delta = delta.replace('</defs>', `${baseDefinitions}</defs>`);
|
|
607
|
+
}
|
|
608
|
+
delta = delta.replace(/^<svg[^>]+>/, (tag) => tag.replace(/viewBox="[^"]+"/, `viewBox="0 0 ${Math.max(baseW, headW) + 24} ${Math.max(baseH, headH) + 24}"`));
|
|
609
|
+
delta = delta.replace(' <!-- Boundaries (behind everything) -->', ` <!-- Baseline boundary frame phantoms -->\n${baseBoundaryFramePhantoms.filter(Boolean).join('\n')}\n\n <!-- Boundaries (behind everything) -->`);
|
|
610
|
+
delta = delta.replace(' <!-- Connection paths (before components for correct z-order) -->', ` <!-- Baseline relationship phantoms -->\n${baseEdgePhantoms.join('\n')}\n\n <!-- Connection paths (before components for correct z-order) -->`);
|
|
611
|
+
delta = delta.replace(' <!-- Components -->', ` <!-- Baseline boundary label phantoms (below current components) -->\n${baseBoundaryLabelPhantoms.filter(Boolean).join('\n')}\n\n <!-- Baseline removed and move-from component phantoms -->\n${baseNodePhantoms.join('\n')}\n\n <!-- Components -->`);
|
|
612
|
+
|
|
613
|
+
for (const change of edges.values()) {
|
|
614
|
+
if (change.status === 'added' || change.status === 'changed' || change.status === 'rerouted') {
|
|
615
|
+
const current = elementById(delta, 'edge', change.id);
|
|
616
|
+
edgeMarkers.push(edgeSymbolMarkup(current, change.status === 'changed' && change.classifications.includes('topology') ? 'added' : change.status));
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
for (const change of boundaries.values()) {
|
|
620
|
+
if (!['added', 'changed', 'geometry-changed'].includes(change.status)) continue;
|
|
621
|
+
const renderedKey = `${change.kind}:${esc(change.label)}`;
|
|
622
|
+
boundaryMarkers.push(boundarySymbolMarkup(boundaryMarkupByKey(delta, renderedKey), change.status));
|
|
623
|
+
}
|
|
624
|
+
delta = delta.replace(' <!-- Legend -->', ` <!-- Delta relationship symbols -->\n${edgeMarkers.filter(Boolean).join('\n')}\n\n <!-- Delta boundary symbols -->\n${boundaryMarkers.filter(Boolean).join('\n')}\n\n <!-- Legend -->`);
|
|
625
|
+
return prefixSvgIds(staticize(delta), 'delta');
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export function architectureDeltaChangeRows(receipt) {
|
|
629
|
+
const rows = [];
|
|
630
|
+
for (const change of receipt.changes.components) rows.push({ ...change, kind: 'Component', kindKey: 'component', key: `component:${change.id}`, id: change.id });
|
|
631
|
+
for (const change of receipt.changes.connections) rows.push({ ...change, kind: 'Relationship', kindKey: 'relationship', key: `relationship:${change.id}`, id: change.id });
|
|
632
|
+
for (const change of receipt.changes.boundaries) rows.push({ ...change, kind: 'Boundary', kindKey: 'boundary', key: `boundary:${change.key}`, id: change.key });
|
|
633
|
+
return rows.sort((left, right) => codepointOrder(`${left.status}:${left.kind}:${left.id}`, `${right.status}:${right.kind}:${right.id}`));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
function reviewPrimaryStates(row) {
|
|
637
|
+
if (row.kindKey === 'component' && row.classifications.includes('geometry')) return [row.status, 'moved-from'];
|
|
638
|
+
if (row.kindKey === 'relationship' && row.status === 'changed' && row.classifications.includes('topology')) return ['changed', 'removed'];
|
|
639
|
+
if (row.kindKey === 'relationship' && row.classifications.includes('geometry')) return ['moved-from', row.status];
|
|
640
|
+
if (row.kindKey === 'boundary' && ['changed', 'geometry-changed'].includes(row.status)) return [row.status, 'moved-from'].sort();
|
|
641
|
+
return [row.status];
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
function reviewIdentity(row) {
|
|
645
|
+
const attribute = row.kindKey === 'component' ? 'data-node-id' : row.kindKey === 'relationship' ? 'data-edge-id' : 'data-delta-boundary-key';
|
|
646
|
+
return { attribute, value: esc(row.id) };
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function reviewTargetTags(deltaMarkup, row) {
|
|
650
|
+
const { attribute, value } = reviewIdentity(row);
|
|
651
|
+
const safeValue = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
652
|
+
const identity = new RegExp(`\\b${attribute}="${safeValue}"`);
|
|
653
|
+
return [...deltaMarkup.matchAll(/<([a-z][\w:-]*)\s+[^>]*>/g)]
|
|
654
|
+
.map((match) => ({ name: match[1], tag: match[0] }))
|
|
655
|
+
.filter(({ tag }) => identity.test(tag));
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
function primaryReviewTags(deltaMarkup, row) {
|
|
659
|
+
const tagName = row.kindKey === 'component' ? 'g' : row.kindKey === 'relationship' ? 'path' : 'rect';
|
|
660
|
+
return reviewTargetTags(deltaMarkup, row).filter(({ name }) => name === tagName).map(({ tag }) => tag);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
function reviewTargetSignature(tags) {
|
|
664
|
+
return tags.map(({ name, tag }) => {
|
|
665
|
+
const state = tag.match(/\bdata-delta-state="([^"]+)"/)?.[1] || '';
|
|
666
|
+
const classifications = tag.match(/\bdata-delta-classifications="([^"]*)"/)?.[1] || '';
|
|
667
|
+
return `${name}:${state}:${classifications}`;
|
|
668
|
+
}).sort(codepointOrder).join('|');
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function expectedReviewTargetSignature(row) {
|
|
672
|
+
const classifications = row.classifications.join(',');
|
|
673
|
+
const descriptors = [];
|
|
674
|
+
if (row.kindKey === 'component') {
|
|
675
|
+
for (const state of reviewPrimaryStates(row)) descriptors.push(`g:${state}:${classifications}`);
|
|
676
|
+
} else if (row.kindKey === 'boundary') {
|
|
677
|
+
for (const state of reviewPrimaryStates(row)) {
|
|
678
|
+
descriptors.push(`rect:${state}:${classifications}`, `text:${state}:`);
|
|
679
|
+
}
|
|
680
|
+
} else {
|
|
681
|
+
const forms = row.status === 'added'
|
|
682
|
+
? [{ state: 'added', marker: 'added', label: row.head?.label }]
|
|
683
|
+
: row.status === 'removed'
|
|
684
|
+
? [{ state: 'removed', marker: 'removed', label: row.base?.label }]
|
|
685
|
+
: row.classifications.includes('topology')
|
|
686
|
+
? [
|
|
687
|
+
{ state: 'removed', marker: 'removed', label: row.base?.label },
|
|
688
|
+
{ state: 'changed', marker: 'added', label: row.head?.label },
|
|
689
|
+
]
|
|
690
|
+
: row.classifications.includes('geometry')
|
|
691
|
+
? [
|
|
692
|
+
{ state: 'moved-from', marker: 'moved-from', label: row.base?.label },
|
|
693
|
+
{ state: row.status, marker: row.status, label: row.head?.label },
|
|
694
|
+
]
|
|
695
|
+
: [{ state: 'changed', marker: 'changed', label: row.head?.label }];
|
|
696
|
+
for (const form of forms) {
|
|
697
|
+
descriptors.push(`path:${form.state}:${classifications}`, `text:${form.marker}:`);
|
|
698
|
+
if (form.label) descriptors.push(`g:${form.state}:${classifications}`);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return descriptors.sort(codepointOrder).join('|');
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const total = (summary, key) => summary.components[key] + summary.connections[key] + summary.boundaries[key];
|
|
705
|
+
|
|
706
|
+
export function renderArchitectureDeltaHtml({ receipt, baseSvg, deltaSvg, headSvg, baseHtml = '', headHtml = '', artifactCss }) {
|
|
707
|
+
const rows = architectureDeltaChangeRows(receipt);
|
|
708
|
+
const changed = total(receipt.summary, 'changed');
|
|
709
|
+
const proof = receipt.proofLevel === 'revision-pinned' ? 'REVISION-PINNED INPUTS' : 'AUTHORED SNAPSHOTS';
|
|
710
|
+
const rowHtml = rows.length ? rows.map((row, index) => {
|
|
711
|
+
const label = row.headLabel || row.baseLabel || row.head?.label || row.base?.label || row.label || row.id;
|
|
712
|
+
const targetSignature = expectedReviewTargetSignature(row);
|
|
713
|
+
return `<li data-change-status="${esc(row.status)}"><button class="change-row" type="button" data-change-index="${index}" data-change-key="${esc(row.key)}" data-change-kind="${esc(row.kindKey)}" data-change-id="${esc(row.id)}" data-change-label="${esc(label)}" data-change-status="${esc(row.status)}" data-change-classifications="${esc(row.classifications.join(', '))}" data-change-target-signature="${esc(targetSignature)}"><span class="token">${esc(markerFor(row.status) || '~')}</span><span>${esc(row.kind)}</span><strong>${esc(label)}</strong><code>${esc(row.id)}</code><span>${esc(row.classifications.join(', '))}</span><span>${esc(row.changedFields.join(', ') || 'identity')}</span></button></li>`;
|
|
714
|
+
}).join('\n') : '<li class="empty">No authored architecture changes.</li>';
|
|
715
|
+
const baseView = baseHtml
|
|
716
|
+
? `<iframe class="snapshot-frame" title="Before architecture explorer" srcdoc="${esc(baseHtml)}"></iframe>`
|
|
717
|
+
: baseSvg;
|
|
718
|
+
const headView = headHtml
|
|
719
|
+
? `<iframe class="snapshot-frame" title="After architecture explorer" srcdoc="${esc(headHtml)}"></iframe>`
|
|
720
|
+
: headSvg;
|
|
721
|
+
const html = `<!doctype html>
|
|
722
|
+
<html lang="en" data-theme="dark" data-preset="${esc(receipt.view.visualPreset)}">
|
|
723
|
+
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${esc(receipt.head.title)} Architecture Delta</title>
|
|
724
|
+
<style>
|
|
725
|
+
${artifactCss}
|
|
726
|
+
:root{color-scheme:dark;--d-add:#34d399;--d-remove:#fb7185;--d-change:#fbbf24;--d-move:#7dd3fc;--d-focus:#7dd3fc;--d-ink:#e6edf5;--d-muted:#8aa0b5;--d-line:#25384a}
|
|
727
|
+
*{box-sizing:border-box}body{margin:0;overflow-x:hidden;background:#071019;color:var(--d-ink);font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace}.proof-page{width:min(1600px,calc(100vw - 64px));margin:auto;padding:30px 0 42px}.proof-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:end;padding-bottom:20px;border-bottom:1px solid var(--d-line)}.eyebrow{margin:0 0 8px;color:#7dd3fc;font:700 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em}.proof-head h1{margin:0;font-size:clamp(32px,4vw,56px);line-height:.96;letter-spacing:-.04em}.subtitle{margin:12px 0 0;color:var(--d-muted);font-size:14px}.metrics{display:flex;gap:9px}.metric{min-width:86px;padding:11px 13px;border:1px solid var(--d-line);border-radius:8px;background:#0b1722}.metric strong{display:block;font:700 23px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.metric span{display:block;margin-top:6px;color:var(--d-muted);font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.add strong{color:var(--d-add)}.remove strong{color:var(--d-remove)}.change strong{color:var(--d-change)}
|
|
728
|
+
.proof-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0 10px}.view-switch{display:inline-flex;padding:3px;border:1px solid var(--d-line);border-radius:8px;background:#0a141e}.view-switch button,.utility,.review-step{border:0;border-radius:6px;background:transparent;color:var(--d-muted);padding:8px 14px;font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer}.view-switch button[aria-selected="true"]{background:#173047;color:#fff}.utility{border:1px solid var(--d-line)}.view-switch button:focus-visible,.utility:focus-visible,.review-step:focus-visible,.change-row:focus-visible{outline:2px solid var(--d-focus);outline-offset:2px}.utility:disabled,.review-step:disabled{cursor:not-allowed;opacity:.45}.legend{display:flex;gap:16px;color:var(--d-muted);font:650 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:22px;border-top:3px solid currentColor}.legend .add{color:var(--d-add)}.legend .remove{color:var(--d-remove)}.legend .remove i{border-top-style:dashed}.legend .change{color:var(--d-change)}.legend .change i{border-top-style:dotted}.legend .move{color:var(--d-move)}.legend .move i{border-top-style:double}
|
|
729
|
+
.review-strip{display:grid;grid-template-columns:auto auto auto auto minmax(0,1fr);align-items:center;gap:5px;margin:0 0 10px;padding:7px 8px;border-block:1px solid var(--d-line);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.review-step{min-height:34px;border:1px solid var(--d-line);padding-inline:11px}.review-step[aria-pressed="true"]{border-color:var(--d-focus);color:var(--d-ink)}.review-status{min-width:0;padding-left:9px;color:var(--d-muted);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.review-status strong{color:var(--d-ink);font-weight:750}.review-status[data-state="unavailable"]{color:var(--d-remove)}
|
|
730
|
+
.canvas{overflow:hidden;border:1px solid var(--d-line);border-radius:10px;background:#09141e;padding:12px;min-height:520px}.canvas svg{display:block;width:100%;height:auto;max-height:72vh}.canvas[hidden]{display:none}.snapshot-frame{display:block;width:100%;height:min(76vh,920px);min-height:620px;border:0;border-radius:6px;background:#071019}.canvas[data-view="base"],.canvas[data-view="head"]{padding:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:.38}.canvas[data-delta-review-active]{--review-same-opacity:.14;--review-change-opacity:.28}.canvas[data-delta-review-active] [data-delta-state="same"]{opacity:var(--review-same-opacity)!important}.canvas[data-delta-review-active] [data-delta-state]:not([data-delta-state="same"]):not([data-delta-review-current]){opacity:var(--review-change-opacity)!important}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:opacity .16s ease-out}g[data-node-id][data-delta-state="added"]>rect:last-of-type{stroke:var(--d-add)!important;stroke-width:3!important}g[data-node-id][data-delta-state="removed"]>rect:last-of-type{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5}g[data-node-id][data-delta-state="changed"]>rect:last-of-type{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3}g[data-node-id][data-delta-state="moved"]>rect:last-of-type,g[data-node-id][data-delta-state="moved-from"]>rect:last-of-type{stroke:var(--d-move)!important;stroke-width:3!important;stroke-dasharray:8 3 2 3}g[data-node-id][data-delta-state="moved-from"],path[data-delta-state="moved-from"]{opacity:.42}path[data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:3!important}path[data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5!important}path[data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3!important}path[data-delta-state="rerouted"],path[data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2.5!important;stroke-dasharray:8 3 2 3!important}.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}[data-delta-state="added"] .delta-node-marker,.delta-edge-marker[data-delta-state="added"],.delta-boundary-marker[data-delta-state="added"]{color:var(--d-add)}[data-delta-state="removed"] .delta-node-marker,.delta-edge-marker[data-delta-state="removed"],.delta-boundary-marker[data-delta-state="removed"]{color:var(--d-remove)}[data-delta-state="changed"] .delta-node-marker,.delta-edge-marker[data-delta-state="changed"],.delta-boundary-marker[data-delta-state="changed"]{color:var(--d-change)}[data-delta-state="moved"] .delta-node-marker,[data-delta-state="moved-from"] .delta-node-marker,.delta-edge-marker[data-delta-state="moved-from"],.delta-edge-marker[data-delta-state="rerouted"],.delta-boundary-marker[data-delta-state="geometry-changed"]{color:var(--d-move)}.delta-edge-marker,.delta-boundary-marker{paint-order:stroke;stroke:#071019;stroke-width:3px}
|
|
731
|
+
rect[data-graph-role="structural-frame"][data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:2.5!important}rect[data-graph-role="structural-frame"][data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:2.5!important;stroke-dasharray:7 5!important}rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:2.5!important;stroke-dasharray:2 3!important}rect[data-graph-role="structural-frame"][data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2!important;stroke-dasharray:8 3 2 3!important;opacity:.42}text[data-delta-boundary-state="added"]{fill:var(--d-add)!important}text[data-delta-boundary-state="removed"]{fill:var(--d-remove)!important}text[data-delta-boundary-state="changed"]{fill:var(--d-change)!important}text[data-delta-boundary-state="moved-from"]{fill:var(--d-move)!important;opacity:.55}
|
|
732
|
+
details{margin-top:12px;border:1px solid var(--d-line);border-radius:9px;background:#0a141e}summary{padding:13px 15px;cursor:pointer;font-weight:700}.changes{list-style:none;margin:0;padding:0 8px 8px}.changes li{border-top:1px solid rgba(138,160,181,.16)}.change-row{display:grid;grid-template-columns:30px 90px minmax(140px,1fr) minmax(100px,.7fr) minmax(120px,.8fr) minmax(140px,1.2fr);gap:10px;width:100%;margin:0;padding:9px 7px;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:11px;text-align:left;align-items:baseline;cursor:pointer}.change-row:hover{background:rgba(125,211,252,.06)}.change-row[aria-current="step"]{background:rgba(125,211,252,.1);box-shadow:inset 0 0 0 1px var(--d-focus)}.change-row:disabled{cursor:default}.token{font:800 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.changes code,.change-row>span:last-child{color:var(--d-muted)}.proof-foot{display:flex;justify-content:space-between;gap:24px;margin-top:14px;color:var(--d-muted);font:650 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
733
|
+
html[data-theme="dark"] body{background:#071019!important;background-image:none!important}html[data-theme="light"]{color-scheme:light;--d-ink:#10283c;--d-muted:#587187;--d-line:#c8d6e2;--d-focus:#006b8f}html[data-theme="light"] body{background:#eef3f7!important;background-image:none!important;color:var(--d-ink)}html[data-theme="light"] .metric,html[data-theme="light"] .view-switch,html[data-theme="light"] details{background:#fff}html[data-theme="light"] .canvas{background:#f8fbfd}html[data-theme="light"] .view-switch button[aria-selected="true"]{background:#dbeaf5;color:#10283c}html[data-theme="light"] .delta-node-marker circle{fill:#fff}html[data-preset="blueprint"] body{background-image:none!important}
|
|
734
|
+
@media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}
|
|
735
|
+
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.canvas[data-delta-review-active] [data-delta-review-current]{transition:none!important}}@media print{body{min-width:0;background:#fff;color:#111}.proof-page{width:100%;padding:0}.proof-tools,.review-strip,details{display:none!important}.canvas{display:none!important}.canvas[data-view="delta"]{display:block!important;border:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:1!important;transition:none!important}.canvas[data-delta-review-active]{--review-same-opacity:1;--review-change-opacity:1}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:none!important}.proof-foot{color:#444}}
|
|
736
|
+
</style></head>
|
|
737
|
+
<body><main class="proof-page"><header class="proof-head"><div><p class="eyebrow">ARCHITECTURE DELTA · ${proof}</p><h1>See what changed<br>before you merge.</h1><p class="subtitle">${esc(receipt.base.title)} → ${esc(receipt.head.title)}</p></div><div class="metrics"><div class="metric add"><strong>${total(receipt.summary, 'added')}</strong><span>ADDED</span></div><div class="metric remove"><strong>${total(receipt.summary, 'removed')}</strong><span>REMOVED</span></div><div class="metric change"><strong>${changed}</strong><span>CHANGED</span></div></div></header>
|
|
738
|
+
<div class="proof-tools"><div class="view-switch" role="tablist" aria-label="Architecture snapshot"><button role="tab" data-target="base" aria-selected="false">Before</button><button role="tab" data-target="delta" aria-selected="true">Delta</button><button role="tab" data-target="head" aria-selected="false">After</button></div><div class="legend"><span class="add"><i></i>+ ADD</span><span class="remove"><i></i>− DEL</span><span class="change"><i></i>~ MOD</span><span class="move"><i></i>↔ MOVE</span></div><div><button class="utility" id="export-svg" type="button">Export SVG</button> <button class="utility" id="share-card" type="button">Share Card</button> <button class="utility" id="preset" type="button">Preset</button> <button class="utility" id="theme" type="button">Theme</button></div></div>
|
|
739
|
+
<nav class="review-strip" aria-label="Authored change review"><button class="review-step" id="review-overview" type="button" disabled>Overview</button><button class="review-step" id="review-previous" type="button" aria-label="Previous authored change" disabled>←</button><button class="review-step" id="review-play" type="button" aria-pressed="false"${rows.length ? '' : ' disabled'}>Review</button><button class="review-step" id="review-next" type="button" aria-label="Next authored change" disabled>→</button><div class="review-status" id="review-status" role="status" aria-live="polite">Overview · ${rows.length} authored changes</div></nav>
|
|
740
|
+
<section class="canvas" data-view="base" hidden>${baseView}</section><section class="canvas" data-view="delta">${deltaSvg}</section><section class="canvas" data-view="head" hidden>${headView}</section>
|
|
741
|
+
<details${rows.length <= 10 ? ' open' : ''}><summary>Exact authored changes · ${rows.length}</summary><ul class="changes">${rowHtml}</ul></details>
|
|
742
|
+
<footer class="proof-foot"><span>Stable IDs only · completeness: complete · ${proof}</span><span>Authored IR only · no risk or mergeability inference</span></footer></main>
|
|
743
|
+
<script id="archify-compare-receipt" type="application/json">${safeJson(receipt)}</script>
|
|
744
|
+
<script>(()=>{
|
|
745
|
+
const REVIEW_DWELL_MS = 1400;
|
|
746
|
+
const tabs = [...document.querySelectorAll('[role="tab"]')];
|
|
747
|
+
const views = [...document.querySelectorAll('[data-view]')];
|
|
748
|
+
const deltaCanvas = document.querySelector('[data-view="delta"]');
|
|
749
|
+
const rowButtons = [...document.querySelectorAll('.change-row')];
|
|
750
|
+
const overviewButton = document.querySelector('#review-overview');
|
|
751
|
+
const previousButton = document.querySelector('#review-previous');
|
|
752
|
+
const playButton = document.querySelector('#review-play');
|
|
753
|
+
const nextButton = document.querySelector('#review-next');
|
|
754
|
+
const status = document.querySelector('#review-status');
|
|
755
|
+
const receiptNode = document.querySelector('#archify-compare-receipt');
|
|
756
|
+
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
757
|
+
const exportCss = ${safeJson(artifactCss)};
|
|
758
|
+
let activeIndex = -1;
|
|
759
|
+
let playbackToken = 0;
|
|
760
|
+
let playbackTimer = 0;
|
|
761
|
+
let playing = false;
|
|
762
|
+
let reviewAvailable = false;
|
|
763
|
+
let reviewSources = [];
|
|
764
|
+
|
|
765
|
+
function show(id) {
|
|
766
|
+
tabs.forEach((tab) => tab.setAttribute('aria-selected', String(tab.dataset.target === id)));
|
|
767
|
+
views.forEach((view) => { view.hidden = view.dataset.view !== id; });
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
function stopPlayback() {
|
|
771
|
+
playbackToken += 1;
|
|
772
|
+
if (playbackTimer) window.clearTimeout(playbackTimer);
|
|
773
|
+
playbackTimer = 0;
|
|
774
|
+
playing = false;
|
|
775
|
+
playButton.setAttribute('aria-pressed', 'false');
|
|
776
|
+
playButton.textContent = activeIndex === rowButtons.length - 1 && rowButtons.length ? 'Replay' : 'Review';
|
|
777
|
+
status.setAttribute('aria-live', 'polite');
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
function failReview() {
|
|
781
|
+
stopPlayback();
|
|
782
|
+
reviewAvailable = false;
|
|
783
|
+
activeIndex = -1;
|
|
784
|
+
deltaCanvas?.removeAttribute('data-delta-review-active');
|
|
785
|
+
deltaCanvas?.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
|
|
786
|
+
rowButtons.forEach((row) => {
|
|
787
|
+
row.disabled = true;
|
|
788
|
+
row.tabIndex = -1;
|
|
789
|
+
row.removeAttribute('aria-current');
|
|
790
|
+
});
|
|
791
|
+
[overviewButton, previousButton, playButton, nextButton].forEach((button) => { button.disabled = true; });
|
|
792
|
+
status.dataset.state = 'unavailable';
|
|
793
|
+
status.textContent = 'Review unavailable · compare identity mismatch';
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function receiptRows(receipt) {
|
|
797
|
+
const definitions = [
|
|
798
|
+
{ collection: 'components', kind: 'component', id: 'id', statuses: ['added', 'changed', 'evidence-changed', 'removed', 'moved'] },
|
|
799
|
+
{ collection: 'connections', kind: 'relationship', id: 'id', statuses: ['added', 'changed', 'removed', 'rerouted'] },
|
|
800
|
+
{ collection: 'boundaries', kind: 'boundary', id: 'key', statuses: ['added', 'changed', 'removed', 'geometry-changed'] },
|
|
801
|
+
];
|
|
802
|
+
const rows = [];
|
|
803
|
+
for (const definition of definitions) {
|
|
804
|
+
const changes = receipt.changes[definition.collection];
|
|
805
|
+
if (!Array.isArray(changes)) return null;
|
|
806
|
+
for (const change of changes) {
|
|
807
|
+
if (!change || typeof change !== 'object' || Array.isArray(change)) return null;
|
|
808
|
+
const id = change[definition.id];
|
|
809
|
+
if (typeof id !== 'string' || !id || !definition.statuses.includes(change.status)) return null;
|
|
810
|
+
if (!Array.isArray(change.classifications) || !change.classifications.length || change.classifications.some((value) => typeof value !== 'string')) return null;
|
|
811
|
+
if (new Set(change.classifications).size !== change.classifications.length) return null;
|
|
812
|
+
if (!Array.isArray(change.changedFields) || change.changedFields.some((value) => typeof value !== 'string')) return null;
|
|
813
|
+
rows.push({ ...change, kind: definition.kind, key: definition.kind + ':' + id, id });
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return rows;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function exactTargets(row) {
|
|
820
|
+
const attribute = row.dataset.changeKind === 'component'
|
|
821
|
+
? 'data-node-id'
|
|
822
|
+
: row.dataset.changeKind === 'relationship'
|
|
823
|
+
? 'data-edge-id'
|
|
824
|
+
: 'data-delta-boundary-key';
|
|
825
|
+
return [...deltaCanvas.querySelectorAll('[' + attribute + ']')]
|
|
826
|
+
.filter((element) => element.getAttribute(attribute) === row.dataset.changeId);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
function targetSignature(matches) {
|
|
830
|
+
return matches.map((element) => {
|
|
831
|
+
const tag = element.tagName.toLowerCase();
|
|
832
|
+
const state = element.dataset.deltaState || '';
|
|
833
|
+
const classifications = element.dataset.deltaClassifications || '';
|
|
834
|
+
return tag + ':' + state + ':' + classifications;
|
|
835
|
+
}).sort().join('|');
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function targetsMatch(source, row, matches) {
|
|
839
|
+
if (!source || !matches.length || !row.dataset.changeTargetSignature) return false;
|
|
840
|
+
if (row.dataset.changeKind !== source.kind || row.dataset.changeId !== source.id || row.dataset.changeStatus !== source.status) return false;
|
|
841
|
+
if (row.dataset.changeClassifications !== source.classifications.join(', ')) return false;
|
|
842
|
+
return row.dataset.changeTargetSignature === targetSignature(matches);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
function validateReview() {
|
|
846
|
+
try {
|
|
847
|
+
if (document.querySelectorAll('#archify-compare-receipt').length !== 1 || !receiptNode) return false;
|
|
848
|
+
if (!deltaCanvas || !['base', 'delta', 'head'].every((id) => document.querySelectorAll('[data-view="' + id + '"]').length === 1)) return false;
|
|
849
|
+
if (deltaCanvas.children.length !== 1 || deltaCanvas.firstElementChild?.tagName.toLowerCase() !== 'svg') return false;
|
|
850
|
+
const receipt = JSON.parse(receiptNode.textContent);
|
|
851
|
+
if (!receipt || receipt.schemaVersion !== 1 || receipt.command !== 'compare' || receipt.completeness !== 'complete' || !receipt.changes) return false;
|
|
852
|
+
const sources = receiptRows(receipt);
|
|
853
|
+
if (!sources || sources.length !== rowButtons.length) return false;
|
|
854
|
+
const sourceByKey = new Map(sources.map((source) => [source.key, source]));
|
|
855
|
+
if (sourceByKey.size !== sources.length) return false;
|
|
856
|
+
const seen = new Set();
|
|
857
|
+
const orderedSources = [];
|
|
858
|
+
for (let index = 0; index < rowButtons.length; index += 1) {
|
|
859
|
+
const row = rowButtons[index];
|
|
860
|
+
const source = sourceByKey.get(row.dataset.changeKey);
|
|
861
|
+
if (!source || seen.has(source.key) || row.dataset.changeIndex !== String(index)) return false;
|
|
862
|
+
const matches = exactTargets(row);
|
|
863
|
+
if (!targetsMatch(source, row, matches)) return false;
|
|
864
|
+
seen.add(source.key);
|
|
865
|
+
orderedSources.push(source);
|
|
866
|
+
}
|
|
867
|
+
if (seen.size !== sourceByKey.size) return false;
|
|
868
|
+
reviewSources = orderedSources;
|
|
869
|
+
return true;
|
|
870
|
+
} catch {
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
function updateControls() {
|
|
876
|
+
overviewButton.disabled = !reviewAvailable || activeIndex < 0;
|
|
877
|
+
previousButton.disabled = !reviewAvailable || activeIndex <= 0;
|
|
878
|
+
nextButton.disabled = !reviewAvailable || activeIndex < 0 || activeIndex >= rowButtons.length - 1;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
function selectChange(index, fromPlayback = false) {
|
|
882
|
+
if (!reviewAvailable || index < 0 || index >= rowButtons.length) return false;
|
|
883
|
+
const row = rowButtons[index];
|
|
884
|
+
const matches = exactTargets(row);
|
|
885
|
+
if (!targetsMatch(reviewSources[index], row, matches)) { failReview(); return false; }
|
|
886
|
+
show('delta');
|
|
887
|
+
deltaCanvas.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
|
|
888
|
+
matches.forEach((element) => element.setAttribute('data-delta-review-current', 'true'));
|
|
889
|
+
deltaCanvas.setAttribute('data-delta-review-active', 'true');
|
|
890
|
+
rowButtons.forEach((button, rowIndex) => {
|
|
891
|
+
button.tabIndex = rowIndex === index ? 0 : -1;
|
|
892
|
+
if (rowIndex === index) button.setAttribute('aria-current', 'step');
|
|
893
|
+
else button.removeAttribute('aria-current');
|
|
894
|
+
});
|
|
895
|
+
activeIndex = index;
|
|
896
|
+
updateControls();
|
|
897
|
+
const kind = row.dataset.changeKind.charAt(0).toUpperCase() + row.dataset.changeKind.slice(1);
|
|
898
|
+
status.textContent = String(index + 1).padStart(2, '0') + ' / ' + String(rowButtons.length).padStart(2, '0') + ' · ' + kind + ' · ' + row.dataset.changeLabel + ' [' + row.dataset.changeId + '] · ' + row.dataset.changeClassifications;
|
|
899
|
+
if (fromPlayback) status.setAttribute('aria-live', 'off');
|
|
900
|
+
return true;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
function overview() {
|
|
904
|
+
if (!reviewAvailable) { failReview(); return; }
|
|
905
|
+
stopPlayback();
|
|
906
|
+
activeIndex = -1;
|
|
907
|
+
deltaCanvas.removeAttribute('data-delta-review-active');
|
|
908
|
+
deltaCanvas.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
|
|
909
|
+
rowButtons.forEach((row, index) => {
|
|
910
|
+
row.tabIndex = index === 0 ? 0 : -1;
|
|
911
|
+
row.removeAttribute('aria-current');
|
|
912
|
+
});
|
|
913
|
+
show('delta');
|
|
914
|
+
status.removeAttribute('data-state');
|
|
915
|
+
status.textContent = 'Overview · ' + rowButtons.length + ' authored changes';
|
|
916
|
+
updateControls();
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
function schedulePlayback(token) {
|
|
920
|
+
if (!playing || token !== playbackToken || activeIndex >= rowButtons.length - 1) {
|
|
921
|
+
if (activeIndex >= rowButtons.length - 1) stopPlayback();
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
playbackTimer = window.setTimeout(() => {
|
|
925
|
+
if (!playing || token !== playbackToken) return;
|
|
926
|
+
if (!selectChange(activeIndex + 1, true)) return;
|
|
927
|
+
schedulePlayback(token);
|
|
928
|
+
}, REVIEW_DWELL_MS);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
function startReview() {
|
|
932
|
+
if (!reviewAvailable) return;
|
|
933
|
+
if (playing) { stopPlayback(); return; }
|
|
934
|
+
stopPlayback();
|
|
935
|
+
if (!selectChange(0, false)) return;
|
|
936
|
+
if (reducedMotion.matches || rowButtons.length < 2) return;
|
|
937
|
+
playing = true;
|
|
938
|
+
const token = ++playbackToken;
|
|
939
|
+
playButton.textContent = 'Pause';
|
|
940
|
+
playButton.setAttribute('aria-pressed', 'true');
|
|
941
|
+
status.setAttribute('aria-live', 'off');
|
|
942
|
+
schedulePlayback(token);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function canonicalDeltaSvg() {
|
|
946
|
+
const source = deltaCanvas?.querySelector(':scope > svg');
|
|
947
|
+
if (!source) throw new Error('Canonical Delta SVG is unavailable.');
|
|
948
|
+
const clone = source.cloneNode(true);
|
|
949
|
+
clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
950
|
+
clone.removeAttribute('style');
|
|
951
|
+
clone.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
|
|
952
|
+
const style = document.createElementNS('http://www.w3.org/2000/svg', 'style');
|
|
953
|
+
style.textContent = exportCss + '\\n' +
|
|
954
|
+
'[data-delta-state="same"]{opacity:.38}' +
|
|
955
|
+
'[data-delta-state="added"]{--delta:#34d399}' +
|
|
956
|
+
'[data-delta-state="removed"]{--delta:#fb7185}' +
|
|
957
|
+
'[data-delta-state="changed"]{--delta:#fbbf24}' +
|
|
958
|
+
'[data-delta-state="moved"],[data-delta-state="moved-from"],[data-delta-state="rerouted"],[data-delta-state="geometry-changed"]{--delta:#7dd3fc}' +
|
|
959
|
+
'g[data-node-id][data-delta-state]:not([data-delta-state="same"])>rect:last-of-type{stroke:var(--delta)!important;stroke-width:3!important}' +
|
|
960
|
+
'path[data-delta-state]:not([data-delta-state="same"]){stroke:var(--delta)!important;stroke-width:3!important}' +
|
|
961
|
+
'rect[data-graph-role="structural-frame"][data-delta-state]:not([data-delta-state="same"]){stroke:var(--delta)!important;stroke-width:2.5!important}' +
|
|
962
|
+
'rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke-dasharray:2 3!important}' +
|
|
963
|
+
'[data-delta-state="removed"],[data-delta-state="moved-from"]{stroke-dasharray:7 5!important}' +
|
|
964
|
+
'[data-delta-state="moved-from"]{opacity:.42}' +
|
|
965
|
+
'[data-delta-state]:not([data-delta-state="same"]) .delta-node-marker,.delta-edge-marker[data-delta-state],.delta-boundary-marker[data-delta-state]{color:var(--delta)}' +
|
|
966
|
+
'text[data-delta-boundary-state="added"]{fill:#34d399!important}text[data-delta-boundary-state="removed"]{fill:#fb7185!important}text[data-delta-boundary-state="changed"]{fill:#fbbf24!important}text[data-delta-boundary-state="moved-from"]{fill:#7dd3fc!important;opacity:.55}' +
|
|
967
|
+
'.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}';
|
|
968
|
+
clone.insertBefore(style, clone.firstChild);
|
|
969
|
+
// The XML declaration pins UTF-8: without it, consumers that guess an
|
|
970
|
+
// encoding instead of defaulting to UTF-8 mangle non-ASCII text.
|
|
971
|
+
return '<?xml version="1.0" encoding="UTF-8"?>\\n' + new XMLSerializer().serializeToString(clone);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
function artifactName(suffix) {
|
|
975
|
+
const title = String(JSON.parse(receiptNode.textContent).head.title || 'architecture-delta')
|
|
976
|
+
.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'architecture-delta';
|
|
977
|
+
return title + suffix;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
function downloadBlob(blob, name) {
|
|
981
|
+
const url = URL.createObjectURL(blob);
|
|
982
|
+
const link = document.createElement('a');
|
|
983
|
+
link.href = url;
|
|
984
|
+
link.download = name;
|
|
985
|
+
document.body.appendChild(link);
|
|
986
|
+
link.click();
|
|
987
|
+
link.remove();
|
|
988
|
+
window.setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
function recordExport(format, blob, dimensions) {
|
|
992
|
+
document.documentElement.dataset.archifyDeltaExport = JSON.stringify({
|
|
993
|
+
ok: true,
|
|
994
|
+
format,
|
|
995
|
+
bytes: blob.size,
|
|
996
|
+
mime: blob.type,
|
|
997
|
+
...(dimensions || {}),
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
function exportCanonicalSvg() {
|
|
1002
|
+
const blob = new Blob([canonicalDeltaSvg()], { type: 'image/svg+xml;charset=utf-8' });
|
|
1003
|
+
downloadBlob(blob, artifactName('-architecture-delta.svg'));
|
|
1004
|
+
recordExport('svg', blob);
|
|
1005
|
+
return blob;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
function loadSvgImage(blob) {
|
|
1009
|
+
return new Promise((resolve, reject) => {
|
|
1010
|
+
const url = URL.createObjectURL(blob);
|
|
1011
|
+
const image = new Image();
|
|
1012
|
+
image.onload = () => { URL.revokeObjectURL(url); resolve(image); };
|
|
1013
|
+
image.onerror = () => { URL.revokeObjectURL(url); reject(new Error('Could not rasterize canonical Delta SVG.')); };
|
|
1014
|
+
image.src = url;
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
function pngBlob(canvas) {
|
|
1019
|
+
return new Promise((resolve, reject) => canvas.toBlob((blob) => {
|
|
1020
|
+
if (blob) resolve(blob);
|
|
1021
|
+
else reject(new Error('Canvas returned no Share Card PNG.'));
|
|
1022
|
+
}, 'image/png'));
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
async function shareCard() {
|
|
1026
|
+
const receipt = JSON.parse(receiptNode.textContent);
|
|
1027
|
+
const canvas = document.createElement('canvas');
|
|
1028
|
+
canvas.width = 1200;
|
|
1029
|
+
canvas.height = 630;
|
|
1030
|
+
const ctx = canvas.getContext('2d');
|
|
1031
|
+
if (!ctx) throw new Error('2D canvas context unavailable for Architecture Delta Share Card.');
|
|
1032
|
+
ctx.fillStyle = '#071019';
|
|
1033
|
+
ctx.fillRect(0, 0, 1200, 630);
|
|
1034
|
+
ctx.fillStyle = '#0b1722';
|
|
1035
|
+
ctx.fillRect(34, 28, 1132, 574);
|
|
1036
|
+
ctx.strokeStyle = '#25384a';
|
|
1037
|
+
ctx.lineWidth = 2;
|
|
1038
|
+
ctx.strokeRect(34, 28, 1132, 574);
|
|
1039
|
+
ctx.font = '700 18px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
1040
|
+
ctx.fillStyle = '#7dd3fc';
|
|
1041
|
+
ctx.fillText('ARCHITECTURE DELTA', 66, 68);
|
|
1042
|
+
ctx.font = '700 34px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
1043
|
+
ctx.fillStyle = '#e6edf5';
|
|
1044
|
+
const title = String(receipt.head.title || 'Architecture').slice(0, 46) + ' Architecture Delta';
|
|
1045
|
+
ctx.fillText(title.slice(0, 58), 66, 112);
|
|
1046
|
+
ctx.font = '700 17px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
1047
|
+
ctx.fillStyle = '#8aa0b5';
|
|
1048
|
+
const componentLine = 'COMPONENTS +' + receipt.summary.components.added + ' ~' + receipt.summary.components.changed + ' −' + receipt.summary.components.removed;
|
|
1049
|
+
const connectionLine = 'CONNECTIONS +' + receipt.summary.connections.added + ' ~' + receipt.summary.connections.changed + ' −' + receipt.summary.connections.removed;
|
|
1050
|
+
const boundaryLine = 'BOUNDARY SCOPE +' + receipt.summary.boundaries.added + ' ~' + receipt.summary.boundaries.changed + ' −' + receipt.summary.boundaries.removed;
|
|
1051
|
+
ctx.fillText(componentLine, 66, 151);
|
|
1052
|
+
ctx.fillText(connectionLine, 420, 151);
|
|
1053
|
+
ctx.fillText(boundaryLine, 786, 151);
|
|
1054
|
+
ctx.font = '650 14px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
1055
|
+
const authoredChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => {
|
|
1056
|
+
const summary = receipt.summary[collection];
|
|
1057
|
+
return sum + summary.added + summary.changed + summary.removed;
|
|
1058
|
+
}, 0);
|
|
1059
|
+
const movementSummary = '↔ moved ' + receipt.summary.components.moved + ' · rerouted ' + receipt.summary.connections.rerouted + ' · presentation ' + (receipt.summary.presentationChanged ? 'changed' : 'unchanged');
|
|
1060
|
+
const secondary = authoredChanges === 0
|
|
1061
|
+
? 'No authored architecture changes · ' + movementSummary
|
|
1062
|
+
: movementSummary;
|
|
1063
|
+
ctx.fillText(secondary, 66, 181);
|
|
1064
|
+
const proofLine = receipt.proofLevel === 'revision-pinned'
|
|
1065
|
+
? 'REV ' + String(receipt.base.revision).slice(0, 8) + ' → ' + String(receipt.head.revision).slice(0, 8) + ' · REVISION-PINNED INPUTS'
|
|
1066
|
+
: 'AUTHORED SNAPSHOTS';
|
|
1067
|
+
ctx.textAlign = 'right';
|
|
1068
|
+
ctx.fillText(proofLine, 1134, 181);
|
|
1069
|
+
ctx.textAlign = 'left';
|
|
1070
|
+
ctx.fillStyle = '#09141e';
|
|
1071
|
+
ctx.fillRect(66, 206, 1068, 358);
|
|
1072
|
+
ctx.strokeStyle = '#25384a';
|
|
1073
|
+
ctx.strokeRect(66, 206, 1068, 358);
|
|
1074
|
+
const svgBlob = new Blob([canonicalDeltaSvg()], { type: 'image/svg+xml;charset=utf-8' });
|
|
1075
|
+
const image = await loadSvgImage(svgBlob);
|
|
1076
|
+
const ratio = Math.min(1024 / image.width, 322 / image.height);
|
|
1077
|
+
const width = image.width * ratio;
|
|
1078
|
+
const height = image.height * ratio;
|
|
1079
|
+
ctx.drawImage(image, 600 - width / 2, 385 - height / 2, width, height);
|
|
1080
|
+
ctx.font = '650 12px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
1081
|
+
ctx.fillStyle = '#8aa0b5';
|
|
1082
|
+
ctx.fillText('Stable authored IDs · static complete Delta · no risk or mergeability inference', 66, 588);
|
|
1083
|
+
return pngBlob(canvas);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
async function downloadShareCard() {
|
|
1087
|
+
const blob = await shareCard();
|
|
1088
|
+
downloadBlob(blob, artifactName('-architecture-delta-share-card.png'));
|
|
1089
|
+
recordExport('share-card', blob, { width: 1200, height: 630 });
|
|
1090
|
+
return blob;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
window.Archify = window.Archify || {};
|
|
1094
|
+
window.Archify.deltaExport = { canonicalSvg: canonicalDeltaSvg, shareCard, exportSvg: exportCanonicalSvg, downloadShareCard };
|
|
1095
|
+
window.Archify.exportMenu = {
|
|
1096
|
+
shareCard,
|
|
1097
|
+
run(format) {
|
|
1098
|
+
if (format === 'svg') return exportCanonicalSvg();
|
|
1099
|
+
if (format === 'share-card') return downloadShareCard();
|
|
1100
|
+
throw new Error('Unknown Architecture Delta export format: ' + format);
|
|
1101
|
+
},
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
tabs.forEach((tab, index) => {
|
|
1105
|
+
tab.addEventListener('click', () => { stopPlayback(); show(tab.dataset.target); });
|
|
1106
|
+
tab.addEventListener('keydown', (event) => {
|
|
1107
|
+
if (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) return;
|
|
1108
|
+
event.preventDefault();
|
|
1109
|
+
stopPlayback();
|
|
1110
|
+
const next = event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : (index + (event.key === 'ArrowRight' ? 1 : -1) + tabs.length) % tabs.length;
|
|
1111
|
+
tabs[next].focus();
|
|
1112
|
+
show(tabs[next].dataset.target);
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
|
|
1116
|
+
rowButtons.forEach((row, index) => {
|
|
1117
|
+
row.tabIndex = index === 0 ? 0 : -1;
|
|
1118
|
+
row.addEventListener('click', () => { stopPlayback(); selectChange(index); });
|
|
1119
|
+
row.addEventListener('keydown', (event) => {
|
|
1120
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1121
|
+
event.preventDefault();
|
|
1122
|
+
stopPlayback();
|
|
1123
|
+
selectChange(index);
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
if (!['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) return;
|
|
1127
|
+
event.preventDefault();
|
|
1128
|
+
stopPlayback();
|
|
1129
|
+
const next = event.key === 'Home' ? 0 : event.key === 'End' ? rowButtons.length - 1 : (index + (event.key === 'ArrowDown' ? 1 : -1) + rowButtons.length) % rowButtons.length;
|
|
1130
|
+
rowButtons.forEach((button, rowIndex) => { button.tabIndex = rowIndex === next ? 0 : -1; });
|
|
1131
|
+
rowButtons[next].focus();
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
|
|
1135
|
+
overviewButton.addEventListener('click', overview);
|
|
1136
|
+
previousButton.addEventListener('click', () => { stopPlayback(); selectChange(activeIndex - 1); });
|
|
1137
|
+
nextButton.addEventListener('click', () => { stopPlayback(); selectChange(activeIndex + 1); });
|
|
1138
|
+
playButton.addEventListener('click', startReview);
|
|
1139
|
+
document.addEventListener('focusin', (event) => {
|
|
1140
|
+
if (playing && event.target.closest('button')) stopPlayback();
|
|
1141
|
+
});
|
|
1142
|
+
document.addEventListener('visibilitychange', () => { if (document.hidden) stopPlayback(); });
|
|
1143
|
+
window.addEventListener('beforeprint', overview);
|
|
1144
|
+
reducedMotion.addEventListener('change', () => { if (reducedMotion.matches) stopPlayback(); });
|
|
1145
|
+
document.addEventListener('keydown', (event) => {
|
|
1146
|
+
if (event.key === 'Escape' && activeIndex >= 0) {
|
|
1147
|
+
event.preventDefault();
|
|
1148
|
+
overview();
|
|
1149
|
+
playButton.focus();
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
|
|
1153
|
+
document.querySelector('#theme').addEventListener('click', () => { document.documentElement.dataset.theme = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark'; });
|
|
1154
|
+
const presets = ['classic', 'signal-flow', 'blueprint'];
|
|
1155
|
+
document.querySelector('#preset').addEventListener('click', () => { const now = document.documentElement.dataset.preset; document.documentElement.dataset.preset = presets[(presets.indexOf(now) + 1) % presets.length]; });
|
|
1156
|
+
document.querySelector('#export-svg').addEventListener('click', exportCanonicalSvg);
|
|
1157
|
+
document.querySelector('#share-card').addEventListener('click', () => { downloadShareCard().catch((error) => window.alert(error.message)); });
|
|
1158
|
+
|
|
1159
|
+
reviewAvailable = validateReview();
|
|
1160
|
+
if (!reviewAvailable) failReview();
|
|
1161
|
+
else {
|
|
1162
|
+
status.removeAttribute('data-state');
|
|
1163
|
+
updateControls();
|
|
1164
|
+
}
|
|
1165
|
+
})();</script></body></html>`;
|
|
1166
|
+
return html.replace(/[ \t]+$/gm, '');
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
export function validateArchitectureDeltaHtml(html, receipt) {
|
|
1170
|
+
const failures = [];
|
|
1171
|
+
const rows = architectureDeltaChangeRows(receipt);
|
|
1172
|
+
const deltaMarkup = html.match(/<section class="canvas" data-view="delta">([\s\S]*?)<\/section>/)?.[1] || '';
|
|
1173
|
+
const svgTags = [...deltaMarkup.matchAll(/<\/?svg\b[^>]*>/g)];
|
|
1174
|
+
let svgDepth = 0;
|
|
1175
|
+
let svgRoots = 0;
|
|
1176
|
+
let rootStart = -1;
|
|
1177
|
+
let rootEnd = -1;
|
|
1178
|
+
let svgBalanced = true;
|
|
1179
|
+
for (const match of svgTags) {
|
|
1180
|
+
if (match[0].startsWith('</')) {
|
|
1181
|
+
svgDepth -= 1;
|
|
1182
|
+
if (svgDepth < 0) svgBalanced = false;
|
|
1183
|
+
if (svgDepth === 0) rootEnd = match.index + match[0].length;
|
|
1184
|
+
} else {
|
|
1185
|
+
if (svgDepth === 0) {
|
|
1186
|
+
svgRoots += 1;
|
|
1187
|
+
if (rootStart < 0) rootStart = match.index;
|
|
1188
|
+
}
|
|
1189
|
+
svgDepth += 1;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
if (!['base', 'delta', 'head'].every((id) => (html.match(new RegExp(`<section class="canvas" data-view="${id}"`, 'g')) || []).length === 1)) failures.push('expected one Before, Delta, and After canvas');
|
|
1193
|
+
if ((html.match(/class="snapshot-frame" title="Before architecture explorer"/g) || []).length !== 1
|
|
1194
|
+
|| (html.match(/class="snapshot-frame" title="After architecture explorer"/g) || []).length !== 1) {
|
|
1195
|
+
failures.push('Before and After must preserve one complete architecture explorer each');
|
|
1196
|
+
}
|
|
1197
|
+
if (!svgBalanced || svgDepth !== 0 || svgRoots !== 1 || deltaMarkup.slice(0, rootStart).trim() || deltaMarkup.slice(rootEnd).trim()) failures.push('expected exactly one root SVG in the Delta canvas');
|
|
1198
|
+
if ((html.match(/id="archify-compare-receipt"/g) || []).length !== 1) failures.push('expected exactly one embedded compare receipt');
|
|
1199
|
+
if (!html.includes('aria-label="Authored change review"')) failures.push('missing exact-ID change navigator');
|
|
1200
|
+
if ((html.match(/class="change-row"/g) || []).length !== rows.length) failures.push('change navigator row count does not match the receipt');
|
|
1201
|
+
if (!html.includes('id="export-svg"') || !html.includes('id="share-card"')
|
|
1202
|
+
|| !html.includes('window.Archify.deltaExport = { canonicalSvg: canonicalDeltaSvg, shareCard')) {
|
|
1203
|
+
failures.push('missing canonical Delta SVG or Share Card export contract');
|
|
1204
|
+
}
|
|
1205
|
+
for (const [index, row] of rows.entries()) {
|
|
1206
|
+
const safeKey = esc(row.key).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1207
|
+
const rowMatches = [...html.matchAll(new RegExp(`<button class="change-row"[^>]*data-change-key="${safeKey}"[^>]*>`, 'g'))].map((match) => match[0]);
|
|
1208
|
+
if (rowMatches.length !== 1) failures.push(`expected exactly one change row ${row.key}`);
|
|
1209
|
+
const targets = reviewTargetTags(deltaMarkup, row);
|
|
1210
|
+
if (!targets.length) failures.push(`missing Delta identity ${row.key}`);
|
|
1211
|
+
if (targets.some(({ tag }) => !/\bdata-delta-state="[^"]+"/.test(tag))) failures.push(`missing Delta target state ${row.key}`);
|
|
1212
|
+
const signature = reviewTargetSignature(targets);
|
|
1213
|
+
const expectedSignature = expectedReviewTargetSignature(row);
|
|
1214
|
+
const storedSignature = rowMatches[0]?.match(/\bdata-change-target-signature="([^"]*)"/)?.[1];
|
|
1215
|
+
if (!signature || signature !== expectedSignature || storedSignature !== expectedSignature) failures.push(`ambiguous Delta target signature ${row.key}`);
|
|
1216
|
+
if (rowMatches[0]?.match(/\bdata-change-index="([^"]+)"/)?.[1] !== String(index)) failures.push(`incorrect change row order ${row.key}`);
|
|
1217
|
+
const primary = primaryReviewTags(deltaMarkup, row);
|
|
1218
|
+
const states = primary.map((tag) => tag.match(/\bdata-delta-state="([^"]+)"/)?.[1]).filter(Boolean).sort();
|
|
1219
|
+
if (JSON.stringify(states) !== JSON.stringify(reviewPrimaryStates(row).sort())) failures.push(`ambiguous Delta identity ${row.key}`);
|
|
1220
|
+
const classifications = row.classifications.join(',');
|
|
1221
|
+
if (primary.some((tag) => tag.match(/\bdata-delta-classifications="([^"]*)"/)?.[1] !== classifications)) failures.push(`conflicting Delta classification ${row.key}`);
|
|
1222
|
+
}
|
|
1223
|
+
// Before/After embed the complete existing explorer runtime. Validate claims
|
|
1224
|
+
// made by the Delta shell itself, not implementation vocabulary inside an
|
|
1225
|
+
// escaped srcdoc script (for example, "safe scale" in image export code).
|
|
1226
|
+
const deltaShell = html.replace(/<iframe\b[^>]*><\/iframe>/g, '');
|
|
1227
|
+
if (/\b(?:SAFE|LOW RISK|MERGEABLE|NO IMPACT|VERIFIED PR)\b/i.test(deltaShell)) failures.push('contains a forbidden risk or mergeability claim');
|
|
1228
|
+
if (/\b(?:NaN|Infinity)\b/.test(html)) failures.push('contains non-finite output');
|
|
1229
|
+
if (receipt.completeness !== 'complete') failures.push('receipt is not complete');
|
|
1230
|
+
if (failures.length) fail('delta/artifact-invalid', `Architecture Delta artifact failed validation: ${failures.join('; ')}.`, { failures });
|
|
1231
|
+
return { ok: true, checksPassed: 10, checkCount: 10 };
|
|
1232
|
+
}
|