@atmem/architect 0.0.0-stage → 0.2.0-alpha.4.1
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/CONSTITUTION.md +144 -0
- package/README.md +33 -2
- package/agent-skills/discovery/SKILL.md +48 -0
- package/agent-skills/discovery/topics.json +139 -0
- package/agent-skills/generation-capabilities.json +760 -0
- package/agent-skills/service-lifecycle.json +21 -0
- package/agent-skills/specialists/architecture/SKILL.md +15 -0
- package/agent-skills/specialists/aws/SKILL.md +17 -0
- package/agent-skills/specialists/azure/SKILL.md +7 -0
- package/agent-skills/specialists/composition/SKILL.md +17 -0
- package/agent-skills/specialists/devops/SKILL.md +10 -0
- package/agent-skills/specialists/finops/SKILL.md +7 -0
- package/agent-skills/specialists/gcp/SKILL.md +7 -0
- package/agent-skills/specialists/ibm/SKILL.md +7 -0
- package/agent-skills/specialists/manifest.json +13 -0
- package/agent-skills/specialists/pulumi/SKILL.md +7 -0
- package/agent-skills/specialists/security/SKILL.md +7 -0
- package/agent-skills/specialists/terraform/SKILL.md +14 -0
- package/agent-skills/upstream/aws/LICENSE +175 -0
- package/agent-skills/upstream/aws/SKILL.md +125 -0
- package/agent-skills/upstream/azure/LICENSE +21 -0
- package/agent-skills/upstream/azure/SKILL.md +387 -0
- package/agent-skills/upstream/gcp/LICENSE +202 -0
- package/agent-skills/upstream/gcp/SKILL.md +159 -0
- package/agent-skills/upstream/manifest.json +57 -0
- package/agent-skills/upstream/pulumi/LICENSE +201 -0
- package/agent-skills/upstream/pulumi/SKILL.md +501 -0
- package/agent-skills/upstream/terraform/LICENSE +373 -0
- package/agent-skills/upstream/terraform/SKILL.md +316 -0
- package/agent-skills/workflows/workflows.json +601 -0
- package/cli/architect.mjs +3 -0
- package/cli/runtime.mjs +115 -0
- package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
- package/dist/assets/index-B97MkVMs.css +1 -0
- package/dist/assets/index-qtCM2D7O.js +21271 -0
- package/dist/assets/index.es-C6C0sneB.js +18 -0
- package/dist/assets/purify.es-CAi2OJFm.js +3 -0
- package/dist/assets/visual-export-DjbjgQbA.js +173 -0
- package/dist/favicon.svg +2 -0
- package/dist/fonts/DM-Sans-OFL.txt +93 -0
- package/dist/fonts/Manrope-OFL.txt +93 -0
- package/dist/fonts/NotoSans-Regular.ttf +0 -0
- package/dist/fonts/OFL.txt +94 -0
- package/dist/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/index.html +4 -0
- package/dist/licenses/aws-architect-LICENSE.txt +17 -0
- package/dist/licenses/aws-mcp-LICENSE.txt +175 -0
- package/dist/licenses/aws-mcp-NOTICE.txt +1 -0
- package/dist/licenses/cloud-emulation-notices.txt +36619 -0
- package/dist/licenses/dependency-notices.txt +6379 -0
- package/dist/licenses/emulation-notices.txt +717 -0
- package/dist/licenses/github-copilot-sdk-LICENSE.txt +21 -0
- package/dist/licenses/memory-dependency-notices.txt +3319 -0
- package/dist/licenses/openarchflow-LICENSE.txt +21 -0
- package/dist/licenses/python-dependency-notices.txt +11951 -0
- package/docs/upstream-lock.json +26 -0
- package/knowledge/engineering-practices.json +536 -0
- package/package.json +30 -4
- package/packaging/uv-release-lock.json +54 -0
- package/public/licenses/aws-architect-LICENSE.txt +17 -0
- package/public/licenses/aws-mcp-LICENSE.txt +175 -0
- package/public/licenses/aws-mcp-NOTICE.txt +1 -0
- package/public/licenses/cloud-emulation-notices.txt +36619 -0
- package/public/licenses/dependency-notices.txt +6379 -0
- package/public/licenses/emulation-notices.txt +717 -0
- package/public/licenses/github-copilot-sdk-LICENSE.txt +21 -0
- package/public/licenses/memory-dependency-notices.txt +3319 -0
- package/public/licenses/openarchflow-LICENSE.txt +21 -0
- package/public/licenses/python-dependency-notices.txt +11951 -0
- package/scripts/terraform-render.mjs +8 -0
- package/server/__init__.py +0 -0
- package/server/abstraction.py +28 -0
- package/server/agent_runtime.py +153 -0
- package/server/app.py +257 -0
- package/server/architect.py +112 -0
- package/server/architecture_activity.py +67 -0
- package/server/attachments.py +101 -0
- package/server/cloud-emulation-requirements.txt +29 -0
- package/server/codex_app_server.py +219 -0
- package/server/codex_engineering_backend.py +266 -0
- package/server/codex_worker_policy.py +170 -0
- package/server/contracts.py +315 -0
- package/server/copilot_worker.py +16 -0
- package/server/dependency_mirror.py +54 -0
- package/server/design_patch.py +43 -0
- package/server/emulation-requirements.txt +8 -0
- package/server/emulation_adapters.py +20 -0
- package/server/emulation_routes.py +98 -0
- package/server/emulation_worker.py +351 -0
- package/server/engineering_artifacts.py +215 -0
- package/server/engineering_assets/application-runtime.json +4372 -0
- package/server/engineering_assets/architecture_work.schema.json +79 -0
- package/server/engineering_assets/materialize_runtime.py +62 -0
- package/server/engineering_assets/prepare_tools.py +96 -0
- package/server/engineering_assets/sql_validation.py +59 -0
- package/server/engineering_contexts.py +120 -0
- package/server/engineering_delivery.py +210 -0
- package/server/engineering_finalization.py +210 -0
- package/server/engineering_handoff.py +163 -0
- package/server/engineering_jobs.py +206 -0
- package/server/engineering_knowledge.py +75 -0
- package/server/engineering_reconciliation.py +159 -0
- package/server/engineering_routes.py +469 -0
- package/server/engineering_sessions.py +273 -0
- package/server/engineering_tools.py +166 -0
- package/server/generation_lint.py +18 -0
- package/server/local_providers.py +181 -0
- package/server/local_validation.py +236 -0
- package/server/memory-requirements.lock +181 -0
- package/server/memory-requirements.txt +6 -0
- package/server/memory_routes.py +82 -0
- package/server/memory_service.py +273 -0
- package/server/memory_worker.py +66 -0
- package/server/openai_voice.py +80 -0
- package/server/packaged_app.py +9 -0
- package/server/pricing.py +84 -0
- package/server/process_control_observation.py +31 -0
- package/server/prompts.py +123 -0
- package/server/public_faq_emulation_worker.py +44 -0
- package/server/requirements.lock +1618 -0
- package/server/requirements.txt +68 -0
- package/server/runtime_dependency_locks.py +27 -0
- package/server/runtime_evidence.py +93 -0
- package/server/settings.py +14 -0
- package/server/skills.py +103 -0
- package/server/storage_emulation_worker.py +160 -0
- package/server/structured_emulation_worker.py +48 -0
- package/server/terraform_routes.py +118 -0
- package/server/upstream/__init__.py +0 -0
- package/server/upstream/agent/__init__.py +1 -0
- package/server/upstream/agent/aws_architect.py +600 -0
- package/server/upstream/agent/config/__init__.py +1 -0
- package/server/upstream/agent/config/agent_config.py +82 -0
- package/server/upstream/agent/config/prompts.py +138 -0
- package/server/upstream/agent/rate_limiter.py +62 -0
- package/server/upstream/utils/__init__.py +1 -0
- package/server/upstream/utils/file_writer.py +43 -0
- package/server/validation_applicability.py +85 -0
- package/server/validation_jobs.py +252 -0
- package/server/validation_workers.py +48 -0
- package/server/voice_routes.py +91 -0
- package/server/voice_worker.py +26 -0
- package/specs/028-convergence-evaluation/evidence/20261110-ibm-invoice-native/registry-structured/qualification.json +72 -0
- package/specs/028-convergence-evaluation/evidence/20261110-invoice-runtime/durable-current/receipt.json +61 -0
- package/specs/029-general-purpose-engine/evidence/20261111-runtime-dependencies/sdk/receipt.json +22 -0
- package/src/ArchitectureActivity.jsx +54 -0
- package/src/ArchitectureWorkPanel.jsx +46 -0
- package/src/ArtifactChecks.jsx +49 -0
- package/src/BlockRequirements.jsx +13 -0
- package/src/BrainActivity.jsx +11 -0
- package/src/ChatMessage.jsx +19 -0
- package/src/ChatResizeHandle.jsx +6 -0
- package/src/CodePreview.jsx +8 -0
- package/src/ComponentReview.jsx +31 -0
- package/src/DeliveryViews.jsx +59 -0
- package/src/EmulationPanel.jsx +44 -0
- package/src/EngagementViews.jsx +385 -0
- package/src/EngineeringPanel.jsx +151 -0
- package/src/ImplementationDelivery.jsx +55 -0
- package/src/JourneyViews.jsx +400 -0
- package/src/MemoryPanel.jsx +46 -0
- package/src/OpenAIVoicePanel.jsx +65 -0
- package/src/OutputsView.jsx +65 -0
- package/src/TerraformView.jsx +57 -0
- package/src/WorkbenchDialogs.jsx +532 -0
- package/src/activity-presentation.mjs +28 -0
- package/src/ai-qualification-scenarios.mjs +31 -0
- package/src/approval-application-files.mjs +32 -0
- package/src/approval-applications.mjs +82 -0
- package/src/approval-spec-kit.mjs +30 -0
- package/src/architecture-activity.css +28 -0
- package/src/architecture-activity.mjs +63 -0
- package/src/architecture-work.mjs +176 -0
- package/src/artifact-work.mjs +103 -0
- package/src/async-documents.mjs +191 -0
- package/src/atflow.css +1140 -0
- package/src/atforma.css +748 -0
- package/src/atmem-tokens.css +79 -0
- package/src/aws-preflight.mjs +60 -0
- package/src/aws-public-faq.mjs +102 -0
- package/src/aws-validation-scenarios.mjs +10 -0
- package/src/aws-validation.mjs +48 -0
- package/src/azure-plan-mocks.mjs +25 -0
- package/src/azure-structured.mjs +133 -0
- package/src/bedrock-summary.mjs +152 -0
- package/src/bounded-rag.mjs +60 -0
- package/src/brand.css +9 -0
- package/src/canvas-view.mjs +28 -0
- package/src/capability-composition.mjs +44 -0
- package/src/chat-attachments.mjs +13 -0
- package/src/cloud-provider-locks.mjs +9 -0
- package/src/cloud-storage-scenarios.mjs +2 -0
- package/src/component-review.mjs +55 -0
- package/src/composition-spec-kit.mjs +30 -0
- package/src/consultation-context.mjs +15 -0
- package/src/consultation.mjs +52 -0
- package/src/container-contracts.mjs +5 -0
- package/src/container-inspection.mjs +75 -0
- package/src/container-runtime.mjs +30 -0
- package/src/container-security-inspection.mjs +49 -0
- package/src/container-terraform.mjs +109 -0
- package/src/conversation.mjs +17 -0
- package/src/core.mjs +863 -0
- package/src/cross-cloud-storage.mjs +100 -0
- package/src/delivery-capabilities.mjs +25 -0
- package/src/delivery.mjs +58 -0
- package/src/deployment-ownership.mjs +10 -0
- package/src/deployment-region.mjs +11 -0
- package/src/derive.mjs +31 -0
- package/src/design-build-flow.mjs +10 -0
- package/src/diagram-attention.mjs +24 -0
- package/src/discovery.mjs +359 -0
- package/src/document.mjs +170 -0
- package/src/emulation-feedback.mjs +61 -0
- package/src/emulation-guidance.mjs +37 -0
- package/src/engagement.mjs +274 -0
- package/src/engineering-client.mjs +73 -0
- package/src/engineering-defaults.mjs +17 -0
- package/src/engineering.css +31 -0
- package/src/enterprise-application.mjs +76 -0
- package/src/enterprise-aws-host-infrastructure.mjs +62 -0
- package/src/enterprise-aws-host-tests.mjs +15 -0
- package/src/enterprise-aws-infrastructure-tests.mjs +38 -0
- package/src/enterprise-aws-infrastructure.mjs +138 -0
- package/src/enterprise-google-infrastructure.mjs +84 -0
- package/src/enterprise-google-tests.mjs +25 -0
- package/src/estimate.mjs +188 -0
- package/src/existing-references.mjs +18 -0
- package/src/external-identities.mjs +17 -0
- package/src/faq-lambda-build.mjs +28 -0
- package/src/gcp-structured.mjs +104 -0
- package/src/generation-provider.mjs +7 -0
- package/src/generation-quality.mjs +69 -0
- package/src/handoff.mjs +141 -0
- package/src/ibm-registry.mjs +12 -0
- package/src/ibm-structured.mjs +103 -0
- package/src/identifiers.mjs +15 -0
- package/src/implementation-map.mjs +14 -0
- package/src/implementation-outcome.mjs +8 -0
- package/src/incomplete-terraform.mjs +9 -0
- package/src/integrations.ts +137 -0
- package/src/interface-contracts.mjs +30 -0
- package/src/invoice-application.mjs +66 -0
- package/src/invoice-aws-operations.mjs +136 -0
- package/src/invoice-aws.mjs +143 -0
- package/src/invoice-azure-operations.mjs +147 -0
- package/src/invoice-azure.mjs +134 -0
- package/src/invoice-builder.mjs +35 -0
- package/src/invoice-dependencies.mjs +43 -0
- package/src/invoice-gcp-operations.mjs +178 -0
- package/src/invoice-gcp.mjs +104 -0
- package/src/invoice-ibm-operations.mjs +278 -0
- package/src/invoice-ibm.mjs +142 -0
- package/src/invoice-operations.mjs +143 -0
- package/src/invoice-plan.mjs +45 -0
- package/src/invoice-region.mjs +6 -0
- package/src/invoice-spec-kit.mjs +61 -0
- package/src/invoice-state.mjs +7 -0
- package/src/invoice-terraform.mjs +29 -0
- package/src/invoice-tests.mjs +122 -0
- package/src/journey-workspace.css +72 -0
- package/src/journey.mjs +87 -0
- package/src/levels.mjs +145 -0
- package/src/local-agent.mjs +184 -0
- package/src/main.jsx +2458 -0
- package/src/model-policy-preflight.mjs +34 -0
- package/src/openai-voice.mjs +102 -0
- package/src/output-bundle.mjs +11 -0
- package/src/ownership-inspection.mjs +28 -0
- package/src/pack.mjs +201 -0
- package/src/pricing.mjs +31 -0
- package/src/production-state.mjs +8 -0
- package/src/project-copy.mjs +10 -0
- package/src/project-file.mjs +160 -0
- package/src/project-links.mjs +3 -0
- package/src/protected-state.mjs +43 -0
- package/src/public-faq-builder.mjs +19 -0
- package/src/public-faq-clouds.mjs +251 -0
- package/src/public-faq.mjs +122 -0
- package/src/pulumi.mjs +123 -0
- package/src/python-container.mjs +25 -0
- package/src/python-runtime.mjs +50 -0
- package/src/rag-handler.mjs +43 -0
- package/src/rag-web-assets.mjs +52 -0
- package/src/rag-web.mjs +68 -0
- package/src/records.mjs +177 -0
- package/src/resources.mjs +163 -0
- package/src/review.mjs +252 -0
- package/src/runtime/EnterpriseDocument.java +89 -0
- package/src/runtime/approved_http_destination.py +72 -0
- package/src/runtime/aws-lambda-qualification-lock.json +7 -0
- package/src/runtime/aws-python-lock.json +82 -0
- package/src/runtime/aws-web-python-lock.json +887 -0
- package/src/runtime/aws_json_model.py +42 -0
- package/src/runtime/azure-python-lock.json +863 -0
- package/src/runtime/azure-sources.json +8 -0
- package/src/runtime/azure-test-lock.json +23 -0
- package/src/runtime/azure_acceptance.py +192 -0
- package/src/runtime/azure_structured.py +153 -0
- package/src/runtime/bounded_rag.py +126 -0
- package/src/runtime/catalog_admin.py +70 -0
- package/src/runtime/cloud-sql-proxy-lock.json +8 -0
- package/src/runtime/cloud-sql-proxy-security-review.json +30 -0
- package/src/runtime/connector_cli.py +50 -0
- package/src/runtime/connector_sync.py +70 -0
- package/src/runtime/durable-python-lock.json +247 -0
- package/src/runtime/durable_workflow.py +325 -0
- package/src/runtime/enterprise-application-manifest.json +110 -0
- package/src/runtime/enterprise-application-sources.json +266 -0
- package/src/runtime/enterprise-auth-python-lock.json +592 -0
- package/src/runtime/enterprise-aws-host-bootstrap-source.json +1 -0
- package/src/runtime/enterprise-aws-host-probe-source.json +1 -0
- package/src/runtime/enterprise-aws-task-template.json +235 -0
- package/src/runtime/enterprise-document-lock.json +18 -0
- package/src/runtime/enterprise-document.Dockerfile +15 -0
- package/src/runtime/enterprise-runtime-aws-python-lock.json +1115 -0
- package/src/runtime/enterprise-runtime-azure-python-lock.json +1106 -0
- package/src/runtime/enterprise-runtime-gcp-python-lock.json +1060 -0
- package/src/runtime/enterprise-runtime-ibm-python-lock.json +1096 -0
- package/src/runtime/enterprise-runtime-python-lock.json +1058 -0
- package/src/runtime/enterprise-runtime.Dockerfile +15 -0
- package/src/runtime/enterprise-web-app.js +1 -0
- package/src/runtime/enterprise-web-entry.js +105 -0
- package/src/runtime/enterprise-web-lock.json +29 -0
- package/src/runtime/enterprise-web-notices.txt +229 -0
- package/src/runtime/enterprise-web.css +4 -0
- package/src/runtime/enterprise-web.html +8 -0
- package/src/runtime/enterprise_audit.py +91 -0
- package/src/runtime/enterprise_audit_schema.sql +25 -0
- package/src/runtime/enterprise_auth_schema.sql +67 -0
- package/src/runtime/enterprise_auth_store.py +241 -0
- package/src/runtime/enterprise_aws_host_bootstrap.py +120 -0
- package/src/runtime/enterprise_aws_host_probe.py +105 -0
- package/src/runtime/enterprise_aws_hosts.py +136 -0
- package/src/runtime/enterprise_aws_jobs.py +300 -0
- package/src/runtime/enterprise_aws_objects.py +93 -0
- package/src/runtime/enterprise_aws_transfer.py +83 -0
- package/src/runtime/enterprise_azure_batch_api.py +128 -0
- package/src/runtime/enterprise_azure_host.py +599 -0
- package/src/runtime/enterprise_azure_jobs.py +294 -0
- package/src/runtime/enterprise_azure_objects.py +234 -0
- package/src/runtime/enterprise_azure_pool.py +161 -0
- package/src/runtime/enterprise_azure_transfer.py +122 -0
- package/src/runtime/enterprise_configuration.py +136 -0
- package/src/runtime/enterprise_document.py +116 -0
- package/src/runtime/enterprise_document_cli.py +32 -0
- package/src/runtime/enterprise_document_contract.py +54 -0
- package/src/runtime/enterprise_document_job.py +109 -0
- package/src/runtime/enterprise_document_jobs.py +122 -0
- package/src/runtime/enterprise_document_jobs_schema.sql +23 -0
- package/src/runtime/enterprise_extraction_cache.py +186 -0
- package/src/runtime/enterprise_extraction_schema.sql +17 -0
- package/src/runtime/enterprise_google_jobs.py +275 -0
- package/src/runtime/enterprise_google_transfer.py +85 -0
- package/src/runtime/enterprise_http.py +212 -0
- package/src/runtime/enterprise_identity.py +52 -0
- package/src/runtime/enterprise_knowledge.py +152 -0
- package/src/runtime/enterprise_models.py +94 -0
- package/src/runtime/enterprise_native.py +181 -0
- package/src/runtime/enterprise_oauth.py +132 -0
- package/src/runtime/enterprise_operator.py +160 -0
- package/src/runtime/enterprise_parser_service.py +136 -0
- package/src/runtime/enterprise_parser_transport.py +68 -0
- package/src/runtime/enterprise_queries.py +255 -0
- package/src/runtime/enterprise_queries_schema.sql +27 -0
- package/src/runtime/enterprise_query_service.py +111 -0
- package/src/runtime/enterprise_secrets.py +110 -0
- package/src/runtime/enterprise_sessions.py +95 -0
- package/src/runtime/enterprise_sources.py +260 -0
- package/src/runtime/enterprise_web.py +39 -0
- package/src/runtime/enterprise_worker.py +68 -0
- package/src/runtime/export_contract_acceptance.py +18 -0
- package/src/runtime/faq-output-contract.json +40 -0
- package/src/runtime/faq-web-app.js +41 -0
- package/src/runtime/faq-web.css +1 -0
- package/src/runtime/faq-web.html +6 -0
- package/src/runtime/gcp-sources.json +9 -0
- package/src/runtime/gcp_acceptance.py +110 -0
- package/src/runtime/gcp_structured.py +150 -0
- package/src/runtime/http_acceptance.py +39 -0
- package/src/runtime/iap-web-app.js +36 -0
- package/src/runtime/iap-web-source.json +1 -0
- package/src/runtime/ibm-python-lock.json +856 -0
- package/src/runtime/ibm-sources.json +9 -0
- package/src/runtime/ibm_acceptance.py +133 -0
- package/src/runtime/ibm_structured.py +113 -0
- package/src/runtime/invoice-azapi-provider-lock.json +7 -0
- package/src/runtime/invoice-ibm-provider-lock.json +7 -0
- package/src/runtime/invoice-parser-lock.json +1199 -0
- package/src/runtime/invoice-parser-python-lock.json +56 -0
- package/src/runtime/invoice-parser.Dockerfile +190 -0
- package/src/runtime/invoice-sources.json +58 -0
- package/src/runtime/invoice-test-sources.json +24 -0
- package/src/runtime/invoice-web.css +2 -0
- package/src/runtime/invoice-web.html +12 -0
- package/src/runtime/invoice-web.js +112 -0
- package/src/runtime/invoice_configuration.py +17 -0
- package/src/runtime/invoice_document.py +95 -0
- package/src/runtime/invoice_extraction.py +96 -0
- package/src/runtime/invoice_http.py +129 -0
- package/src/runtime/invoice_identity.py +5 -0
- package/src/runtime/invoice_maintenance.py +40 -0
- package/src/runtime/invoice_native.py +77 -0
- package/src/runtime/invoice_object_store.py +153 -0
- package/src/runtime/invoice_operations.py +108 -0
- package/src/runtime/invoice_operator.py +79 -0
- package/src/runtime/invoice_operator_core.py +39 -0
- package/src/runtime/invoice_operator_job.py +147 -0
- package/src/runtime/invoice_parser_cli.py +17 -0
- package/src/runtime/invoice_parser_identity.py +39 -0
- package/src/runtime/invoice_parser_service.py +89 -0
- package/src/runtime/invoice_parser_transport.py +89 -0
- package/src/runtime/invoice_processing.py +24 -0
- package/src/runtime/invoice_retention.py +16 -0
- package/src/runtime/invoice_runtime_secrets.py +43 -0
- package/src/runtime/invoice_stage.py +80 -0
- package/src/runtime/invoice_web.py +39 -0
- package/src/runtime/invoice_worker.py +50 -0
- package/src/runtime/lambda_faq.py +5 -0
- package/src/runtime/parser-requirements.lock +4 -0
- package/src/runtime/policy_review.py +18 -0
- package/src/runtime/postgres-qualification-lock.json +21 -0
- package/src/runtime/public-faq-sources.json +22 -0
- package/src/runtime/public_catalog_admin.py +122 -0
- package/src/runtime/public_catalog_store.py +125 -0
- package/src/runtime/public_faq.py +144 -0
- package/src/runtime/public_faq_app.py +49 -0
- package/src/runtime/python-container-lock.json +18 -0
- package/src/runtime/rag-sources.json +10 -0
- package/src/runtime/rag_acceptance.py +60 -0
- package/src/runtime/rag_aws_adapter.py +95 -0
- package/src/runtime/rds-ca-source.json +9 -0
- package/src/runtime/rds-global-ca.pem +2888 -0
- package/src/runtime/state-contract-check-source.json +4 -0
- package/src/runtime/state_contract_check.py +338 -0
- package/src/runtime/structured-source.json +1 -0
- package/src/runtime/structured-web-app.js +71 -0
- package/src/runtime/structured-web-source.json +1 -0
- package/src/runtime/structured_http.py +105 -0
- package/src/runtime/structured_output.py +48 -0
- package/src/runtime/web-python-lock.json +802 -0
- package/src/runtime/web_user_admin.py +44 -0
- package/src/runtime/workflow_application.py +62 -0
- package/src/runtime/workflow_bindings.py +128 -0
- package/src/runtime/workflow_configuration.py +40 -0
- package/src/runtime/workflow_connection.py +105 -0
- package/src/runtime/workflow_contract.py +54 -0
- package/src/runtime/workflow_database.py +94 -0
- package/src/runtime/workflow_errors.py +6 -0
- package/src/runtime/workflow_http.py +178 -0
- package/src/runtime/workflow_identity.py +69 -0
- package/src/runtime/workflow_payload.py +118 -0
- package/src/runtime/workflow_process_stage.py +88 -0
- package/src/runtime/workflow_profile.py +91 -0
- package/src/runtime/workflow_review.py +106 -0
- package/src/runtime/workflow_role_bootstrap.py +104 -0
- package/src/runtime/workflow_schema.sql +72 -0
- package/src/runtime/workflow_worker.py +142 -0
- package/src/runtime-settings.mjs +15 -0
- package/src/s3-access.mjs +14 -0
- package/src/source-contracts.mjs +17 -0
- package/src/spec-kit.mjs +186 -0
- package/src/state-custody.mjs +32 -0
- package/src/state-inspection.mjs +45 -0
- package/src/state-spec-kit.mjs +13 -0
- package/src/storage-tests.mjs +25 -0
- package/src/structured-api.mjs +133 -0
- package/src/structured-contract.mjs +19 -0
- package/src/structured-operation-policy.mjs +2 -0
- package/src/structured-web.mjs +17 -0
- package/src/style.css +1 -0
- package/src/system-description.mjs +26 -0
- package/src/terraform-admission.mjs +66 -0
- package/src/terraform-composition.mjs +83 -0
- package/src/terraform-expressions.mjs +46 -0
- package/src/terraform-validation-coverage.mjs +11 -0
- package/src/terraform.mjs +128 -0
- package/src/text-statistics.mjs +51 -0
- package/src/upstream/openarchflow/format-payload.ts +26 -0
- package/src/upstream/openarchflow/import/mermaid.ts +205 -0
- package/src/upstream/openarchflow/import/sql-ddl.ts +109 -0
- package/src/upstream/openarchflow/layout.ts +54 -0
- package/src/upstream/openarchflow/providers/aws.ts +196 -0
- package/src/upstream/openarchflow/providers/azure.ts +126 -0
- package/src/upstream/openarchflow/providers/cloudnative.ts +71 -0
- package/src/upstream/openarchflow/providers/generic.ts +227 -0
- package/src/upstream/openarchflow/providers/integration.ts +22 -0
- package/src/upstream/openarchflow/providers/types.ts +2 -0
- package/src/upstream/openarchflow/templates.ts +937 -0
- package/src/upstream-catalog.mjs +10 -0
- package/src/useChatScroll.jsx +36 -0
- package/src/useEmulation.jsx +36 -0
- package/src/validation-receipt.mjs +10 -0
- package/src/visual-export.mjs +92 -0
- package/src/voice-conversation.mjs +117 -0
- package/src/work-intake.mjs +24 -0
- package/src/workflow-runtime-inventory.mjs +3 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {resourceAddress} from './identifiers.mjs';
|
|
2
|
+
import {incompleteTerraform} from './incomplete-terraform.mjs';
|
|
3
|
+
import {existingReference,existingReferenceFiles} from './existing-references.mjs';
|
|
4
|
+
import {CLOUD_PROVIDER_LOCKS} from './cloud-provider-locks.mjs';
|
|
5
|
+
// Narrow native storage contracts; this does not imply general provider coverage.
|
|
6
|
+
const definitions={azure:{name:'Azure Blob Storage',provider:'azurerm',source:'hashicorp/azurerm',version:'4.81.0',types:['azurerm_storage_account','azurerm_storage_container','azurerm_role_definition','azurerm_role_assignment']},gcp:{name:'Google Cloud Storage',provider:'google',source:'hashicorp/google',version:'7.46.2',types:['google_storage_bucket','google_storage_bucket_iam_member']},ibm:{name:'IBM Cloud Object Storage',provider:'ibm',source:'IBM-Cloud/ibm',version:'1.89.0',types:['ibm_cos_bucket','ibm_iam_service_policy']}};
|
|
7
|
+
const address=resourceAddress;
|
|
8
|
+
export const hasCrossCloud=project=>project.nodes.some(n=>n.data.kind!=='note'&&['azure','gcp','ibm'].includes(n.data.provider)&&n.data.implementation==='private-object-storage');
|
|
9
|
+
export function crossCloudPlan(project){
|
|
10
|
+
const nodes=project.nodes.filter(n=>n.data.kind!=='note'),providers=[...new Set(nodes.filter(n=>n.data.origin!=='existing').map(n=>n.data.provider))];
|
|
11
|
+
const provider=providers.length===1?providers[0]:null,definition=definitions[provider];
|
|
12
|
+
const stores=nodes.filter(n=>definition&&n.data.provider===provider&&n.data.origin!=='existing'&&n.data.implementation==='private-object-storage'&&String(n.data.service||n.data.label)===definition.name);
|
|
13
|
+
const actors=nodes.filter(n=>n.data.provider==='tools'&&n.data.origin==='existing'&&n.data.binding==='cloud-storage-principal');
|
|
14
|
+
const connections=project.edges.filter(e=>e.access==='storage-object-admin'&&actors.some(a=>a.id===e.source)&&stores.some(n=>n.id===e.target));
|
|
15
|
+
const gapDetails=[];
|
|
16
|
+
if(actors.length!==1)gapDetails.push({id:'caller-scope',message:'This storage contract requires one explicit existing caller; multiple independent identities need separate permission inputs.'});
|
|
17
|
+
if(!definition)gapDetails.push({id:'cloud-scope',message:'Only one provider per native storage export is supported; mixed-cloud deployment remains unimplemented.'});
|
|
18
|
+
for(const n of nodes){
|
|
19
|
+
if(!stores.includes(n)&&!actors.includes(n)&&!existingReference(n))gapDetails.push({id:'resource-'+address(n.id),componentIds:[n.id],message:`${n.data.label}: native storage implementation is unavailable for this component.`});
|
|
20
|
+
if(stores.includes(n)&&connections.filter(e=>e.target===n.id).length!==1)gapDetails.push({id:'access-'+address(n.id),componentIds:[n.id],message:`${n.data.label}: exactly one explicit object-admin caller binding is required.`});
|
|
21
|
+
if(actors.includes(n)&&!connections.some(e=>e.source===n.id))gapDetails.push({id:'access-'+address(n.id),componentIds:[n.id],message:'Caller is not connected to a supported storage component.'});
|
|
22
|
+
}
|
|
23
|
+
for(const e of project.edges)if(!connections.includes(e))gapDetails.push({id:'connection-'+address(e.id),edgeIds:[e.id],message:'Unsupported storage integration; preserve and implement the requested flow.'});
|
|
24
|
+
if(!stores.length)gapDetails.push({id:'no-storage',message:'Select a supported private-object-storage implementation.'});
|
|
25
|
+
const rows=nodes.map(n=>({id:n.id,address:address(n.id),label:n.data.label,provider:n.data.provider,service:n.data.service||n.data.label,existing:n.data.origin==='existing',foundation:stores.includes(n),compute:false,reference:actors.includes(n),existingServiceReference:existingReference(n),implemented:stores.includes(n)||actors.includes(n)||!!existingReference(n),resources:stores.includes(n)?definition.types:[],settings:{},region:n.data.config?.region||'To be selected',dependencies:[],terraform:existingReference(n)?'Existing service reference — preserved without provisioning or import; behavior and connections remain unverified':stores.includes(n)?'Typed native storage and scoped object permissions generated; cloud verification required':actors.includes(n)?'Existing principal reference; permissions require review':'Implementation needed'}));
|
|
26
|
+
return {revision:project.revision,provider,rows,connections:project.edges.map(e=>({...e,generated:connections.includes(e)})),storageContracts:stores.map(n=>({id:n.id,address:address(n.id),callerId:connections.find(e=>e.target===n.id)?.source})),gapDetails,gaps:gapDetails.map(g=>g.message),accessPlan:{bindings:[],connections:[]},asyncPlan:{pipelines:[]},summaryPlan:{entries:[],modelIds:[]},ragPlan:{entries:[],componentIds:[]},sourceContractPlan:{sources:[],connections:[]},webPlan:{entries:[],componentIds:[]},scope:'Native storage foundation only; emulator does not validate IAM or control-plane deployment.',sources:[]};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const CLIENT=`"""Generated object CRUD adapters. Configure an authenticated provider SDK separately.
|
|
30
|
+
Emulator injection is test-only; this file neither discovers credentials nor provisions resources.
|
|
31
|
+
"""
|
|
32
|
+
def azure_put(container,key,data):
|
|
33
|
+
return container.upload_blob(key,data,overwrite=True)
|
|
34
|
+
def azure_get(container,key):
|
|
35
|
+
return container.download_blob(key).readall()
|
|
36
|
+
def azure_delete(container,key):
|
|
37
|
+
container.delete_blob(key,delete_snapshots='include')
|
|
38
|
+
def gcp_put(bucket,key,data,expected_generation=None):
|
|
39
|
+
blob=bucket.blob(key)
|
|
40
|
+
blob.upload_from_string(data,if_generation_match=expected_generation,timeout=5,retry=None)
|
|
41
|
+
return blob.generation
|
|
42
|
+
def gcp_get(bucket,key,generation=None):
|
|
43
|
+
return bucket.blob(key,generation=generation).download_as_bytes(timeout=5,retry=None)
|
|
44
|
+
def gcp_delete(bucket,key,generation=None):
|
|
45
|
+
bucket.blob(key,generation=generation).delete(timeout=5,retry=None)
|
|
46
|
+
def ibm_put(client,bucket,key,data):
|
|
47
|
+
return client.put_object(Bucket=bucket,Key=key,Body=data)
|
|
48
|
+
def ibm_get(client,bucket,key,version=None):
|
|
49
|
+
args={'Bucket':bucket,'Key':key}
|
|
50
|
+
if version:args['VersionId']=version
|
|
51
|
+
result=client.get_object(**args)
|
|
52
|
+
try:return result['Body'].read()
|
|
53
|
+
finally:result['Body'].close()
|
|
54
|
+
def ibm_delete(client,bucket,key,version):
|
|
55
|
+
client.delete_object(Bucket=bucket,Key=key,VersionId=version)
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
export function crossCloudTerraform(project,environment='staging'){
|
|
59
|
+
const plan=crossCloudPlan(project),d=definitions[plan.provider];
|
|
60
|
+
if(!d)return incompleteTerraform(project,plan,environment);
|
|
61
|
+
const p=d.provider;
|
|
62
|
+
const variable={review_approved:{type:'bool',default:false,description:'Explicitly review the real destination, permissions, cost and plan before apply.'},region:{type:'string',description:'Reviewed provider-native region; emulator region does not select a deployment location.'}};
|
|
63
|
+
const resource={terraform_data:{review_gate:{input:{design_revision:project.revision,environment},lifecycle:{precondition:[{condition:'${var.review_approved && length(local.unfinished_work) == 0}',error_message:'Unfinished work or missing review blocks deployment.'}]}}}};
|
|
64
|
+
const add=(type,name,body)=>{(resource[type]||={})[name]={...body,depends_on:['terraform_data.review_gate']};};
|
|
65
|
+
const v=name=>'${var.'+name+'}',ref=(type,name,field)=>'${'+type+'.'+name+'.'+field+'}';
|
|
66
|
+
const input=(name,description)=>variable[name]={type:'string',nullable:false,description};
|
|
67
|
+
const examples={review_approved:true,region:{azure:'australiaeast',gcp:'australia-southeast1',ibm:'au-syd'}[plan.provider]||'australia-southeast1'};
|
|
68
|
+
const provider=d?{[p]:{}}:{};
|
|
69
|
+
if(plan.provider==='azure'){
|
|
70
|
+
input('subscription_id','Reviewed Azure subscription UUID.');input('resource_group_name','Existing reviewed resource group.');input('principal_object_id','Existing Entra principal object UUID; no credentials.');
|
|
71
|
+
provider[p]={features:{},subscription_id:v('subscription_id'),storage_use_azuread:true};Object.assign(examples,{subscription_id:'11111111-1111-1111-1111-111111111111',resource_group_name:'synthetic-qualification',principal_object_id:'22222222-2222-2222-2222-222222222222'});
|
|
72
|
+
}
|
|
73
|
+
if(plan.provider==='gcp'){input('project_id','Reviewed existing Google Cloud project.');input('principal_member','Existing serviceAccount:email identity for object CRUD; no allUsers or allAuthenticatedUsers.');variable.principal_member.validation={condition:'${can(regex("^serviceAccount:[^@ ]+@[^ ]+\\\\.iam\\\\.gserviceaccount\\\\.com$", var.principal_member))}',error_message:'Select a specific existing service account.'};provider[p]={project:v('project_id'),region:v('region')};Object.assign(examples,{project_id:'synthetic-qualification',principal_member:'serviceAccount:operator@synthetic-qualification.iam.gserviceaccount.com'});}
|
|
74
|
+
if(plan.provider==='ibm'){input('cos_instance_crn','Existing reviewed COS instance CRN.');input('iam_service_id','Existing IBM IAM service ID for bucket-scoped object access.');provider[p]={region:v('region')};Object.assign(examples,{cos_instance_crn:'crn:v1:bluemix:public:cloud-object-storage:global:a/00000000000000000000000000000000:11111111-1111-1111-1111-111111111111::',iam_service_id:'ServiceId-22222222-2222-2222-2222-222222222222'});}
|
|
75
|
+
let storageIndex=0;
|
|
76
|
+
for(const store of plan.storageContracts){
|
|
77
|
+
storageIndex++;
|
|
78
|
+
const n=store.address;input(n+'_name','Globally unique reviewed storage name.');examples[n+'_name']=plan.provider==='azure'?`atmemsynthetic${storageIndex}`:`atmem-synthetic-storage-${storageIndex}`;
|
|
79
|
+
if(plan.provider==='azure'){
|
|
80
|
+
add('azurerm_storage_account',n,{name:v(n+'_name'),resource_group_name:v('resource_group_name'),location:v('region'),account_tier:'Standard',account_replication_type:'LRS',account_kind:'StorageV2',min_tls_version:'TLS1_2',https_traffic_only_enabled:true,allow_nested_items_to_be_public:false,shared_access_key_enabled:false,blob_properties:{versioning_enabled:true,delete_retention_policy:{days:7}},lifecycle:{prevent_destroy:environment!=='qualification'}});
|
|
81
|
+
add('azurerm_storage_container',n,{name:'documents',storage_account_id:ref('azurerm_storage_account',n,'id'),container_access_type:'private'});
|
|
82
|
+
add('azurerm_role_definition',n,{name:'AtMem object CRUD '+v(n+'_name'),scope:ref('azurerm_storage_account',n,'id'),permissions:[{data_actions:['Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read','Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write','Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete']}],assignable_scopes:[ref('azurerm_storage_account',n,'id')]});
|
|
83
|
+
add('azurerm_role_assignment',n,{scope:ref('azurerm_storage_container',n,'resource_manager_id'),role_definition_id:ref('azurerm_role_definition',n,'role_definition_resource_id'),principal_id:v('principal_object_id')});
|
|
84
|
+
}
|
|
85
|
+
if(plan.provider==='gcp'){
|
|
86
|
+
add('google_storage_bucket',n,{name:v(n+'_name'),project:v('project_id'),location:v('region'),uniform_bucket_level_access:true,public_access_prevention:'enforced',versioning:{enabled:true},force_destroy:false,lifecycle:{prevent_destroy:environment!=='qualification'}});
|
|
87
|
+
add('google_storage_bucket_iam_member',n,{bucket:ref('google_storage_bucket',n,'name'),role:'roles/storage.objectUser',member:v('principal_member')});
|
|
88
|
+
}
|
|
89
|
+
if(plan.provider==='ibm'){
|
|
90
|
+
add('ibm_cos_bucket',n,{bucket_name:v(n+'_name'),resource_instance_id:v('cos_instance_crn'),region_location:v('region'),storage_class:'standard',object_versioning:{enable:true},force_delete:false,lifecycle:{prevent_destroy:environment!=='qualification'}});
|
|
91
|
+
add('ibm_iam_service_policy',n,{iam_service_id:v('iam_service_id'),roles:['Writer'],resources:[{service:'cloud-object-storage',resource_instance_id:'${split(":", var.cos_instance_crn)[7]}',resource_type:'bucket',resource:ref('ibm_cos_bucket',n,'bucket_name')}]});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const gaps=[...plan.gapDetails.map(g=>g.id),...(environment==='production'?['production-remote-state-and-operational-review-required']:[])];
|
|
95
|
+
const config={terraform:{required_version:'>= 1.7.0, < 2.0.0',required_providers:d?{[p]:{source:d.source,version:d.version}}:{}},provider,variable,locals:{unfinished_work:gaps},resource,output:{design_revision:{value:project.revision},environment:{value:environment}}};
|
|
96
|
+
const values=Object.entries(examples).map(([k,val])=>` ${k} = ${JSON.stringify(val)}`).join('\n');
|
|
97
|
+
return {...existingReferenceFiles(project),...(d?{'.terraform.lock.hcl':CLOUD_PROVIDER_LOCKS[plan.provider],'requirements.txt':({azure:'azure-storage-blob==12.31.1',gcp:'google-cloud-storage==3.17.1',ibm:'boto3==1.43.123'})[plan.provider]+'\n'}:{}),'main.tf.json':JSON.stringify(config,null,2),'resource-schedule.json':JSON.stringify(plan,null,2),'storage_client.py':CLIENT,'deployment.tfvars.json.example':JSON.stringify({...examples,review_approved:false},null,2),'.gitignore':'.terraform/\n*.tfstate*\n*.tfplan\n*.tfvars\n*.tfvars.json\n__pycache__/\n',
|
|
98
|
+
'tests/storage.tftest.hcl':`mock_provider "${p}" {}\nvariables {\n${values}\n}\nrun "reviewed_storage_plan" { command = plan }\nrun "unreviewed_plan_blocked" {\n command = plan\n variables { review_approved = false }\n expect_failures = [terraform_data.review_gate]\n}\n`,
|
|
99
|
+
'README.md':`# ${d?.name||'Unsupported cloud'} storage foundation\n\nNative resources and an SDK adapter for explicit private-object-storage + cloud-storage-principal + storage-object-admin contracts. Object permissions include deletion for this synthetic CRUD scenario. Existing principal permissions and public grants outside this export require review; no default emulator identity is a deployment identity. Azure uses a container-scoped custom data role, GCP a bucket-scoped objectUser grant, IBM a bucket-scoped Writer grant. Existing subscription/project/resource group/COS instance inputs must be reviewed. Provider-managed encryption defaults apply; customer-managed keys and private-network routing are not implemented by this contract. Azure has an authenticated public network endpoint, not a private endpoint.\n\nEmulation exercises object APIs and emitted client functions, not control-plane apply or IAM enforcement. Run terraform init -backend=false, terraform validate, then terraform test in a credential-free directory. Use the standard provider credential chain only for a separately approved account plan. No credentials belong in this export. Generated examples use synthetic placeholders. Production is blocked pending remote state and operational review. Never clear those gates to obtain a pass. SDK adapters accept an explicitly configured authenticated client; install the pinned SDK from requirements.txt in an isolated environment before configuring the authenticated client; SDK dependency installation is operator-owned (Azure azure-storage-blob, GCP google-cloud-storage, IBM S3-compatible boto3/HMAC client).\n`};
|
|
100
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {INVOICE_SERVICES} from './invoice-plan.mjs';
|
|
2
|
+
import {containerContract} from './container-contracts.mjs';
|
|
3
|
+
import {invoiceTerraform} from './invoice-terraform.mjs';
|
|
4
|
+
import {containerTerraform} from './container-terraform.mjs';
|
|
5
|
+
import {planCapabilityComposition,deliveryUnitProject} from './capability-composition.mjs';
|
|
6
|
+
import {composeTerraformUnits} from './terraform-composition.mjs';
|
|
7
|
+
// Reviewed domain/provider policies remain explicit adapters. The partitioner and
|
|
8
|
+
// linker operate on contracts and unit identities, never project names or corpus IDs.
|
|
9
|
+
export const DELIVERY_CAPABILITIES=Object.freeze([
|
|
10
|
+
Object.freeze({id:'invoice-workflow',matches:node=>node.data.origin==='proposed'&&node.data.implementation==='invoice-workflow'&&node.data.service===INVOICE_SERVICES[node.data.provider],compile:(project,plan,environment)=>invoiceTerraform(project,plan,environment,{stateScope:'parent'})}),
|
|
11
|
+
Object.freeze({id:'container-service',matches:containerContract,compile:containerTerraform}),
|
|
12
|
+
]);
|
|
13
|
+
export const capabilityCompositionPlan=(project,planProject)=>planCapabilityComposition(project,DELIVERY_CAPABILITIES,planProject);
|
|
14
|
+
export function compileCapabilityComposition(project,plan,planProject,environment='staging'){
|
|
15
|
+
if(!['staging','production','qualification'].includes(environment))throw Error('Use an explicit supported composition environment.');
|
|
16
|
+
const current=capabilityCompositionPlan(project,planProject);
|
|
17
|
+
if(!current||plan.revision!==project.revision||JSON.stringify(current.composition)!==JSON.stringify(plan.composition)||JSON.stringify(current.gapDetails)!==JSON.stringify(plan.gapDetails))throw Error('The composition plan is stale; compile the latest complete design.');
|
|
18
|
+
const units=current.composition.units.map(unit=>{
|
|
19
|
+
const scoped=deliveryUnitProject(project,unit.id),adapter=DELIVERY_CAPABILITIES.find(c=>c.id===unit.implementation),child=planProject(scoped);
|
|
20
|
+
return {id:unit.id,implementation:unit.implementation,files:adapter.compile(scoped,child,environment)};
|
|
21
|
+
});
|
|
22
|
+
const files=composeTerraformUnits(project,units,{environment,gaps:current.gapDetails.map(g=>g.id)});
|
|
23
|
+
files['resource-schedule.json']=JSON.stringify(current,null,2)+'\n';
|
|
24
|
+
return files;
|
|
25
|
+
}
|
package/src/delivery.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {architectureWork} from './architecture-work.mjs';
|
|
2
|
+
import {artifactWorkProjection} from './artifact-work.mjs';
|
|
3
|
+
import {generationQuality} from './generation-quality.mjs';
|
|
4
|
+
import {implementationOutcome} from './implementation-outcome.mjs';
|
|
5
|
+
import {systemDescriptionMarkdown,requirementExplanation} from './system-description.mjs';
|
|
6
|
+
import { specKit } from "./spec-kit.mjs";
|
|
7
|
+
import { requirementNumber } from "./derive.mjs";
|
|
8
|
+
// All deliverables are generated from one project snapshot, never independently edited copies.
|
|
9
|
+
import { toProjectFile } from "./project-file.mjs";
|
|
10
|
+
import { deploymentDocument } from "./document.mjs";
|
|
11
|
+
import { mermaid, adrMarkdown, OPTION_NAMES } from "./pack.mjs";
|
|
12
|
+
import { OPTIONS, CRITERIA, optionScore } from "./engagement.mjs";
|
|
13
|
+
import { estimate, consultingEstimate, DISCLAIMER } from "./estimate.mjs";
|
|
14
|
+
import { resourcePlan, resourceMarkdown } from "./resources.mjs";
|
|
15
|
+
import { terraformSketch } from "./terraform.mjs";
|
|
16
|
+
import { review, blockers } from "./review.mjs";
|
|
17
|
+
|
|
18
|
+
const text = (s) => String(s ?? "").replaceAll("|", "\\|").replaceAll("\n", " ");
|
|
19
|
+
const json = (v) => JSON.stringify(v, null, 2);
|
|
20
|
+
const list = (items) => items.length ? items.map((x) => `- ${x}`).join("\n") : "None recorded.";
|
|
21
|
+
export function solutionSpecification(project) {
|
|
22
|
+
const a = project.assessment;
|
|
23
|
+
return `# ${project.name} — solution specification\n\n## Problem and intended outcome\n\n${implementationOutcome(project)}\n\n## Scope\n\n${list((project.useCases || []).map((u) => `${u.title}: ${u.verdict}${u.reason ? ` — ${u.reason}` : ""}`))}\n\n## Requirements and acceptance criteria\n\n${list((project.needs || []).map((r) => `[${requirementNumber(project,r.id)}] ${r.statement} (${r.priority}, ${r.status}); target: ${r.measure ? `${r.measure.metric} ${r.measure.op} ${r.measure.target}${r.measure.unit || ""}` : "acceptance target needed"}; linked blocks: ${r.links?.join(", ") || "not linked"}${`\n\nDesign explanation: ${requirementExplanation(r)}`}${r.basis ? `\n\nBasis: ${r.basis}` : ""}`))}\n\n${systemDescriptionMarkdown(project)}\n\n## Architecture\n\n\`\`\`mermaid\n${mermaid(project)}\n\`\`\`\n\n${resourceMarkdown(project)}\n\n## Options and tradeoffs\n\n${a ? `Scores are entered judgements (1–5), not provider benchmarks or prices. Unscored options remain open.\n\n| Option | ${CRITERIA.map((c) => c.label).join(" | ")} | Weighted score | Rationale |\n|---|${CRITERIA.map(() => "---|").join("")}---|---|\n${OPTIONS.map((o) => `| ${OPTION_NAMES[o]} | ${CRITERIA.map((c) => a.scores?.[o]?.[c.id] ?? "—").join(" | ")} | ${optionScore(a, o) ?? "—"} | ${text(a.notes?.[o])} |`).join("\n")}` : "Use Design → Options to compare cloud choices and record the rationale before choosing."}\n\n## Decisions and change history\n\n${adrMarkdown(project.decisions)}\n\n## Assumptions\n\n${list((project.assumptions || []).map((a) => `[${a.id}] ${a.statement} (${a.madeAt})`))}\n\n## Questions to resolve\n\n${list((project.openQuestions || []).filter((q) => q.status === "open").map((q) => `[${q.id}] ${q.question}${q.owner ? ` — ${q.owner}` : ""}`))}\n`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function deliveryPack(project, run, environment = "staging", now = new Date()) {
|
|
27
|
+
// Credential refusal runs before producing any files, including the plain-language outputs.
|
|
28
|
+
const file = toProjectFile(project, now);
|
|
29
|
+
const cloud = estimate(project, now), consulting = consultingEstimate(project), resources = resourcePlan(project);
|
|
30
|
+
const findings = review(project);
|
|
31
|
+
const snapshotId = crypto.randomUUID();
|
|
32
|
+
const stamp = `Snapshot ${snapshotId} · design r${project.revision} · generated ${now.toISOString()}`;
|
|
33
|
+
const outstanding = [
|
|
34
|
+
...blockers(findings).map((f) => `Architecture: ${f.statement}`), ...cloud.gaps,
|
|
35
|
+
...resources.gaps,
|
|
36
|
+
...consulting.lines.filter((l) => !l.complete).map((l) => `${l.label}: effort, rate, ordered day range and basis needed.`),
|
|
37
|
+
...(project.openQuestions || []).filter((q) => q.status === "open").map((q) => q.question),
|
|
38
|
+
];
|
|
39
|
+
const files = {
|
|
40
|
+
...specKit(project,{snapshotId,stamp,now,environment:environment === "production" ? "production" : "staging"}),
|
|
41
|
+
"project.atmem-ai-architect.json": json(file),
|
|
42
|
+
"architecture-work.json": json(architectureWork(project)),
|
|
43
|
+
"architecture-artifact-mappings.json": json(artifactWorkProjection(project)),
|
|
44
|
+
"specification.md": `${stamp}\n\n${solutionSpecification(project)}\n\n## Implementation specification and coding-agent handoff\n\nThe Spec Kit translates these requirements and the architecture into implementation work. Start with START_HERE.md and AGENTS.md; read spec-kit/implementation-spec.md (or PDF) for the implementation plan, contracts, detailed tasks and validation plan. Requirements remain the source of desired outcomes; the kit is the build plan derived from them.\n`,
|
|
45
|
+
"architecture-and-deployment.md": `${stamp}\n\n${deploymentDocument(project, run, now)}`,
|
|
46
|
+
"diagram.mmd": mermaid(project),
|
|
47
|
+
"decisions.md": `${stamp}\n\n${adrMarkdown(project.decisions)}`,
|
|
48
|
+
"resource-schedule.json": json(resources),
|
|
49
|
+
"estimate.json": json({ snapshotId, revision: project.revision, generatedAt: now.toISOString(), disclaimer: DISCLAIMER, cloud, consulting }),
|
|
50
|
+
"handoff.md": `# Delivery handoff\n\n${stamp}\n\nThis is a reviewable design handoff, not deployment evidence.\n\n## Readiness\n\nRead spec-kit/readiness.md for prioritised decisions, task links and separate evidence stages. Schema checks cannot establish application deployment readiness.\n\n## Work remaining\n\n${list(outstanding)}\n\n## Before deployment\n\n- Confirm provider, region, data residency, account owner and environment.\n- Complete the resource implementations, application code, IAM and data-flow integrations.\n- Validate the estimate against every billable dimension and a current provider quote.\n- Review least-privilege access, quotas, secrets handling and Terraform state storage.\n- Run and review the infrastructure plan in the intended account.\n- Agree acceptance tests, rollback and an explicit deployment approval.\n- Capture results and handover ownership. No cloud operation has been performed by this export.\n`,
|
|
51
|
+
...Object.fromEntries(Object.entries(terraformSketch(project, environment)).map(([name, content]) => [`terraform/${name}`, content])),
|
|
52
|
+
"README.md": `# ${project.name} — delivery pack\n\n${stamp}\n\nFor a coding-agent handoff, start with START_HERE.md and AGENTS.md, then spec-kit/implementation-spec.md or PDF. The kit includes detailed task dependencies, acceptance criteria, contracts and a progress journal.\n\nOpen specification.md for scope, requirements, options and decisions; architecture-and-deployment.md for the diagram, review, costs and steps. estimate.json separates monthly cloud cost and one-off consulting/build cost. resource-schedule.json links resources to diagram IDs. terraform/ contains provider-specific generated artifacts where supported; generation-quality.json records component coverage, missing implementations, selected skill digests and validation boundaries.\n\nReopen project.atmem-ai-architect.json in AtMem AI Architect to change requirements, assumptions, decisions, prices or the diagram, then regenerate this pack. All files come from the same snapshot; do not maintain edited copies as the source of truth. Design revision tracks board changes; snapshot ID and generation time identify exports including changes to costs and requirements.\n\nCloud prices and professional-service rates are only those entered in the project. A ROM or detailed worksheet is not a fixed-price quote. No cloud access, deployment or successful infrastructure validation is implied.\n`,
|
|
53
|
+
};
|
|
54
|
+
const terraformFiles=Object.fromEntries(Object.entries(files).filter(([name])=>name.startsWith('terraform/')).map(([name,content])=>[name.slice(10),content]));
|
|
55
|
+
files['generation-quality.json']=json(generationQuality(project,resources,terraformFiles));
|
|
56
|
+
files["manifest.json"] = json({ format: "atmem.ai-architect.delivery", version: "1.0.0", snapshotId, projectId: file.meta.id, designRevision: project.revision, generatedAt: now.toISOString(), environment: environment === "production" ? "production" : "staging", estimateStage: cloud.maturity, deploymentExecuted: false, handoffStatus: 'engineering_required', readinessFile: 'spec-kit/readiness.json', files: [...Object.keys(files), "manifest.json"] });
|
|
57
|
+
return files;
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Existing application source and an existing cloud deployment are separate facts.
|
|
2
|
+
export const existingDeployment=node=>{validateDeploymentOwnership(node.data);return ['existing','imported Pulumi state'].includes(node.data.origin)&&node.data.deploymentMode!=='create';};
|
|
3
|
+
export function validateDeploymentOwnership(data){
|
|
4
|
+
if(data.config?.containerMemoryBytes!=null&&data.implementation!=='container-service')throw Error('Exact container memory requires an explicit container-service contract; no other implementation was changed.');
|
|
5
|
+
if(data.deploymentMode==='reference'&&!['existing','imported Pulumi state'].includes(data.origin))throw Error('Reference handling must preserve an existing system; it cannot provision a proposed replacement.');
|
|
6
|
+
if(data.binding&&(!['existing','imported Pulumi state'].includes(data.origin)||data.deploymentMode==='create'))throw Error('Reference bindings identify existing systems and cannot provision a replacement. Preserve existing ownership or correct the binding.');
|
|
7
|
+
if(data.deploymentMode!=null&&!['reference','create'].includes(data.deploymentMode))throw Error('Choose reference or create for deployment ownership.');
|
|
8
|
+
if(data.origin==='imported Pulumi state'&&data.deploymentMode==='create')throw Error('Imported cloud-state metadata identifies an existing deployment, not application source. Preserve its reference ownership; create a separate proposed deployment for new resources.');
|
|
9
|
+
if(data.origin==='existing'&&data.deploymentMode==='create'&&(data.implementation!=='container-service'||data.binding))throw Error('Deploying existing application source requires an explicit container-service contract without an external reference binding.');
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Supported identifier shapes, not a region/service-availability catalogue.
|
|
2
|
+
// AWS supplied-image lowering supports commercial, China and GovCloud identifier
|
|
3
|
+
// families. Other partitions remain explicit implementation work, not a fallback.
|
|
4
|
+
export const PROVIDER_REGION_PATTERNS={aws:'^([a-z]{2}-[a-z]+|us-gov-[a-z]+)-[0-9]{1,2}$',azure:'^[a-z][a-z0-9]{1,39}$',gcp:'^[a-z]+-[a-z]+[0-9]{1,2}$',ibm:'^[a-z]{2}-[a-z]+$'};
|
|
5
|
+
export const validProviderRegion=(provider,value)=>typeof value==='string'&&Object.hasOwn(PROVIDER_REGION_PATTERNS,provider)&&new RegExp(PROVIDER_REGION_PATTERNS[provider]).test(value);
|
|
6
|
+
export function declaredRegion(node){
|
|
7
|
+
const value=node.data.config?.region;
|
|
8
|
+
if(value==null||value===''||value==='To be selected')return {region:null,gaps:[]};
|
|
9
|
+
if(validProviderRegion(node.data.provider,value))return {region:value,gaps:[]};
|
|
10
|
+
return {region:null,gaps:[{key:'region',value,reason:'is preserved but not a supported deployment-region identifier for this provider contract; implement its placement/partition requirements without choosing another destination'}]};
|
|
11
|
+
}
|
package/src/derive.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {prefillAcceptedSettings} from './engineering-defaults.mjs';
|
|
2
|
+
// Small, grounded working requirements. Unknown targets become conversation topics,
|
|
3
|
+
// not invented company policies or a large list of fields for the user to complete.
|
|
4
|
+
import { roleOf } from './review.mjs';
|
|
5
|
+
import { cleanRequirement } from './records.mjs';
|
|
6
|
+
export function deriveRequirements(project) {
|
|
7
|
+
const nodes=project.nodes.filter(n=>n.data.kind!=='note');
|
|
8
|
+
if(!nodes.length)return [];
|
|
9
|
+
const out=[];
|
|
10
|
+
const group=(roles)=>nodes.filter(n=>roles.includes(roleOf(n))).map(n=>n.id);
|
|
11
|
+
const add=(id,category,statement,links)=>{if(links.length)out.push(cleanRequirement({id:`drv-${id}`,source:'agent',kind:'nonfunctional',category,priority:'should',status:'open',statement,links}));};
|
|
12
|
+
add('data-access','security','Agree who can access the data and which content each person is allowed to use.',group(['data','index','llm']));
|
|
13
|
+
add('data-location','compliance','Confirm where source data, model requests and logs may be processed and stored.',group(['data','index','llm']));
|
|
14
|
+
|
|
15
|
+
return out.map(r=>({...r,rationale:r.id==='drv-data-access' ? 'The design uses information that people may have different rights to access. Clarifying this early helps prevent inappropriate disclosure.' : 'The design processes and stores information. We need to establish any location constraints before choosing services and regions.',basis:'Inferred from the data and AI components on the board; this is a question to validate, not an established company policy.'}));
|
|
16
|
+
}
|
|
17
|
+
export function withDerived(project){
|
|
18
|
+
project=prefillAcceptedSettings(project);
|
|
19
|
+
const mine=(project.needs||[]).filter(r=>!(r.source==='agent'&&r.id.startsWith('drv-')));
|
|
20
|
+
const excluded=new Set([...(project.extensions?.dismissedRequirements||[]),...mine.map(r=>r.id)]);
|
|
21
|
+
const needs=[...mine,...(mine.some(r=>r.id.startsWith("ai-")) ? [] : deriveRequirements(project)).filter(r=>!excluded.has(r.id))].slice(0,300);
|
|
22
|
+
const numbers={...(project.extensions?.requirementNumbers || {})};
|
|
23
|
+
let next=Math.max(0,...Object.values(numbers).filter(n=>Number.isSafeInteger(n)&&n>0))+1;
|
|
24
|
+
for(const r of needs)if(!Number.isSafeInteger(numbers[r.id]) || numbers[r.id]<1)numbers[r.id]=next++;
|
|
25
|
+
return {...project,needs,extensions:{...project.extensions,requirementNumbers:numbers}};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function requirementNumber(project,id) {
|
|
29
|
+
const value=project.extensions?.requirementNumbers?.[id];
|
|
30
|
+
return Number.isSafeInteger(value)&&value>0 ? `REQ-${String(value).padStart(3,'0')}` : 'Requirement';
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Architecture is the entry point. Implementation is an explicit outcome action.
|
|
2
|
+
export const BUILD_AND_TEST_REQUEST='Implement the current saved design and run its local checks. Preserve every requirement, existing system, provider, placement and ownership boundary. Include a coherent Spec Kit with requirements, a plan, dependent tasks and acceptance evidence, plus implementation, infrastructure and receiving run instructions. Generate the application and its connections, run the applicable block and full-system tests, and retain artifact-bound evidence. Clarify only material unresolved choices; never substitute a smaller demonstration or report an unexecuted check as passed. No cloud deployment or account access.';
|
|
3
|
+
export const BUILD_DESIGN_REQUEST=BUILD_AND_TEST_REQUEST;
|
|
4
|
+
export function hasArchitectureDesign(project){
|
|
5
|
+
return !!(project?.nodes?.some(n=>n.data?.kind!=='note')||project?.extensions?.architectureWork?.records?.some(r=>['responsibility','delivery-unit','interface'].includes(r.kind)));
|
|
6
|
+
}
|
|
7
|
+
export function buildIntent(project,draft){
|
|
8
|
+
if(typeof draft==='string'&&draft.trim())return draft;
|
|
9
|
+
return hasArchitectureDesign(project)?BUILD_DESIGN_REQUEST:'';
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Presentation-only IDs: never write attention state into the project or its history.
|
|
2
|
+
export function diagramAttention(before, after) {
|
|
3
|
+
const nodes = new Set(), edges = new Set();
|
|
4
|
+
const oldNodes = new Map(before.nodes.map(n => [n.id, n]));
|
|
5
|
+
const newNodes = new Set(after.nodes.map(n => n.id));
|
|
6
|
+
const oldEdges = new Map(before.edges.map(e => [e.id, e]));
|
|
7
|
+
const newEdges = new Set(after.edges.map(e => e.id));
|
|
8
|
+
for (const n of after.nodes) {
|
|
9
|
+
const old = oldNodes.get(n.id);
|
|
10
|
+
if (!old || JSON.stringify([old.data, old.position, old.type]) !== JSON.stringify([n.data, n.position, n.type])) nodes.add(n.id);
|
|
11
|
+
}
|
|
12
|
+
for (const e of after.edges) {
|
|
13
|
+
if (JSON.stringify(oldEdges.get(e.id)) !== JSON.stringify(e)) {
|
|
14
|
+
edges.add(e.id); nodes.add(e.source); nodes.add(e.target);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (const e of before.edges) {
|
|
18
|
+
if (!newEdges.has(e.id) || !newNodes.has(e.source) || !newNodes.has(e.target)) {
|
|
19
|
+
if (newNodes.has(e.source)) nodes.add(e.source);
|
|
20
|
+
if (newNodes.has(e.target)) nodes.add(e.target);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return { nodes: [...nodes].filter(id => newNodes.has(id)), edges: [...edges] };
|
|
24
|
+
}
|