agentic-dev 0.2.11 → 0.2.13
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 +72 -54
- package/bin/agentic-dev.mjs +162 -11
- package/lib/github.mjs +246 -0
- package/lib/orchestration-assets.mjs +249 -0
- package/lib/scaffold.mjs +89 -0
- package/package.json +8 -19
- package/.dockerignore +0 -8
- package/.env.example +0 -50
- package/.gitignore +0 -16
- package/AGENTS.md +0 -86
- package/SDD_SKILL.md +0 -589
- package/compose.yml +0 -206
- package/infra/compose/.env.dev.example +0 -28
- package/infra/compose/.env.prod.example +0 -29
- package/infra/compose/README.md +0 -35
- package/infra/compose/dev.yml +0 -125
- package/infra/compose/prod.yml +0 -126
- package/infra/terraform/README.md +0 -34
- package/infra/terraform/aws/data/.terraform.lock.hcl +0 -25
- package/infra/terraform/aws/data/README.md +0 -18
- package/infra/terraform/aws/data/main.tf +0 -147
- package/infra/terraform/aws/data/outputs.tf +0 -14
- package/infra/terraform/aws/data/variables.tf +0 -57
- package/infra/terraform/aws/data/versions.tf +0 -10
- package/infra/terraform/aws/domain/.terraform.lock.hcl +0 -25
- package/infra/terraform/aws/domain/README.md +0 -20
- package/infra/terraform/aws/domain/env/dev.tfvars.example +0 -6
- package/infra/terraform/aws/domain/env/prod.tfvars.example +0 -7
- package/infra/terraform/aws/domain/main.tf +0 -149
- package/infra/terraform/aws/domain/outputs.tf +0 -29
- package/infra/terraform/aws/domain/variables.tf +0 -58
- package/infra/terraform/aws/domain/versions.tf +0 -10
- package/infra/terraform/openstack/README.md +0 -38
- package/infra/terraform/openstack/dev/.terraform.lock.hcl +0 -24
- package/infra/terraform/openstack/dev/README.md +0 -18
- package/infra/terraform/openstack/dev/main.tf +0 -49
- package/infra/terraform/openstack/dev/providers.tf +0 -15
- package/infra/terraform/openstack/dev/terraform.tfvars.example +0 -54
- package/infra/terraform/openstack/dev/variables.tf +0 -210
- package/infra/terraform/openstack/dev/versions.tf +0 -10
- package/infra/terraform/openstack/modules/environment_host/main.tf +0 -143
- package/infra/terraform/openstack/modules/environment_host/outputs.tf +0 -25
- package/infra/terraform/openstack/modules/environment_host/templates/docker-host-user-data.sh.tftpl +0 -40
- package/infra/terraform/openstack/modules/environment_host/variables.tf +0 -145
- package/infra/terraform/openstack/modules/environment_host/versions.tf +0 -7
- package/infra/terraform/openstack/prod/.terraform.lock.hcl +0 -24
- package/infra/terraform/openstack/prod/README.md +0 -18
- package/infra/terraform/openstack/prod/main.tf +0 -49
- package/infra/terraform/openstack/prod/providers.tf +0 -15
- package/infra/terraform/openstack/prod/terraform.tfvars.example +0 -55
- package/infra/terraform/openstack/prod/variables.tf +0 -210
- package/infra/terraform/openstack/prod/versions.tf +0 -10
- package/infra/terraform/openstack/server/.terraform.lock.hcl +0 -45
- package/infra/terraform/openstack/server/README.md +0 -47
- package/infra/terraform/openstack/server/main.tf +0 -161
- package/infra/terraform/openstack/server/outputs.tf +0 -30
- package/infra/terraform/openstack/server/providers.tf +0 -30
- package/infra/terraform/openstack/server/templates/server-user-data.sh.tftpl +0 -50
- package/infra/terraform/openstack/server/variables.tf +0 -233
- package/infra/terraform/openstack/server/zz_aspace.auto.tfvars.example.json +0 -29
- package/pnpm-workspace.yaml +0 -2
- package/scripts/dev/audit_sdd_build_ast.py +0 -277
- package/sdd/01_planning/01_feature/INDEX.md +0 -16
- package/sdd/01_planning/01_feature/README.md +0 -76
- package/sdd/01_planning/01_feature/alerts_feature_spec.md +0 -55
- package/sdd/01_planning/01_feature/auth_feature_spec.md +0 -57
- package/sdd/01_planning/01_feature/catalog_feature_spec.md +0 -61
- package/sdd/01_planning/01_feature/fulfillment_feature_spec.md +0 -58
- package/sdd/01_planning/01_feature/health_feature_spec.md +0 -52
- package/sdd/01_planning/01_feature/inventory_feature_spec.md +0 -60
- package/sdd/01_planning/01_feature/order_feature_spec.md +0 -63
- package/sdd/01_planning/01_feature/shipping_feature_spec.md +0 -55
- package/sdd/01_planning/01_feature/support_feature_spec.md +0 -53
- package/sdd/01_planning/01_feature/user_feature_spec.md +0 -54
- package/sdd/01_planning/02_screen/INDEX.md +0 -13
- package/sdd/01_planning/02_screen/README.md +0 -41
- package/sdd/01_planning/02_screen/admin_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/assets/README.md +0 -16
- package/sdd/01_planning/02_screen/assets/example/README.md +0 -13
- package/sdd/01_planning/02_screen/landing_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/mobile_screen_spec.pdf +0 -0
- package/sdd/01_planning/02_screen/web_screen_spec.pdf +0 -0
- package/sdd/01_planning/03_architecture/INDEX.md +0 -9
- package/sdd/01_planning/03_architecture/README.md +0 -25
- package/sdd/01_planning/03_architecture/architecture_document_structure.md +0 -77
- package/sdd/01_planning/03_architecture/backend/README.md +0 -10
- package/sdd/01_planning/03_architecture/frontend/README.md +0 -12
- package/sdd/01_planning/03_architecture/infra/README.md +0 -10
- package/sdd/01_planning/03_architecture/tech-research/README.md +0 -4
- package/sdd/01_planning/03_architecture/templates_system_architecture.md +0 -84
- package/sdd/01_planning/04_data/INDEX.md +0 -4
- package/sdd/01_planning/04_data/README.md +0 -10
- package/sdd/01_planning/04_data/templates_data_modeling.md +0 -119
- package/sdd/01_planning/05_api/README.md +0 -12
- package/sdd/01_planning/05_api/templates_api_contract.md +0 -90
- package/sdd/01_planning/06_iac/README.md +0 -11
- package/sdd/01_planning/06_iac/templates_runtime_and_cicd_baseline.md +0 -46
- package/sdd/01_planning/07_integration/README.md +0 -11
- package/sdd/01_planning/07_integration/templates_frontend_api_integration.md +0 -46
- package/sdd/01_planning/08_nonfunctional/README.md +0 -7
- package/sdd/01_planning/09_security/README.md +0 -7
- package/sdd/01_planning/10_test/README.md +0 -12
- package/sdd/01_planning/10_test/templates_test_strategy.md +0 -60
- package/sdd/01_planning/INDEX.md +0 -19
- package/sdd/01_planning/README.md +0 -17
- package/sdd/02_plan/01_feature/README.md +0 -34
- package/sdd/02_plan/01_feature/_feature_todo_template.md +0 -29
- package/sdd/02_plan/02_screen/INDEX.md +0 -19
- package/sdd/02_plan/02_screen/README.md +0 -39
- package/sdd/02_plan/02_screen/_screen_todo_template.md +0 -60
- package/sdd/02_plan/03_architecture/README.md +0 -23
- package/sdd/02_plan/03_architecture/architecture_document_governance.md +0 -40
- package/sdd/02_plan/03_architecture/build_ast_runtime_tree_governance.md +0 -53
- package/sdd/02_plan/03_architecture/repository_governance.md +0 -39
- package/sdd/02_plan/03_architecture/runtime_and_structure_governance.md +0 -38
- package/sdd/02_plan/03_architecture/templates-hexagonal-template-architecture.md +0 -9
- package/sdd/02_plan/03_architecture/toolchain_governance.md +0 -98
- package/sdd/02_plan/04_data/README.md +0 -5
- package/sdd/02_plan/05_api/README.md +0 -5
- package/sdd/02_plan/06_iac/README.md +0 -11
- package/sdd/02_plan/06_iac/dev_runtime_delivery.md +0 -36
- package/sdd/02_plan/06_iac/template_runtime_delivery.md +0 -50
- package/sdd/02_plan/07_integration/README.md +0 -5
- package/sdd/02_plan/07_integration/frontend_live_integration.md +0 -31
- package/sdd/02_plan/08_nonfunctional/README.md +0 -5
- package/sdd/02_plan/08_nonfunctional/repository_hygiene.md +0 -26
- package/sdd/02_plan/09_security/README.md +0 -5
- package/sdd/02_plan/10_test/README.md +0 -11
- package/sdd/02_plan/10_test/regression_verification.md +0 -39
- package/sdd/02_plan/10_test/templates/README.md +0 -8
- package/sdd/02_plan/10_test/templates/ui_parity_web_contract.template.yaml +0 -23
- package/sdd/02_plan/10_test/verification_strategy.md +0 -43
- package/sdd/02_plan/99_generated/from_planning/ui_parity/.gitkeep +0 -1
- package/sdd/02_plan/README.md +0 -40
- package/sdd/03_build/01_feature/README.md +0 -20
- package/sdd/03_build/01_feature/domain/README.md +0 -3
- package/sdd/03_build/01_feature/domain/account_and_access.md +0 -20
- package/sdd/03_build/01_feature/domain/catalog_and_inventory.md +0 -20
- package/sdd/03_build/01_feature/domain/ordering_and_fulfillment.md +0 -21
- package/sdd/03_build/01_feature/domain/support_and_observability.md +0 -21
- package/sdd/03_build/01_feature/domain_surfaces.md +0 -28
- package/sdd/03_build/01_feature/service/README.md +0 -3
- package/sdd/03_build/01_feature/service/admin_surface.md +0 -15
- package/sdd/03_build/01_feature/service/landing_surface.md +0 -13
- package/sdd/03_build/01_feature/service/mobile_surface.md +0 -14
- package/sdd/03_build/01_feature/service/web_surface.md +0 -14
- package/sdd/03_build/02_screen/README.md +0 -25
- package/sdd/03_build/02_screen/_screen_build_template.md +0 -26
- package/sdd/03_build/02_screen/admin/README.md +0 -5
- package/sdd/03_build/02_screen/landing/README.md +0 -5
- package/sdd/03_build/02_screen/mobile/README.md +0 -5
- package/sdd/03_build/02_screen/web/README.md +0 -5
- package/sdd/03_build/03_architecture/README.md +0 -10
- package/sdd/03_build/03_architecture/architecture_document_governance.md +0 -30
- package/sdd/03_build/03_architecture/build_ast_runtime_tree_governance.md +0 -24
- package/sdd/03_build/03_architecture/repository_governance.md +0 -18
- package/sdd/03_build/03_architecture/toolchain_governance.md +0 -36
- package/sdd/03_build/06_iac/README.md +0 -3
- package/sdd/03_build/06_iac/dev_runtime_delivery.md +0 -10
- package/sdd/03_build/06_iac/template_runtime_delivery.md +0 -49
- package/sdd/03_build/07_integration/README.md +0 -3
- package/sdd/03_build/07_integration/frontend_live_integration.md +0 -11
- package/sdd/03_build/08_nonfunctional/README.md +0 -3
- package/sdd/03_build/08_nonfunctional/repository_hygiene.md +0 -10
- package/sdd/03_build/10_test/README.md +0 -9
- package/sdd/03_build/10_test/regression_verification.md +0 -16
- package/sdd/03_build/10_test/verification_harness.md +0 -11
- package/sdd/03_build/README.md +0 -35
- package/sdd/03_verify/01_feature/README.md +0 -5
- package/sdd/03_verify/01_feature/domain_verification.md +0 -14
- package/sdd/03_verify/01_feature/service_verification.md +0 -22
- package/sdd/03_verify/02_screen/README.md +0 -6
- package/sdd/03_verify/02_screen/_screen_verify_template.md +0 -20
- package/sdd/03_verify/02_screen/admin/README.md +0 -4
- package/sdd/03_verify/02_screen/landing/README.md +0 -4
- package/sdd/03_verify/02_screen/mobile/README.md +0 -4
- package/sdd/03_verify/02_screen/web/README.md +0 -4
- package/sdd/03_verify/03_architecture/README.md +0 -10
- package/sdd/03_verify/03_architecture/architecture_document_governance.md +0 -15
- package/sdd/03_verify/03_architecture/build_ast_runtime_tree_governance.md +0 -28
- package/sdd/03_verify/03_architecture/repository_governance.md +0 -16
- package/sdd/03_verify/03_architecture/toolchain_governance.md +0 -58
- package/sdd/03_verify/06_iac/README.md +0 -3
- package/sdd/03_verify/06_iac/dev_runtime_delivery.md +0 -10
- package/sdd/03_verify/06_iac/template_runtime_delivery.md +0 -42
- package/sdd/03_verify/07_integration/README.md +0 -3
- package/sdd/03_verify/07_integration/frontend_live_integration.md +0 -16
- package/sdd/03_verify/08_nonfunctional/README.md +0 -3
- package/sdd/03_verify/08_nonfunctional/repository_hygiene.md +0 -14
- package/sdd/03_verify/10_test/README.md +0 -9
- package/sdd/03_verify/10_test/regression_verification.md +0 -16
- package/sdd/03_verify/10_test/ui_parity/README.md +0 -4
- package/sdd/03_verify/10_test/ui_parity/loop_runs/.gitkeep +0 -0
- package/sdd/03_verify/10_test/ui_parity/reference/.gitkeep +0 -0
- package/sdd/03_verify/10_test/ui_parity/staged_runs/.gitkeep +0 -0
- package/sdd/03_verify/10_test/verification_harness.md +0 -17
- package/sdd/03_verify/README.md +0 -22
- package/sdd/05_operate/01_runbooks/.gitkeep +0 -1
- package/sdd/05_operate/01_runbooks/README.md +0 -4
- package/sdd/05_operate/02_delivery_status/README.md +0 -4
- package/sdd/05_operate/02_delivery_status/service_status.md +0 -16
- package/sdd/05_operate/README.md +0 -12
- package/sdd/99_toolchain/01_automation/.gitkeep +0 -1
- package/sdd/99_toolchain/01_automation/README.md +0 -76
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_proof_results.py +0 -132
- package/sdd/99_toolchain/01_automation/agentic-dev/analyze_route_gap.py +0 -85
- package/sdd/99_toolchain/01_automation/agentic-dev/assets/repo-contract.template.json +0 -75
- package/sdd/99_toolchain/01_automation/agentic-dev/bootstrap_frontend_parity.sh +0 -84
- package/sdd/99_toolchain/01_automation/agentic-dev/init_frontend_parity.sh +0 -33
- package/sdd/99_toolchain/01_automation/agentic-dev/init_repo_contract.sh +0 -51
- package/sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json +0 -76
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_frontend_target.py +0 -52
- package/sdd/99_toolchain/01_automation/agentic-dev/resolve_repo_contract.py +0 -56
- package/sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh +0 -100
- package/sdd/99_toolchain/01_automation/agentic-dev/run_repo_phase.sh +0 -140
- package/sdd/99_toolchain/01_automation/agentic-dev/validate_json_schema.py +0 -39
- package/sdd/99_toolchain/01_automation/agentic-parity-harness-design.md +0 -291
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/queue.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/admin_screen_capture/support.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/home.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/landing_screen_capture/workspace.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/fulfillment.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/mobile_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/web_screen_capture/dashboard.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/web_screen_capture/login.png +0 -0
- package/sdd/99_toolchain/01_automation/assets/web_screen_capture/orders.png +0 -0
- package/sdd/99_toolchain/01_automation/build_asset_recipes.py +0 -10
- package/sdd/99_toolchain/01_automation/build_screen_spec_pdf.py +0 -427
- package/sdd/99_toolchain/01_automation/capture_screen_assets.mjs +0 -148
- package/sdd/99_toolchain/01_automation/harness-layout.md +0 -34
- package/sdd/99_toolchain/01_automation/parity-execution-tooling-design.md +0 -319
- package/sdd/99_toolchain/01_automation/playwright_exactness_manifest.py +0 -21
- package/sdd/99_toolchain/01_automation/run_playwright_exactness.py +0 -87
- package/sdd/99_toolchain/01_automation/screen_spec_manifest.py +0 -321
- package/sdd/99_toolchain/01_automation/spec_asset_builder.py +0 -274
- package/sdd/99_toolchain/01_automation/ui-contract-projection.md +0 -79
- package/sdd/99_toolchain/01_automation/ui-parity/README.md +0 -60
- package/sdd/99_toolchain/01_automation/ui-parity/cli/extract-reference-pages.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/cli/materialize-reference-assets.mjs +0 -58
- package/sdd/99_toolchain/01_automation/ui-parity/cli/normalize-reference-assets.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/cli/route-gap-report.mjs +0 -187
- package/sdd/99_toolchain/01_automation/ui-parity/cli/run-proof.mjs +0 -50
- package/sdd/99_toolchain/01_automation/ui-parity/cli/scaffold-contract.mjs +0 -62
- package/sdd/99_toolchain/01_automation/ui-parity/cli/upload-parity1.mjs +0 -2
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/collector-metadata.schema.json +0 -33
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/proof-result.schema.json +0 -76
- package/sdd/99_toolchain/01_automation/ui-parity/contracts/route-gap-report.schema.json +0 -95
- package/sdd/99_toolchain/01_automation/ui-parity/core/capture-runner.mjs +0 -55
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-adapter.mjs +0 -25
- package/sdd/99_toolchain/01_automation/ui-parity/core/load-contract.mjs +0 -81
- package/sdd/99_toolchain/01_automation/ui-parity/core/paths.mjs +0 -23
- package/sdd/99_toolchain/01_automation/ui-parity/core/proof-runner.mjs +0 -255
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-artifact-layout.md +0 -23
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-proof-interface.md +0 -60
- package/sdd/99_toolchain/01_automation/ui-parity/interfaces/ui-parity-route-gap-interface.md +0 -82
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/playwright-runtime.mjs +0 -16
- package/sdd/99_toolchain/01_automation/ui-parity/runtime/static-runtime.mjs +0 -6
- package/sdd/99_toolchain/02_policies/.gitkeep +0 -1
- package/sdd/99_toolchain/02_policies/build-ast-governance-policy.md +0 -22
- package/sdd/99_toolchain/02_policies/compose-runtime-baseline-policy.md +0 -24
- package/sdd/99_toolchain/02_policies/convention-storage-policy.md +0 -26
- package/sdd/99_toolchain/02_policies/main-push-before-dev-deploy-policy.md +0 -27
- package/sdd/99_toolchain/02_policies/regression-verification-policy.md +0 -22
- package/sdd/99_toolchain/03_templates/.gitkeep +0 -1
- package/sdd/99_toolchain/03_templates/asset_recipe_manifest.example.py +0 -38
- package/sdd/99_toolchain/03_templates/generated_assets/README.md +0 -11
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-lockup.svg +0 -3
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-mark.svg +0 -3
- package/sdd/99_toolchain/03_templates/generated_assets/example-brand-wordmark.svg +0 -3
- package/sdd/99_toolchain/03_templates/playwright_exactness_manifest.example.py +0 -21
- package/sdd/99_toolchain/README.md +0 -23
- package/sdd/README.md +0 -21
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'EOF'
|
|
6
|
-
Usage: init_repo_contract.sh [repo_root]
|
|
7
|
-
|
|
8
|
-
Create the canonical toolchain contract if it does not exist.
|
|
9
|
-
Also create runtime-friendly aliases:
|
|
10
|
-
- .codex/agentic-dev.json
|
|
11
|
-
- .claude/agentic-dev.json
|
|
12
|
-
Print the resulting canonical contract path.
|
|
13
|
-
EOF
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
|
|
17
|
-
usage
|
|
18
|
-
exit 0
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
repo_root="$(cd "${1:-$(pwd)}" && pwd)"
|
|
22
|
-
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
23
|
-
template_path="${script_dir}/assets/repo-contract.template.json"
|
|
24
|
-
contract_path="${repo_root}/sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json"
|
|
25
|
-
codex_dir="${repo_root}/.codex"
|
|
26
|
-
claude_dir="${repo_root}/.claude"
|
|
27
|
-
codex_alias_path="${codex_dir}/agentic-dev.json"
|
|
28
|
-
claude_alias_path="${claude_dir}/agentic-dev.json"
|
|
29
|
-
|
|
30
|
-
if [[ ! -f "${template_path}" ]]; then
|
|
31
|
-
echo "Template not found: ${template_path}" >&2
|
|
32
|
-
exit 1
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
mkdir -p "$(dirname "${contract_path}")" "${codex_dir}" "${claude_dir}"
|
|
36
|
-
if [[ ! -f "${contract_path}" ]]; then
|
|
37
|
-
cp "${template_path}" "${contract_path}"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
python3 - "${codex_alias_path}" "${claude_alias_path}" <<'PY'
|
|
41
|
-
import json
|
|
42
|
-
import sys
|
|
43
|
-
from pathlib import Path
|
|
44
|
-
|
|
45
|
-
payload = {"contract_path": "../sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json"}
|
|
46
|
-
for raw_path in sys.argv[1:]:
|
|
47
|
-
path = Path(raw_path)
|
|
48
|
-
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
49
|
-
PY
|
|
50
|
-
|
|
51
|
-
printf '%s\n' "${contract_path}"
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema_version": 1,
|
|
3
|
-
"name": "templates-frontends",
|
|
4
|
-
"spec": {
|
|
5
|
-
"planning_paths": [
|
|
6
|
-
"sdd/01_planning",
|
|
7
|
-
"sdd/02_plan"
|
|
8
|
-
],
|
|
9
|
-
"canonical_targets_dir": "sdd/02_plan"
|
|
10
|
-
},
|
|
11
|
-
"frontend": {
|
|
12
|
-
"default_target": "web",
|
|
13
|
-
"targets": {
|
|
14
|
-
"web": {
|
|
15
|
-
"dir": "client/web",
|
|
16
|
-
"adapter_path": "client/web/scripts/ui-parity-web-adapter.mjs",
|
|
17
|
-
"screens_path": "client/web/src/lib/specScreens.json",
|
|
18
|
-
"routes_path": "client/web/src/lib/specRouteCatalog.json",
|
|
19
|
-
"preview_url": "http://127.0.0.1:4301",
|
|
20
|
-
"parity_contract_path": "sdd/02_plan/10_test/templates/ui_parity_web_contract.yaml",
|
|
21
|
-
"route_gap_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_web_route_gap_report.json",
|
|
22
|
-
"route_gap_markdown_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_web_route_gap_report.md",
|
|
23
|
-
"proof_output": "sdd/03_verify/10_test/ui_parity/templates_web_agentic_dev_latest.json"
|
|
24
|
-
},
|
|
25
|
-
"mobile": {
|
|
26
|
-
"dir": "client/mobile",
|
|
27
|
-
"adapter_path": "client/mobile/scripts/ui-parity-mobile-adapter.mjs",
|
|
28
|
-
"screens_path": "client/mobile/src/lib/specScreens.json",
|
|
29
|
-
"routes_path": "client/mobile/src/lib/specRouteCatalog.json",
|
|
30
|
-
"preview_url": "http://127.0.0.1:4302",
|
|
31
|
-
"parity_contract_path": "sdd/02_plan/10_test/templates/ui_parity_mobile_contract.yaml",
|
|
32
|
-
"route_gap_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_mobile_route_gap_report.json",
|
|
33
|
-
"route_gap_markdown_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_mobile_route_gap_report.md",
|
|
34
|
-
"proof_output": "sdd/03_verify/10_test/ui_parity/templates_mobile_agentic_dev_latest.json"
|
|
35
|
-
},
|
|
36
|
-
"admin": {
|
|
37
|
-
"dir": "client/admin",
|
|
38
|
-
"adapter_path": "client/admin/scripts/ui-parity-admin-adapter.mjs",
|
|
39
|
-
"screens_path": "client/admin/src/lib/specScreens.json",
|
|
40
|
-
"routes_path": "client/admin/src/lib/specRouteCatalog.json",
|
|
41
|
-
"preview_url": "http://127.0.0.1:4400",
|
|
42
|
-
"parity_contract_path": "sdd/02_plan/10_test/templates/ui_parity_admin_contract.yaml",
|
|
43
|
-
"route_gap_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_admin_route_gap_report.json",
|
|
44
|
-
"route_gap_markdown_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_admin_route_gap_report.md",
|
|
45
|
-
"proof_output": "sdd/03_verify/10_test/ui_parity/templates_admin_agentic_dev_latest.json"
|
|
46
|
-
},
|
|
47
|
-
"landing": {
|
|
48
|
-
"dir": "client/landing",
|
|
49
|
-
"adapter_path": "client/landing/scripts/ui-parity-landing-adapter.mjs",
|
|
50
|
-
"screens_path": "client/landing/src/lib/specScreens.json",
|
|
51
|
-
"routes_path": "client/landing/src/lib/specRouteCatalog.json",
|
|
52
|
-
"preview_url": "http://127.0.0.1:4300",
|
|
53
|
-
"parity_contract_path": "sdd/02_plan/10_test/templates/ui_parity_landing_contract.yaml",
|
|
54
|
-
"route_gap_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_landing_route_gap_report.json",
|
|
55
|
-
"route_gap_markdown_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_landing_route_gap_report.md",
|
|
56
|
-
"proof_output": "sdd/03_verify/10_test/ui_parity/templates_landing_agentic_dev_latest.json"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"commands": {
|
|
61
|
-
"plan_audit": "bash sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh route_gap .",
|
|
62
|
-
"build": "bash sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh build .",
|
|
63
|
-
"proof": "bash sdd/99_toolchain/01_automation/agentic-dev/run_frontend_target.sh proof .",
|
|
64
|
-
"deploy_dev": "echo 'configure deploy_dev command in sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json for the cloned service' >&2",
|
|
65
|
-
"verify_dev": "test -f \"$PWD/sdd/03_verify/10_test/ui_parity/templates_web_agentic_dev_latest.json\" && echo verify-dev-placeholder-ok"
|
|
66
|
-
},
|
|
67
|
-
"artifacts": {
|
|
68
|
-
"route_gap_output": "sdd/02_plan/99_generated/from_planning/ui_parity/ui_parity_web_route_gap_report.json",
|
|
69
|
-
"proof_output": "sdd/03_verify/10_test/ui_parity/templates_web_agentic_dev_latest.json"
|
|
70
|
-
},
|
|
71
|
-
"notes": [
|
|
72
|
-
"This template contract is intentionally self-contained and points at repo-local 99_toolchain automation.",
|
|
73
|
-
"Replace deploy_dev and verify_dev with service-specific DEV commands after cloning the template.",
|
|
74
|
-
"plan_audit is expected to generate and gate a route-gap report before proof."
|
|
75
|
-
]
|
|
76
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import json
|
|
3
|
-
import sys
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
from resolve_repo_contract import resolve_repo_contract_path
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main() -> int:
|
|
10
|
-
if len(sys.argv) < 2:
|
|
11
|
-
print("Usage: resolve_frontend_target.py <repo_root> [target]", file=sys.stderr)
|
|
12
|
-
return 1
|
|
13
|
-
|
|
14
|
-
repo_root = Path(sys.argv[1]).resolve()
|
|
15
|
-
target_name = sys.argv[2].strip() if len(sys.argv) > 2 and sys.argv[2].strip() else None
|
|
16
|
-
contract_path = resolve_repo_contract_path(repo_root)
|
|
17
|
-
if contract_path is None:
|
|
18
|
-
print("Frontend contract not found via .codex/.claude/toolchain contract search order.", file=sys.stderr)
|
|
19
|
-
return 1
|
|
20
|
-
|
|
21
|
-
contract = json.loads(contract_path.read_text(encoding="utf-8"))
|
|
22
|
-
frontend = contract.get("frontend")
|
|
23
|
-
if not isinstance(frontend, dict):
|
|
24
|
-
print(f"Missing frontend block in {contract_path}", file=sys.stderr)
|
|
25
|
-
return 1
|
|
26
|
-
|
|
27
|
-
default_target = frontend.get("default_target")
|
|
28
|
-
targets = frontend.get("targets")
|
|
29
|
-
if not isinstance(default_target, str) or not default_target.strip():
|
|
30
|
-
print(f"Missing frontend.default_target in {contract_path}", file=sys.stderr)
|
|
31
|
-
return 1
|
|
32
|
-
if not isinstance(targets, dict):
|
|
33
|
-
print(f"Missing frontend.targets in {contract_path}", file=sys.stderr)
|
|
34
|
-
return 1
|
|
35
|
-
|
|
36
|
-
selected = target_name or default_target
|
|
37
|
-
target = targets.get(selected)
|
|
38
|
-
if not isinstance(target, dict):
|
|
39
|
-
print(f"Unknown frontend target: {selected}", file=sys.stderr)
|
|
40
|
-
return 1
|
|
41
|
-
|
|
42
|
-
payload = {
|
|
43
|
-
"name": selected,
|
|
44
|
-
"default_target": default_target,
|
|
45
|
-
"target": target,
|
|
46
|
-
}
|
|
47
|
-
print(json.dumps(payload, ensure_ascii=False))
|
|
48
|
-
return 0
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if __name__ == "__main__":
|
|
52
|
-
raise SystemExit(main())
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import json
|
|
3
|
-
import sys
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
SEARCH_ORDER = (
|
|
8
|
-
".codex/agentic-dev.json",
|
|
9
|
-
".claude/agentic-dev.json",
|
|
10
|
-
"sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json",
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def candidate_paths(start: Path):
|
|
15
|
-
current = start.resolve()
|
|
16
|
-
if current.is_file():
|
|
17
|
-
current = current.parent
|
|
18
|
-
for base in (current, *current.parents):
|
|
19
|
-
for rel in SEARCH_ORDER:
|
|
20
|
-
yield base / rel
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def resolve_pointer(path: Path) -> Path:
|
|
24
|
-
data = json.loads(path.read_text(encoding="utf-8"))
|
|
25
|
-
target = data.get("contract_path")
|
|
26
|
-
if isinstance(target, str) and target.strip():
|
|
27
|
-
resolved = (path.parent / target).resolve()
|
|
28
|
-
if not resolved.is_file():
|
|
29
|
-
raise FileNotFoundError(f"contract_path target not found: {resolved}")
|
|
30
|
-
return resolved
|
|
31
|
-
return path.resolve()
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def resolve_repo_contract_path(start: Path) -> Path | None:
|
|
35
|
-
for path in candidate_paths(start):
|
|
36
|
-
if path.is_file():
|
|
37
|
-
return resolve_pointer(path)
|
|
38
|
-
return None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def main() -> int:
|
|
42
|
-
start = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
|
|
43
|
-
resolved = resolve_repo_contract_path(start)
|
|
44
|
-
if resolved is not None:
|
|
45
|
-
print(resolved)
|
|
46
|
-
return 0
|
|
47
|
-
print(
|
|
48
|
-
"No repo contract found. Checked .codex/agentic-dev.json, "
|
|
49
|
-
".claude/agentic-dev.json, sdd/99_toolchain/01_automation/agentic-dev/repo-contract.json in current and parent directories.",
|
|
50
|
-
file=sys.stderr,
|
|
51
|
-
)
|
|
52
|
-
return 1
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if __name__ == "__main__":
|
|
56
|
-
raise SystemExit(main())
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'EOF'
|
|
6
|
-
Usage: run_frontend_target.sh <action> [repo_root] [target]
|
|
7
|
-
|
|
8
|
-
Actions:
|
|
9
|
-
build
|
|
10
|
-
preview
|
|
11
|
-
scaffold
|
|
12
|
-
route_gap
|
|
13
|
-
materialize_references
|
|
14
|
-
proof
|
|
15
|
-
EOF
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if [[ $# -lt 1 ]]; then
|
|
19
|
-
usage >&2
|
|
20
|
-
exit 1
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
action="$1"
|
|
24
|
-
repo_root="$(cd "${2:-$(pwd)}" && pwd)"
|
|
25
|
-
target_name="${3:-${FRONTEND_TARGET:-}}"
|
|
26
|
-
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
27
|
-
resolver_path="${script_dir}/resolve_frontend_target.py"
|
|
28
|
-
payload="$(python3 "${resolver_path}" "${repo_root}" "${target_name}")"
|
|
29
|
-
|
|
30
|
-
read_target_value() {
|
|
31
|
-
local key="$1"
|
|
32
|
-
python3 - "${payload}" "${key}" <<'PY'
|
|
33
|
-
import json
|
|
34
|
-
import sys
|
|
35
|
-
|
|
36
|
-
payload = json.loads(sys.argv[1])
|
|
37
|
-
key = sys.argv[2]
|
|
38
|
-
value = payload
|
|
39
|
-
for part in key.split("."):
|
|
40
|
-
if not isinstance(value, dict):
|
|
41
|
-
raise SystemExit(1)
|
|
42
|
-
value = value.get(part)
|
|
43
|
-
if isinstance(value, (dict, list)):
|
|
44
|
-
print(json.dumps(value, ensure_ascii=False))
|
|
45
|
-
elif value is None:
|
|
46
|
-
raise SystemExit(1)
|
|
47
|
-
else:
|
|
48
|
-
print(str(value))
|
|
49
|
-
PY
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
target_id="$(read_target_value "name")"
|
|
53
|
-
target_dir="$(read_target_value "target.dir")"
|
|
54
|
-
adapter_path="$(read_target_value "target.adapter_path")"
|
|
55
|
-
screens_path="$(read_target_value "target.screens_path")"
|
|
56
|
-
routes_path="$(read_target_value "target.routes_path")"
|
|
57
|
-
parity_contract_path="$(read_target_value "target.parity_contract_path")"
|
|
58
|
-
route_gap_output="$(read_target_value "target.route_gap_output")"
|
|
59
|
-
route_gap_markdown_output="$(read_target_value "target.route_gap_markdown_output")"
|
|
60
|
-
proof_output="$(read_target_value "target.proof_output")"
|
|
61
|
-
|
|
62
|
-
cd "${repo_root}"
|
|
63
|
-
|
|
64
|
-
case "${action}" in
|
|
65
|
-
build)
|
|
66
|
-
npm --prefix "${target_dir}" run build
|
|
67
|
-
;;
|
|
68
|
-
preview)
|
|
69
|
-
npm --prefix "${target_dir}" run preview
|
|
70
|
-
;;
|
|
71
|
-
scaffold)
|
|
72
|
-
node sdd/99_toolchain/01_automation/ui-parity/cli/scaffold-contract.mjs \
|
|
73
|
-
--adapter "${adapter_path}" \
|
|
74
|
-
--out "${parity_contract_path}"
|
|
75
|
-
;;
|
|
76
|
-
route_gap)
|
|
77
|
-
node sdd/99_toolchain/01_automation/ui-parity/cli/route-gap-report.mjs \
|
|
78
|
-
--service "${target_id}" \
|
|
79
|
-
--screens "${screens_path}" \
|
|
80
|
-
--routes "${routes_path}" \
|
|
81
|
-
--out "${route_gap_output}" \
|
|
82
|
-
--markdown-out "${route_gap_markdown_output}"
|
|
83
|
-
;;
|
|
84
|
-
materialize_references)
|
|
85
|
-
node sdd/99_toolchain/01_automation/ui-parity/cli/materialize-reference-assets.mjs \
|
|
86
|
-
--adapter "${adapter_path}" \
|
|
87
|
-
--contract "${parity_contract_path}"
|
|
88
|
-
;;
|
|
89
|
-
proof)
|
|
90
|
-
node sdd/99_toolchain/01_automation/ui-parity/cli/run-proof.mjs \
|
|
91
|
-
--adapter "${adapter_path}" \
|
|
92
|
-
--contract "${parity_contract_path}" \
|
|
93
|
-
--out "${proof_output}"
|
|
94
|
-
;;
|
|
95
|
-
*)
|
|
96
|
-
echo "Unsupported frontend action: ${action}" >&2
|
|
97
|
-
usage >&2
|
|
98
|
-
exit 1
|
|
99
|
-
;;
|
|
100
|
-
esac
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'EOF'
|
|
6
|
-
Usage: run_repo_phase.sh <phase> [repo_root] [target]
|
|
7
|
-
|
|
8
|
-
Run a repo-local command from the nearest repo contract.
|
|
9
|
-
|
|
10
|
-
Supported phases:
|
|
11
|
-
plan_audit
|
|
12
|
-
build
|
|
13
|
-
proof
|
|
14
|
-
deploy_dev
|
|
15
|
-
verify_dev
|
|
16
|
-
full_dev
|
|
17
|
-
EOF
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if [[ $# -lt 1 ]]; then
|
|
21
|
-
usage >&2
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
phase="$1"
|
|
26
|
-
repo_root="${2:-$(pwd)}"
|
|
27
|
-
frontend_target="${3:-}"
|
|
28
|
-
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
29
|
-
resolver_path="${script_dir}/resolve_repo_contract.py"
|
|
30
|
-
frontend_resolver_path="${script_dir}/resolve_frontend_target.py"
|
|
31
|
-
proof_schema_path="${script_dir}/../ui-parity/contracts/proof-result.schema.json"
|
|
32
|
-
route_gap_schema_path="${script_dir}/../ui-parity/contracts/route-gap-report.schema.json"
|
|
33
|
-
schema_validator_path="${script_dir}/validate_json_schema.py"
|
|
34
|
-
repo_root="$(cd "${repo_root}" && pwd)"
|
|
35
|
-
|
|
36
|
-
resolve_contract() {
|
|
37
|
-
"${resolver_path}" "${repo_root}"
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
load_contract_value() {
|
|
41
|
-
local contract_path="$1"
|
|
42
|
-
local key="$2"
|
|
43
|
-
python3 - "${contract_path}" "${key}" <<'PY'
|
|
44
|
-
import json
|
|
45
|
-
import sys
|
|
46
|
-
|
|
47
|
-
contract_path, key = sys.argv[1], sys.argv[2]
|
|
48
|
-
with open(contract_path, "r", encoding="utf-8") as handle:
|
|
49
|
-
data = json.load(handle)
|
|
50
|
-
|
|
51
|
-
keys = key.split(".")
|
|
52
|
-
value = data
|
|
53
|
-
for part in keys:
|
|
54
|
-
if not isinstance(value, dict):
|
|
55
|
-
raise SystemExit(1)
|
|
56
|
-
value = value.get(part)
|
|
57
|
-
|
|
58
|
-
if not isinstance(value, str) or not value.strip():
|
|
59
|
-
raise SystemExit(1)
|
|
60
|
-
|
|
61
|
-
print(value.strip())
|
|
62
|
-
PY
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
run_single_phase() {
|
|
66
|
-
local contract_path="$1"
|
|
67
|
-
local repo_root_path="$2"
|
|
68
|
-
local single_phase="$3"
|
|
69
|
-
local command
|
|
70
|
-
command="$(load_contract_value "${contract_path}" "commands.${single_phase}")" || {
|
|
71
|
-
echo "Phase command not found in ${contract_path}: ${single_phase}" >&2
|
|
72
|
-
exit 1
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
printf 'Running phase `%s` from %s\n' "${single_phase}" "${contract_path}"
|
|
76
|
-
(
|
|
77
|
-
cd "${repo_root_path}"
|
|
78
|
-
if [[ -n "${frontend_target}" ]]; then
|
|
79
|
-
export FRONTEND_TARGET="${frontend_target}"
|
|
80
|
-
fi
|
|
81
|
-
eval "${command}"
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
if [[ "${single_phase}" == "plan_audit" ]]; then
|
|
85
|
-
local route_gap_output
|
|
86
|
-
route_gap_output="$(python3 "${frontend_resolver_path}" "${repo_root_path}" "${frontend_target}" | python3 -c 'import json,sys; print(json.load(sys.stdin)["target"]["route_gap_output"])')" || \
|
|
87
|
-
route_gap_output="$(load_contract_value "${contract_path}" "artifacts.route_gap_output")" || {
|
|
88
|
-
echo "Route gap artifact path not found in ${contract_path}" >&2
|
|
89
|
-
exit 1
|
|
90
|
-
}
|
|
91
|
-
if [[ ! -f "${repo_root_path}/${route_gap_output}" ]]; then
|
|
92
|
-
echo "Expected route gap artifact missing: ${repo_root_path}/${route_gap_output}" >&2
|
|
93
|
-
exit 1
|
|
94
|
-
fi
|
|
95
|
-
python3 "${schema_validator_path}" "${route_gap_schema_path}" "${repo_root_path}/${route_gap_output}"
|
|
96
|
-
python3 "${script_dir}/analyze_route_gap.py" --gate "${repo_root_path}/${route_gap_output}"
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
if [[ "${single_phase}" == "proof" || "${single_phase}" == "verify_dev" ]]; then
|
|
100
|
-
local proof_output
|
|
101
|
-
proof_output="$(python3 "${frontend_resolver_path}" "${repo_root_path}" "${frontend_target}" | python3 -c 'import json,sys; print(json.load(sys.stdin)["target"]["proof_output"])')" || \
|
|
102
|
-
proof_output="$(load_contract_value "${contract_path}" "artifacts.proof_output")" || {
|
|
103
|
-
echo "Proof artifact path not found in ${contract_path}" >&2
|
|
104
|
-
exit 1
|
|
105
|
-
}
|
|
106
|
-
if [[ ! -f "${repo_root_path}/${proof_output}" ]]; then
|
|
107
|
-
echo "Expected proof artifact missing: ${repo_root_path}/${proof_output}" >&2
|
|
108
|
-
exit 1
|
|
109
|
-
fi
|
|
110
|
-
python3 "${schema_validator_path}" "${proof_schema_path}" "${repo_root_path}/${proof_output}"
|
|
111
|
-
if [[ "${single_phase}" == "proof" ]]; then
|
|
112
|
-
python3 "${script_dir}/analyze_proof_results.py" --gate "${repo_root_path}/${proof_output}"
|
|
113
|
-
fi
|
|
114
|
-
fi
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if [[ ! -f "${resolver_path}" ]]; then
|
|
118
|
-
echo "Missing contract resolver: ${resolver_path}" >&2
|
|
119
|
-
exit 1
|
|
120
|
-
fi
|
|
121
|
-
|
|
122
|
-
contract_path="$(resolve_contract)" || exit 1
|
|
123
|
-
|
|
124
|
-
case "${phase}" in
|
|
125
|
-
plan_audit|build|proof|deploy_dev|verify_dev)
|
|
126
|
-
run_single_phase "${contract_path}" "${repo_root}" "${phase}"
|
|
127
|
-
;;
|
|
128
|
-
full_dev)
|
|
129
|
-
run_single_phase "${contract_path}" "${repo_root}" plan_audit
|
|
130
|
-
run_single_phase "${contract_path}" "${repo_root}" build
|
|
131
|
-
run_single_phase "${contract_path}" "${repo_root}" proof
|
|
132
|
-
run_single_phase "${contract_path}" "${repo_root}" deploy_dev
|
|
133
|
-
run_single_phase "${contract_path}" "${repo_root}" verify_dev
|
|
134
|
-
;;
|
|
135
|
-
*)
|
|
136
|
-
echo "Unsupported phase: ${phase}" >&2
|
|
137
|
-
usage >&2
|
|
138
|
-
exit 1
|
|
139
|
-
;;
|
|
140
|
-
esac
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import json
|
|
3
|
-
import sys
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
from jsonschema import Draft202012Validator
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main() -> int:
|
|
10
|
-
if len(sys.argv) != 3:
|
|
11
|
-
print("Usage: validate_json_schema.py <schema-json> <instance-json>", file=sys.stderr)
|
|
12
|
-
return 1
|
|
13
|
-
|
|
14
|
-
schema_path = Path(sys.argv[1])
|
|
15
|
-
instance_path = Path(sys.argv[2])
|
|
16
|
-
if not schema_path.is_file():
|
|
17
|
-
print(f"Schema not found: {schema_path}", file=sys.stderr)
|
|
18
|
-
return 1
|
|
19
|
-
if not instance_path.is_file():
|
|
20
|
-
print(f"Instance not found: {instance_path}", file=sys.stderr)
|
|
21
|
-
return 1
|
|
22
|
-
|
|
23
|
-
schema = json.loads(schema_path.read_text(encoding="utf-8"))
|
|
24
|
-
instance = json.loads(instance_path.read_text(encoding="utf-8"))
|
|
25
|
-
validator = Draft202012Validator(schema)
|
|
26
|
-
errors = sorted(validator.iter_errors(instance), key=lambda error: list(error.absolute_path))
|
|
27
|
-
if errors:
|
|
28
|
-
print("schema_validation=fail")
|
|
29
|
-
for error in errors[:20]:
|
|
30
|
-
path_label = ".".join(str(part) for part in error.absolute_path) or "<root>"
|
|
31
|
-
print(f"- {path_label}: {error.message}")
|
|
32
|
-
return 2
|
|
33
|
-
|
|
34
|
-
print("schema_validation=pass")
|
|
35
|
-
return 0
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if __name__ == "__main__":
|
|
39
|
-
raise SystemExit(main())
|