@llm4ts/shell 0.17.0 → 0.18.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/dist/Cli.d.ts +4 -0
- package/dist/Cli.d.ts.map +1 -1
- package/dist/Cli.js +69 -8
- package/dist/Cli.js.map +1 -1
- package/dist/FlowCatalog.d.ts +10 -4
- package/dist/FlowCatalog.d.ts.map +1 -1
- package/dist/FlowCatalog.js +25 -14
- package/dist/FlowCatalog.js.map +1 -1
- package/flows/epic-stories.js +1 -8
- package/flows/hello.js +15 -0
- package/flows/implement.js +1 -8
- package/flows/issue-pr.js +1 -8
- package/flows/judge-suite.js +1 -4
- package/flows/lib/epic-stories.js +3 -4
- package/flows/local.js +2 -5
- package/flows/modernize-bench.js +3 -12
- package/flows/modernize-extract.js +38 -20
- package/flows/modernize-implement.js +4 -15
- package/flows/modernize-pack-check.js +1 -8
- package/flows/modernize-review.js +4 -13
- package/flows/modernize-seed.js +3 -11
- package/flows/modernize-survey.js +0 -0
- package/flows/modernize-verify.js +5 -13
- package/flows/sdd.js +2 -12
- package/kits/j2ee-nextjs/README.md +29 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/RUNBOOK.md +232 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/PAGES.md +67 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/pom.xml +49 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/dto/AcctOvwDTO.java +58 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/dto/BenfDTO.java +49 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/dto/TrfDTO.java +70 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbAcctListService.java +53 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbBenfListService.java +58 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbBenfMaintService.java +58 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbException.java +21 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbGateway.java +44 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbTrfExecService.java +53 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/esb/EsbTrfValidateService.java +45 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/web/AccountOverviewServlet.java +90 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/web/BeneficiaryServlet.java +195 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/web/TransferDraft.java +62 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/java/com/demobank/legacy/web/TransferServlet.java +223 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/WEB-INF/web.xml +59 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/accountOverview.jsp +65 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/beneficiaryEdit.jsp +70 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/beneficiaryList.jsp +43 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/css/bank.css +132 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/dashboard.jsp +28 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/footer.jsp +8 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/header.jsp +22 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/help.jsp +32 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/js/jquery-1.12.4.min.js +1 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/js/validate.js +79 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/login.jsp +29 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/messages.jsp +34 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/nav.jsp +14 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/oldTransfer.jsp +34 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/profile.jsp +26 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/promoQ3.jsp +23 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/settings.jsp +34 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/testHarness.jsp +39 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/transferConfirm.jsp +35 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/transferStep1.jsp +73 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee/src/main/webapp/transferStep2.jsp +40 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/CONTRIBUTING.md +76 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/README.md +46 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/contracts/cards.openapi.yaml +57 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/contracts/profile.openapi.yaml +73 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/eslint.config.mjs +24 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/next-env.d.ts +5 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/next.config.mjs +10 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/package.json +29 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/pnpm-lock.yaml +2895 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/app/cards/page.tsx +62 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/app/layout.tsx +41 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/app/page.tsx +26 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/app/profile/page.tsx +134 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/app/signed-in-badge.tsx +9 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/auth/AuthProvider.tsx +36 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/Button.tsx +27 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/Card.tsx +18 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/DataTable.tsx +57 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/Field.tsx +34 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/Form.tsx +70 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/PageLayout.tsx +39 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/Stepper.tsx +29 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/components/index.ts +19 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/services/cards/mock.ts +47 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/services/cards/port.ts +31 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/services/profile/mock.ts +45 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/services/profile/port.ts +24 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/services/registry.ts +20 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/theme/components.css +269 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/src/theme/tokens.css +38 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/tests/cards.page.test.tsx +81 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/tests/profile.page.test.tsx +87 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/tsconfig.json +54 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/nextjs/vitest.config.ts +17 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/preflight.mjs +53 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/reset-demo.mjs +40 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/seed-legacy-j2ee.mjs +71 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/seed-nextjs.mjs +111 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/smoke-legacy-j2ee.mjs +144 -0
- package/kits/j2ee-nextjs/fixtures/demo-bank/smoke-nextjs.mjs +118 -0
- package/{flows → kits/j2ee-nextjs/flows}/convert-all.js +1 -7
- package/{flows → kits/j2ee-nextjs/flows}/convert-page.js +2 -6
- package/{flows → kits/j2ee-nextjs/flows}/lib/convert.js +6 -16
- package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/pack.md +2 -1
- package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/spec.md +5 -1
- package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/pack.md +1 -1
- package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/pack.md +1 -1
- package/kits/mainframe-java/README.md +31 -0
- package/{flows → kits/mainframe-java}/packs/ace-integration/pack.md +1 -1
- package/{flows → kits/mainframe-java}/packs/ace-kafka/pack.md +1 -1
- package/{flows → kits/mainframe-java}/packs/cobol-kafka/pack.md +1 -1
- package/{flows → kits/mainframe-java}/packs/cobol-springboot/pack.md +1 -1
- package/package.json +6 -6
- package/src/Cli.ts +92 -9
- package/src/FlowCatalog.ts +29 -13
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/patterns/PAT-J2EE-001-jstl-table.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/patterns/PAT-J2EE-002-jquery-validation.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/patterns/PAT-J2EE-003-session-stepper.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/patterns/PAT-J2EE-004-esb-port.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/patterns/PAT-J2EE-005-include-shell.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/analysis.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/bdd.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/implement.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/plan.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/review.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/survey-refine.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/prompts/survey-triage.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/reviewers/acl-purity.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/j2ee-nextjs-spa/reviewers/house-style.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/lessons.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/analysis.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/bdd.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/implement.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/plan.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/review.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/spec.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/survey-refine.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/prompts/survey-triage.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-bff-nextjs/reviewers/bff-boundary.md +0 -0
- /package/{flows/packs/ace-integration → kits/j2ee-nextjs/packs/jsp-bff-nextjs}/reviewers/traceability.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/lessons.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/analysis.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/bdd.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/implement.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/plan.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/review.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/spec.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/survey-refine.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/prompts/survey-triage.md +0 -0
- /package/{flows/packs/ace-kafka → kits/j2ee-nextjs/packs/jsp-nextjs}/reviewers/traceability.md +0 -0
- /package/{flows → kits/j2ee-nextjs}/packs/jsp-nextjs/reviewers/ux-fidelity.md +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/README.md +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/app/layout.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/app/page.js +0 -0
- /package/{flows/fixtures/scaffolds/kafka-streams-service/src/test/resources/features → kits/j2ee-nextjs/scaffolds/nextjs-spa/docs/specs}/.gitkeep +0 -0
- /package/{flows/fixtures/scaffolds/nextjs-spa/docs/specs → kits/j2ee-nextjs/scaffolds/nextjs-spa/features}/.gitkeep +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/next.config.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/package.json +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/nextjs-spa/tests/smoke.test.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/README.md +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/frontend/app/layout.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/frontend/app/page.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/frontend/next.config.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/frontend/package.json +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/frontend/tests/smoke.test.js +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/pom.xml +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/scripts/test.sh +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/src/main/java/com/meridian/bff/Application.java +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/src/main/resources/application.yaml +0 -0
- /package/{flows/fixtures → kits/j2ee-nextjs}/scaffolds/spring-bff/src/test/java/com/meridian/bff/ApplicationTests.java +0 -0
- /package/{flows/fixtures/scaffolds/nextjs-spa → kits/j2ee-nextjs/scaffolds/spring-bff/src/test/resources}/features/.gitkeep +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/lessons.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/analysis.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/bdd.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/implement.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/plan.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/review.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/prompts/spec.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-integration/reviewers/routing-fidelity.md +0 -0
- /package/{flows/packs/cobol-kafka → kits/mainframe-java/packs/ace-integration}/reviewers/traceability.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/lessons.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/analysis.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/bdd.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/implement.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/plan.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/review.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/spec.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/prompts/vectors.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/reviewers/event-contracts.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/ace-kafka/reviewers/routing-fidelity.md +0 -0
- /package/{flows/packs/cobol-springboot → kits/mainframe-java/packs/ace-kafka}/reviewers/traceability.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/lessons.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-001-record-to-event.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-002-job-step-topology.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-003-checkpoint-idempotence.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-004-eod-totals-window.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-005-reject-topic.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-006-keyed-state-store.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-007-outbox.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-008-partition-key.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-009-batch-window-cutoff.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/patterns/PAT-STREAM-010-replay-backfill.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/analysis.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/bdd.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/implement.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/plan.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/review.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/spec.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/survey-refine.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/survey-triage.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/prompts/vectors.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/reviewers/cobol-fidelity.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-kafka/reviewers/pattern-conformance.md +0 -0
- /package/{flows/packs/jsp-bff-nextjs → kits/mainframe-java/packs/cobol-kafka}/reviewers/traceability.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/lessons.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/analysis.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/bdd.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/implement.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/plan.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/review.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/spec.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/survey-refine.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/survey-triage.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/prompts/vectors.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/reviewers/cobol-fidelity.md +0 -0
- /package/{flows → kits/mainframe-java}/packs/cobol-springboot/reviewers/pattern-conformance.md +0 -0
- /package/{flows/packs/jsp-nextjs → kits/mainframe-java/packs/cobol-springboot}/reviewers/traceability.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-001-comp3-money.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-002-redefines.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-003-88-levels.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-004-perform-thru.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-005-file-status.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-006-sqlcode.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-007-validation-order.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-008-zoned-decimal.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-009-occurs-table.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-010-copybook-record.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-011-batch-counters.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-012-commit-frequency.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-013-abend.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-014-reject-file.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-015-accept-date.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-016-string-building.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-017-cursor-loop.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-018-yn-switches.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-019-shared-accumulators.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-020-tiered-fees.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-021-overdraft-floor.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-022-jcl-job-net.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-023-sort-step.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-024-fixed-width-records.md +0 -0
- /package/{flows → kits/mainframe-java}/patterns/PAT-COBOL-025-audit-rows.md +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/kafka-streams-service/README.md +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/kafka-streams-service/pom.xml +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/kafka-streams-service/scripts/replay.sh +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/kafka-streams-service/src/main/java/com/meridian/scaffold/Application.java +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/kafka-streams-service/src/test/java/com/meridian/scaffold/ApplicationTests.java +0 -0
- /package/{flows/fixtures/scaffolds/spring-bff → kits/mainframe-java/scaffolds/kafka-streams-service}/src/test/resources/features/.gitkeep +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/README.md +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/pom.xml +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/scripts/replay.sh +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/src/main/java/com/meridian/scaffold/Application.java +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/src/main/resources/application.yaml +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/src/test/java/com/meridian/scaffold/ApplicationTests.java +0 -0
- /package/{flows/fixtures → kits/mainframe-java}/scaffolds/spring-boot-service/src/test/resources/features/.gitkeep +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Workshop preflight: verify the demo environment before the audience
|
|
2
|
+
// arrives. Seeds both fixtures into a temp dir via their smoke checks and
|
|
3
|
+
// verifies the tools the runbook depends on. Exits nonzero, loudly, on any
|
|
4
|
+
// failure — fix everything red before demo day.
|
|
5
|
+
import { execFileSync } from "node:child_process"
|
|
6
|
+
import { fileURLToPath } from "node:url"
|
|
7
|
+
import { dirname, join } from "node:path"
|
|
8
|
+
|
|
9
|
+
const here = dirname(fileURLToPath(import.meta.url))
|
|
10
|
+
const failures = []
|
|
11
|
+
|
|
12
|
+
const check = (label, run) => {
|
|
13
|
+
try {
|
|
14
|
+
run()
|
|
15
|
+
console.log(`ok ${label}`)
|
|
16
|
+
} catch (error) {
|
|
17
|
+
failures.push(label)
|
|
18
|
+
console.error(`FAIL ${label}: ${error.message ?? error}`)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const tool = (label, command, args) =>
|
|
23
|
+
check(label, () => execFileSync(command, args, { stdio: "pipe" }))
|
|
24
|
+
|
|
25
|
+
tool("git available", "git", ["--version"])
|
|
26
|
+
tool("node >= 20", "node", ["--version"])
|
|
27
|
+
tool("pnpm available", "pnpm", ["--version"])
|
|
28
|
+
tool("claude CLI available (the coder seat)", "claude", ["--version"])
|
|
29
|
+
check("llm4ts CLI available", () => execFileSync("llm4ts", ["--version"], { stdio: "pipe" }))
|
|
30
|
+
check("llm4ts kits ships j2ee-nextjs/j2ee-nextjs-spa (ADR 0014)", () => {
|
|
31
|
+
const kits = JSON.parse(execFileSync("llm4ts", ["kits", "--json"], { encoding: "utf8" }))
|
|
32
|
+
const kit = kits.find((candidate) => candidate.name === "j2ee-nextjs")
|
|
33
|
+
if (kit === undefined || !kit.packs.includes("j2ee-nextjs-spa")) {
|
|
34
|
+
throw new Error("the j2ee-nextjs kit or its j2ee-nextjs-spa pack is missing — upgrade @llm4ts/shell to 0.18.0+")
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
check("legacy fixture seeds + smoke", () =>
|
|
39
|
+
execFileSync("node", [join(here, "smoke-legacy-j2ee.mjs")], { stdio: "pipe" })
|
|
40
|
+
)
|
|
41
|
+
check("nextjs fixture seeds + smoke", () =>
|
|
42
|
+
execFileSync("node", [join(here, "smoke-nextjs.mjs")], { stdio: "pipe" })
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
if (process.env.LLM4TS_LEGACY_REPO === undefined) {
|
|
46
|
+
console.log("note LLM4TS_LEGACY_REPO is not set yet — the runbook exports it in Act 0")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (failures.length > 0) {
|
|
50
|
+
console.error(`\npreflight FAILED: ${failures.join("; ")}`)
|
|
51
|
+
process.exit(1)
|
|
52
|
+
}
|
|
53
|
+
console.log("\npreflight OK — run reset-demo.mjs to materialize the estate")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Workshop reset: (re)materialize the demo estate so every rehearsal and the
|
|
2
|
+
// real run start identical. Wipes ONLY the two repos it owns under the given
|
|
3
|
+
// root, re-seeds both fixtures, and warms the target's node_modules from the
|
|
4
|
+
// pnpm store (run once with network before demo day; offline afterwards).
|
|
5
|
+
import { execFileSync } from "node:child_process"
|
|
6
|
+
import { existsSync, rmSync } from "node:fs"
|
|
7
|
+
import { dirname, join, resolve } from "node:path"
|
|
8
|
+
import { fileURLToPath } from "node:url"
|
|
9
|
+
|
|
10
|
+
const here = dirname(fileURLToPath(import.meta.url))
|
|
11
|
+
const root = resolve(process.argv[2] ?? ".demo-bank")
|
|
12
|
+
const legacy = join(root, "legacy-j2ee")
|
|
13
|
+
const target = join(root, "nextjs")
|
|
14
|
+
|
|
15
|
+
for (const path of [legacy, target]) {
|
|
16
|
+
if (existsSync(path)) {
|
|
17
|
+
rmSync(path, { recursive: true, force: true })
|
|
18
|
+
console.log(`removed ${path}`)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const run = (command, args, cwd) =>
|
|
23
|
+
execFileSync(command, args, { stdio: "inherit", ...(cwd === undefined ? {} : { cwd }) })
|
|
24
|
+
|
|
25
|
+
run("node", [join(here, "seed-legacy-j2ee.mjs"), legacy])
|
|
26
|
+
run("node", [join(here, "seed-nextjs.mjs"), target])
|
|
27
|
+
|
|
28
|
+
console.log("installing target dependencies (uses the warm pnpm store when offline)...")
|
|
29
|
+
try {
|
|
30
|
+
run("pnpm", ["install", "--ignore-workspace", "--prefer-offline"], target)
|
|
31
|
+
} catch {
|
|
32
|
+
console.error(
|
|
33
|
+
"pnpm install failed — if you are offline, warm the store once with network:\n" +
|
|
34
|
+
` cd ${target} && pnpm install --ignore-workspace`
|
|
35
|
+
)
|
|
36
|
+
process.exit(1)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
console.log(`\ndemo estate ready:\n legacy: ${legacy}\n target: ${target}`)
|
|
40
|
+
console.log(`next: export LLM4TS_LEGACY_REPO=${legacy} (see RUNBOOK.md Act 0)`)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Materialize the synthetic legacy J2EE fixture (kits/j2ee-nextjs/fixtures/demo-bank/legacy-j2ee)
|
|
3
|
+
// as a standalone git repository. The demo flows need a real repo root, not a
|
|
4
|
+
// subdirectory of llm4ts.
|
|
5
|
+
//
|
|
6
|
+
// node kits/j2ee-nextjs/fixtures/demo-bank/seed-legacy-j2ee.mjs [target-dir] [--force]
|
|
7
|
+
//
|
|
8
|
+
// Default target: .demo-bank/legacy-j2ee under the current working directory.
|
|
9
|
+
// Refuses to overwrite a non-empty target unless --force is given.
|
|
10
|
+
// Deterministic: fixed commit author/committer and date, no network.
|
|
11
|
+
|
|
12
|
+
import { execFileSync } from "node:child_process"
|
|
13
|
+
import fs from "node:fs"
|
|
14
|
+
import path from "node:path"
|
|
15
|
+
import process from "node:process"
|
|
16
|
+
import { fileURLToPath } from "node:url"
|
|
17
|
+
|
|
18
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url))
|
|
19
|
+
const fixtureDir = path.join(scriptDir, "legacy-j2ee")
|
|
20
|
+
|
|
21
|
+
const args = process.argv.slice(2)
|
|
22
|
+
const force = args.includes("--force")
|
|
23
|
+
const positional = args.filter((a) => a !== "--force")
|
|
24
|
+
|
|
25
|
+
if (positional.some((a) => a.startsWith("--"))) {
|
|
26
|
+
console.error(`unknown flag: ${positional.find((a) => a.startsWith("--"))}`)
|
|
27
|
+
console.error("usage: node seed-legacy-j2ee.mjs [target-dir] [--force]")
|
|
28
|
+
process.exit(2)
|
|
29
|
+
}
|
|
30
|
+
if (positional.length > 1) {
|
|
31
|
+
console.error("only one target directory may be supplied")
|
|
32
|
+
process.exit(2)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const target = path.resolve(positional[0] ?? path.join(process.cwd(), ".demo-bank", "legacy-j2ee"))
|
|
36
|
+
|
|
37
|
+
if (!fs.existsSync(fixtureDir)) {
|
|
38
|
+
console.error(`fixture source missing: ${fixtureDir}`)
|
|
39
|
+
process.exit(1)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (fs.existsSync(target) && fs.readdirSync(target).length > 0) {
|
|
43
|
+
if (!force) {
|
|
44
|
+
console.error(`target is not empty: ${target} (use --force to overwrite)`)
|
|
45
|
+
process.exit(2)
|
|
46
|
+
}
|
|
47
|
+
fs.rmSync(target, { recursive: true, force: true })
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
fs.mkdirSync(target, { recursive: true })
|
|
51
|
+
fs.cpSync(fixtureDir, target, { recursive: true })
|
|
52
|
+
|
|
53
|
+
// Fixed identity and date so seeded repos are deterministic.
|
|
54
|
+
const gitEnv = {
|
|
55
|
+
...process.env,
|
|
56
|
+
GIT_AUTHOR_NAME: "Demo Bank",
|
|
57
|
+
GIT_AUTHOR_EMAIL: "demo@example.invalid",
|
|
58
|
+
GIT_AUTHOR_DATE: "2020-01-01T00:00:00Z",
|
|
59
|
+
GIT_COMMITTER_NAME: "Demo Bank",
|
|
60
|
+
GIT_COMMITTER_EMAIL: "demo@example.invalid",
|
|
61
|
+
GIT_COMMITTER_DATE: "2020-01-01T00:00:00Z"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const git = (...gitArgs) =>
|
|
65
|
+
execFileSync("git", gitArgs, { cwd: target, env: gitEnv, stdio: "pipe" })
|
|
66
|
+
|
|
67
|
+
git("init", "-q", "-b", "main")
|
|
68
|
+
git("add", "-A")
|
|
69
|
+
git("commit", "-q", "-m", "Import DemoBank legacy portal")
|
|
70
|
+
|
|
71
|
+
console.log(target)
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Seed the DemoBank Next.js SPA fixture into a standalone git repository.
|
|
3
|
+
//
|
|
4
|
+
// node kits/j2ee-nextjs/fixtures/demo-bank/seed-nextjs.mjs [target-dir] [--force]
|
|
5
|
+
//
|
|
6
|
+
// target-dir defaults to .demo-bank/nextjs (relative to the current working
|
|
7
|
+
// directory). --force overwrites an existing target. node_modules, .next and
|
|
8
|
+
// out are never copied. The initial commit is deterministic: fixed author
|
|
9
|
+
// "Demo Bank <demo@example.invalid>" and fixed date 2020-01-01T00:00:00Z.
|
|
10
|
+
//
|
|
11
|
+
// Offline note: the fixture commits pnpm-lock.yaml. To install without
|
|
12
|
+
// network in the seeded repo, warm the pnpm store once while online
|
|
13
|
+
// (`pnpm install --ignore-workspace` in kits/j2ee-nextjs/fixtures/demo-bank/nextjs), then run
|
|
14
|
+
// `pnpm install --ignore-workspace --offline` in the seeded copy.
|
|
15
|
+
|
|
16
|
+
import { execFileSync } from 'node:child_process';
|
|
17
|
+
import fs from 'node:fs';
|
|
18
|
+
import path from 'node:path';
|
|
19
|
+
import process from 'node:process';
|
|
20
|
+
import { fileURLToPath } from 'node:url';
|
|
21
|
+
|
|
22
|
+
const SOURCE_DIR = path.join(
|
|
23
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
24
|
+
'nextjs',
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const EXCLUDED_NAMES = new Set(['node_modules', '.next', 'out', '.git']);
|
|
28
|
+
|
|
29
|
+
const AUTHOR_NAME = 'Demo Bank';
|
|
30
|
+
const AUTHOR_EMAIL = 'demo@example.invalid';
|
|
31
|
+
const COMMIT_DATE = '2020-01-01T00:00:00Z';
|
|
32
|
+
|
|
33
|
+
function fail(message) {
|
|
34
|
+
process.stderr.write(`seed-nextjs: ${message}\n`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function parseArgs(argv) {
|
|
39
|
+
let targetDir = null;
|
|
40
|
+
let force = false;
|
|
41
|
+
for (const arg of argv) {
|
|
42
|
+
if (arg === '--force') {
|
|
43
|
+
force = true;
|
|
44
|
+
} else if (arg.startsWith('--')) {
|
|
45
|
+
fail(`unknown option: ${arg}`);
|
|
46
|
+
} else if (targetDir === null) {
|
|
47
|
+
targetDir = arg;
|
|
48
|
+
} else {
|
|
49
|
+
fail(`unexpected argument: ${arg}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
targetDir: path.resolve(targetDir ?? path.join('.demo-bank', 'nextjs')),
|
|
54
|
+
force,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function git(cwd, args, env = {}) {
|
|
59
|
+
execFileSync('git', args, {
|
|
60
|
+
cwd,
|
|
61
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
62
|
+
env: { ...process.env, ...env },
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const { targetDir, force } = parseArgs(process.argv.slice(2));
|
|
67
|
+
|
|
68
|
+
if (!fs.existsSync(SOURCE_DIR)) {
|
|
69
|
+
fail(`fixture source not found: ${SOURCE_DIR}`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (fs.existsSync(targetDir)) {
|
|
73
|
+
if (!force) {
|
|
74
|
+
fail(`target already exists: ${targetDir} (use --force to overwrite)`);
|
|
75
|
+
}
|
|
76
|
+
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
80
|
+
fs.cpSync(SOURCE_DIR, targetDir, {
|
|
81
|
+
recursive: true,
|
|
82
|
+
filter: (source) => !EXCLUDED_NAMES.has(path.basename(source)),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
git(targetDir, ['init', '--quiet', '-b', 'main']);
|
|
86
|
+
git(targetDir, ['add', '-A']);
|
|
87
|
+
git(
|
|
88
|
+
targetDir,
|
|
89
|
+
[
|
|
90
|
+
'-c',
|
|
91
|
+
`user.name=${AUTHOR_NAME}`,
|
|
92
|
+
'-c',
|
|
93
|
+
`user.email=${AUTHOR_EMAIL}`,
|
|
94
|
+
'-c',
|
|
95
|
+
'commit.gpgsign=false',
|
|
96
|
+
'commit',
|
|
97
|
+
'--quiet',
|
|
98
|
+
'-m',
|
|
99
|
+
'Seed DemoBank Next.js SPA fixture',
|
|
100
|
+
],
|
|
101
|
+
{
|
|
102
|
+
GIT_AUTHOR_NAME: AUTHOR_NAME,
|
|
103
|
+
GIT_AUTHOR_EMAIL: AUTHOR_EMAIL,
|
|
104
|
+
GIT_AUTHOR_DATE: COMMIT_DATE,
|
|
105
|
+
GIT_COMMITTER_NAME: AUTHOR_NAME,
|
|
106
|
+
GIT_COMMITTER_EMAIL: AUTHOR_EMAIL,
|
|
107
|
+
GIT_COMMITTER_DATE: COMMIT_DATE,
|
|
108
|
+
},
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
process.stdout.write(`Seeded DemoBank Next.js fixture at ${targetDir}\n`);
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Smoke check for the legacy J2EE fixture seed script. Deterministic and
|
|
3
|
+
// network-free: seeds into a temp directory, asserts the produced git repo
|
|
4
|
+
// contains the expected file set, and cleans up.
|
|
5
|
+
//
|
|
6
|
+
// node kits/j2ee-nextjs/fixtures/demo-bank/smoke-legacy-j2ee.mjs
|
|
7
|
+
|
|
8
|
+
import { execFileSync, spawnSync } from "node:child_process"
|
|
9
|
+
import fs from "node:fs"
|
|
10
|
+
import os from "node:os"
|
|
11
|
+
import path from "node:path"
|
|
12
|
+
import process from "node:process"
|
|
13
|
+
import { fileURLToPath } from "node:url"
|
|
14
|
+
|
|
15
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url))
|
|
16
|
+
const seedScript = path.join(scriptDir, "seed-legacy-j2ee.mjs")
|
|
17
|
+
|
|
18
|
+
const WEBAPP = "src/main/webapp"
|
|
19
|
+
const JAVA = "src/main/java/com/demobank/legacy"
|
|
20
|
+
|
|
21
|
+
// Explicit answer-key file list (relative to the seeded repo root).
|
|
22
|
+
const expectedFiles = [
|
|
23
|
+
"PAGES.md",
|
|
24
|
+
"pom.xml",
|
|
25
|
+
// shared shell
|
|
26
|
+
`${WEBAPP}/WEB-INF/web.xml`,
|
|
27
|
+
`${WEBAPP}/header.jsp`,
|
|
28
|
+
`${WEBAPP}/footer.jsp`,
|
|
29
|
+
`${WEBAPP}/nav.jsp`,
|
|
30
|
+
`${WEBAPP}/js/jquery-1.12.4.min.js`,
|
|
31
|
+
`${WEBAPP}/js/validate.js`,
|
|
32
|
+
`${WEBAPP}/css/bank.css`,
|
|
33
|
+
// hero 1: account overview
|
|
34
|
+
`${WEBAPP}/accountOverview.jsp`,
|
|
35
|
+
`${JAVA}/web/AccountOverviewServlet.java`,
|
|
36
|
+
`${JAVA}/dto/AcctOvwDTO.java`,
|
|
37
|
+
`${JAVA}/esb/EsbAcctListService.java`,
|
|
38
|
+
// hero 2: beneficiary management
|
|
39
|
+
`${WEBAPP}/beneficiaryList.jsp`,
|
|
40
|
+
`${WEBAPP}/beneficiaryEdit.jsp`,
|
|
41
|
+
`${JAVA}/web/BeneficiaryServlet.java`,
|
|
42
|
+
`${JAVA}/dto/BenfDTO.java`,
|
|
43
|
+
`${JAVA}/esb/EsbBenfListService.java`,
|
|
44
|
+
`${JAVA}/esb/EsbBenfMaintService.java`,
|
|
45
|
+
// hero 3: wire transfer
|
|
46
|
+
`${WEBAPP}/transferStep1.jsp`,
|
|
47
|
+
`${WEBAPP}/transferStep2.jsp`,
|
|
48
|
+
`${WEBAPP}/transferConfirm.jsp`,
|
|
49
|
+
`${JAVA}/web/TransferServlet.java`,
|
|
50
|
+
`${JAVA}/web/TransferDraft.java`,
|
|
51
|
+
`${JAVA}/dto/TrfDTO.java`,
|
|
52
|
+
`${JAVA}/esb/EsbTrfValidateService.java`,
|
|
53
|
+
`${JAVA}/esb/EsbTrfExecService.java`,
|
|
54
|
+
// esb plumbing
|
|
55
|
+
`${JAVA}/esb/EsbGateway.java`,
|
|
56
|
+
`${JAVA}/esb/EsbException.java`,
|
|
57
|
+
// filler pages
|
|
58
|
+
`${WEBAPP}/login.jsp`,
|
|
59
|
+
`${WEBAPP}/dashboard.jsp`,
|
|
60
|
+
`${WEBAPP}/settings.jsp`,
|
|
61
|
+
`${WEBAPP}/help.jsp`,
|
|
62
|
+
`${WEBAPP}/messages.jsp`,
|
|
63
|
+
`${WEBAPP}/profile.jsp`,
|
|
64
|
+
// dead pages (unreferenced from nav/web.xml, but must exist)
|
|
65
|
+
`${WEBAPP}/oldTransfer.jsp`,
|
|
66
|
+
`${WEBAPP}/promoQ3.jsp`,
|
|
67
|
+
`${WEBAPP}/testHarness.jsp`
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
let tempRoot
|
|
71
|
+
const failures = []
|
|
72
|
+
try {
|
|
73
|
+
tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), "demo-bank-smoke-"))
|
|
74
|
+
const repoDir = path.join(tempRoot, "legacy-j2ee")
|
|
75
|
+
|
|
76
|
+
const seed = spawnSync(process.execPath, [seedScript, repoDir], {
|
|
77
|
+
encoding: "utf8"
|
|
78
|
+
})
|
|
79
|
+
if (seed.status !== 0) {
|
|
80
|
+
console.error("seed script failed:")
|
|
81
|
+
console.error(seed.stdout)
|
|
82
|
+
console.error(seed.stderr)
|
|
83
|
+
process.exit(1)
|
|
84
|
+
}
|
|
85
|
+
const printed = seed.stdout.trim().split("\n").pop()
|
|
86
|
+
if (printed !== repoDir) {
|
|
87
|
+
failures.push(`seed script printed "${printed}", expected "${repoDir}"`)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (!fs.existsSync(path.join(repoDir, ".git"))) {
|
|
91
|
+
failures.push("seeded target is not a git repository (.git missing)")
|
|
92
|
+
} else {
|
|
93
|
+
const head = execFileSync("git", ["-C", repoDir, "log", "--format=%an <%ae> %aI", "-1"], {
|
|
94
|
+
encoding: "utf8"
|
|
95
|
+
}).trim()
|
|
96
|
+
if (!head.startsWith("Demo Bank <demo@example.invalid> 2020-01-01")) {
|
|
97
|
+
failures.push(`unexpected commit identity/date: ${head}`)
|
|
98
|
+
}
|
|
99
|
+
const dirty = execFileSync("git", ["-C", repoDir, "status", "--porcelain"], {
|
|
100
|
+
encoding: "utf8"
|
|
101
|
+
}).trim()
|
|
102
|
+
if (dirty.length > 0) {
|
|
103
|
+
failures.push(`seeded repo has uncommitted files:\n${dirty}`)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
for (const rel of expectedFiles) {
|
|
108
|
+
const abs = path.join(repoDir, rel)
|
|
109
|
+
if (!fs.existsSync(abs)) {
|
|
110
|
+
failures.push(`missing expected file: ${rel}`)
|
|
111
|
+
} else if (fs.statSync(abs).size === 0) {
|
|
112
|
+
failures.push(`expected file is empty: ${rel}`)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Overwrite guard: re-seeding the same non-empty target must fail...
|
|
117
|
+
const second = spawnSync(process.execPath, [seedScript, repoDir], {
|
|
118
|
+
encoding: "utf8"
|
|
119
|
+
})
|
|
120
|
+
if (second.status === 0) {
|
|
121
|
+
failures.push("seed script overwrote a non-empty target without --force")
|
|
122
|
+
}
|
|
123
|
+
// ...and succeed with --force.
|
|
124
|
+
const forced = spawnSync(process.execPath, [seedScript, repoDir, "--force"], {
|
|
125
|
+
encoding: "utf8"
|
|
126
|
+
})
|
|
127
|
+
if (forced.status !== 0) {
|
|
128
|
+
failures.push(`seed script --force failed: ${forced.stderr}`)
|
|
129
|
+
}
|
|
130
|
+
} finally {
|
|
131
|
+
if (tempRoot) {
|
|
132
|
+
fs.rmSync(tempRoot, { recursive: true, force: true })
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (failures.length > 0) {
|
|
137
|
+
console.error("legacy-j2ee smoke FAILED:")
|
|
138
|
+
for (const f of failures) {
|
|
139
|
+
console.error(` - ${f}`)
|
|
140
|
+
}
|
|
141
|
+
process.exit(1)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
console.log(`legacy-j2ee smoke OK: ${expectedFiles.length} files verified in seeded git repo`)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Smoke check for the DemoBank Next.js SPA fixture: seeds into a temp dir,
|
|
3
|
+
// asserts the expected files exist and the seed commit is deterministic,
|
|
4
|
+
// then cleans up. Network-free; safe for CI.
|
|
5
|
+
//
|
|
6
|
+
// node kits/j2ee-nextjs/fixtures/demo-bank/smoke-nextjs.mjs
|
|
7
|
+
|
|
8
|
+
import { execFileSync } from 'node:child_process';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import os from 'node:os';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
import process from 'node:process';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
|
|
15
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
const SEED_SCRIPT = path.join(HERE, 'seed-nextjs.mjs');
|
|
17
|
+
|
|
18
|
+
const EXPECTED_FILES = [
|
|
19
|
+
// Configs
|
|
20
|
+
'package.json',
|
|
21
|
+
'pnpm-lock.yaml',
|
|
22
|
+
'tsconfig.json',
|
|
23
|
+
'next.config.mjs',
|
|
24
|
+
'next-env.d.ts',
|
|
25
|
+
'eslint.config.mjs',
|
|
26
|
+
'vitest.config.ts',
|
|
27
|
+
'.gitignore',
|
|
28
|
+
// Docs
|
|
29
|
+
'README.md',
|
|
30
|
+
'CONTRIBUTING.md',
|
|
31
|
+
// Theme + design system
|
|
32
|
+
'src/theme/tokens.css',
|
|
33
|
+
'src/theme/components.css',
|
|
34
|
+
'src/components/Button.tsx',
|
|
35
|
+
'src/components/Field.tsx',
|
|
36
|
+
'src/components/Form.tsx',
|
|
37
|
+
'src/components/DataTable.tsx',
|
|
38
|
+
'src/components/Stepper.tsx',
|
|
39
|
+
'src/components/Card.tsx',
|
|
40
|
+
'src/components/PageLayout.tsx',
|
|
41
|
+
'src/components/index.ts',
|
|
42
|
+
// Auth stub + app shell
|
|
43
|
+
'src/auth/AuthProvider.tsx',
|
|
44
|
+
'src/app/layout.tsx',
|
|
45
|
+
'src/app/signed-in-badge.tsx',
|
|
46
|
+
'src/app/page.tsx',
|
|
47
|
+
// Exemplar pages
|
|
48
|
+
'src/app/cards/page.tsx',
|
|
49
|
+
'src/app/profile/page.tsx',
|
|
50
|
+
// Ports, adapters, registry
|
|
51
|
+
'src/services/registry.ts',
|
|
52
|
+
'src/services/cards/port.ts',
|
|
53
|
+
'src/services/cards/mock.ts',
|
|
54
|
+
'src/services/profile/port.ts',
|
|
55
|
+
'src/services/profile/mock.ts',
|
|
56
|
+
// Contracts
|
|
57
|
+
'contracts/cards.openapi.yaml',
|
|
58
|
+
'contracts/profile.openapi.yaml',
|
|
59
|
+
// Tests
|
|
60
|
+
'tests/cards.page.test.tsx',
|
|
61
|
+
'tests/profile.page.test.tsx',
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const EXCLUDED_DIRS = ['node_modules', '.next', 'out'];
|
|
65
|
+
|
|
66
|
+
function fail(message) {
|
|
67
|
+
process.stderr.write(`smoke-nextjs: FAIL: ${message}\n`);
|
|
68
|
+
process.exitCode = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'demo-bank-smoke-'));
|
|
72
|
+
const target = path.join(tempRoot, 'nextjs');
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
execFileSync(process.execPath, [SEED_SCRIPT, target], {
|
|
76
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const missing = EXPECTED_FILES.filter(
|
|
80
|
+
(file) => !fs.existsSync(path.join(target, file)),
|
|
81
|
+
);
|
|
82
|
+
if (missing.length > 0) {
|
|
83
|
+
fail(`seeded repo is missing expected files:\n - ${missing.join('\n - ')}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
for (const dir of EXCLUDED_DIRS) {
|
|
87
|
+
if (fs.existsSync(path.join(target, dir))) {
|
|
88
|
+
fail(`seeded repo must not contain ${dir}/`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const gitLog = execFileSync(
|
|
93
|
+
'git',
|
|
94
|
+
['log', '--format=%an <%ae> %at', 'main'],
|
|
95
|
+
{ cwd: target, encoding: 'utf8' },
|
|
96
|
+
).trim();
|
|
97
|
+
const commits = gitLog.length === 0 ? [] : gitLog.split('\n');
|
|
98
|
+
if (commits.length !== 1) {
|
|
99
|
+
fail(`expected exactly 1 seed commit, found ${commits.length}`);
|
|
100
|
+
}
|
|
101
|
+
// 1577836800 = 2020-01-01T00:00:00Z
|
|
102
|
+
const expectedAuthor = 'Demo Bank <demo@example.invalid> 1577836800';
|
|
103
|
+
if (commits[0] !== expectedAuthor) {
|
|
104
|
+
fail(
|
|
105
|
+
`seed commit is not deterministic:\n expected: ${expectedAuthor}\n actual: ${commits[0]}`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (process.exitCode !== 1) {
|
|
110
|
+
process.stdout.write(
|
|
111
|
+
`smoke-nextjs: OK (${EXPECTED_FILES.length} files verified in seeded repo)\n`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
fail(error instanceof Error ? error.message : String(error));
|
|
116
|
+
} finally {
|
|
117
|
+
fs.rmSync(tempRoot, { recursive: true, force: true });
|
|
118
|
+
}
|
|
@@ -23,13 +23,7 @@ import * as Effect from "effect/Effect";
|
|
|
23
23
|
import { AdoConfig, makeAzureDevOpsTool } from "@llm4ts/flow/AzureDevOpsTool";
|
|
24
24
|
import { BoardItem, composeBoardSync, makeAdoBoardSync, makeLocalBoardSync } from "@llm4ts/flow/BoardSync";
|
|
25
25
|
import { describeFlowError } from "@llm4ts/flow/FlowError";
|
|
26
|
-
import { Info } from "@llm4ts/
|
|
27
|
-
import { stage } from "@llm4ts/flow/PlanExecution";
|
|
28
|
-
import { asReadOnly, coderFromEnv } from "@llm4ts/runner/Connectors";
|
|
29
|
-
import { resolveFlowInput } from "@llm4ts/runner/FlowArgs";
|
|
30
|
-
import { runFlowMain, runNode } from "@llm4ts/runner/FlowRunner";
|
|
31
|
-
import { nodePlainFileStore } from "@llm4ts/runner/NodePlainFileStore";
|
|
32
|
-
import { nodeProcessExecutor } from "@llm4ts/runner/NodeProcessExecutor";
|
|
26
|
+
import { Info, asReadOnly, coderFromEnv, nodePlainFileStore, nodeProcessExecutor, resolveFlowInput, runFlowMain, runNode, stage } from "@llm4ts/runner";
|
|
33
27
|
import { conversionInventory, convertPage, migrationReport, setupConversion } from "./lib/convert.js";
|
|
34
28
|
const program = Effect.gen(function* () {
|
|
35
29
|
const input = yield* resolveFlowInput("Convert the legacy estate into the destination SPA");
|
|
@@ -16,13 +16,9 @@
|
|
|
16
16
|
// branch awaits human review; the conversion report is committed with it.
|
|
17
17
|
// Token/cost figures are ESTIMATES (LLM4TS_ESTIMATE_MODEL,
|
|
18
18
|
// LLM4TS_ESTIMATE_CHARS_PER_TOKEN). Pack: LLM4TS_PACK (default
|
|
19
|
-
//
|
|
19
|
+
// j2ee-nextjs-spa, from the j2ee-nextjs kit).
|
|
20
20
|
import * as Effect from "effect/Effect";
|
|
21
|
-
import { FlowAborted } from "@llm4ts/
|
|
22
|
-
import { Info } from "@llm4ts/flow/FlowEvents";
|
|
23
|
-
import { asReadOnly, coderFromEnv } from "@llm4ts/runner/Connectors";
|
|
24
|
-
import { resolveFlowInput } from "@llm4ts/runner/FlowArgs";
|
|
25
|
-
import { runFlowMain, runNode } from "@llm4ts/runner/FlowRunner";
|
|
21
|
+
import { FlowAborted, Info, asReadOnly, coderFromEnv, resolveFlowInput, runFlowMain, runNode } from "@llm4ts/runner";
|
|
26
22
|
import { convertPage, setupConversion } from "./lib/convert.js";
|
|
27
23
|
const program = Effect.gen(function* () {
|
|
28
24
|
const input = yield* resolveFlowInput("Convert one legacy page into the destination SPA");
|
|
@@ -8,26 +8,16 @@ import * as Effect from "effect/Effect";
|
|
|
8
8
|
import { Dimension } from "@llm4ts/core/eval/Eval";
|
|
9
9
|
import { judge } from "@llm4ts/core/eval/Judge";
|
|
10
10
|
import { TokenUsage } from "@llm4ts/core/Models";
|
|
11
|
-
import { makeChat } from "@llm4ts/
|
|
11
|
+
import { FlowAborted, Info, Plan, implementPlanFlow, lintCommand, loadKitPatternCards, makeChat, makeNodeWorkspace, makePlanStore, mergeReviewResults, minimalReviewers, nodePlainFileStore, nodeProcessExecutor, openPack, reviewFingerprint, stage } from "@llm4ts/runner";
|
|
12
12
|
import { budget, capped } from "@llm4ts/flow/Context";
|
|
13
|
-
import {
|
|
14
|
-
import { FlowAborted } from "@llm4ts/flow/FlowError";
|
|
15
|
-
import { FlowEvents, Info } from "@llm4ts/flow/FlowEvents";
|
|
13
|
+
import { FlowEvents } from "@llm4ts/flow/FlowEvents";
|
|
16
14
|
import { openApiFor, parsePageSpec, renderPageSpec } from "@llm4ts/flow/PageSpec";
|
|
17
15
|
import { loadPatternCards, matchingPatternCards } from "@llm4ts/flow/Patterns";
|
|
18
|
-
import {
|
|
19
|
-
import { Plan, Task } from "@llm4ts/flow/Plan";
|
|
20
|
-
import { stage } from "@llm4ts/flow/PlanExecution";
|
|
16
|
+
import { Task } from "@llm4ts/flow/Plan";
|
|
21
17
|
import { judgeAllPrograms } from "@llm4ts/flow/ProgramJudge";
|
|
22
|
-
import { lintCommand, mergeReviewResults, minimalReviewers } from "@llm4ts/flow/Review";
|
|
23
18
|
import { closureFor, surveyGraph } from "@llm4ts/flow/Survey";
|
|
24
19
|
import { estimatedUsageOptionsFromEnv, makeEstimatedUsageMeter } from "@llm4ts/flow/EstimatedUsage";
|
|
25
20
|
import { legacySourceWorkspaceLimits, workspaceLimitsFromEnv } from "@llm4ts/flow/Workspace";
|
|
26
|
-
import { nodePlainFileStore } from "@llm4ts/runner/NodePlainFileStore";
|
|
27
|
-
import { nodeProcessExecutor } from "@llm4ts/runner/NodeProcessExecutor";
|
|
28
|
-
import { makeNodeWorkspace } from "@llm4ts/runner/NodeWorkspace";
|
|
29
|
-
import { loadUniversalPatternCards, openPack } from "@llm4ts/runner/Packs";
|
|
30
|
-
import { reviewFingerprint } from "@llm4ts/runner/ReviewFingerprint";
|
|
31
21
|
export const positiveEnvInt = (environment, name, fallback) => {
|
|
32
22
|
const raw = Number.parseInt(environment[name] ?? "", 10);
|
|
33
23
|
return Number.isFinite(raw) && raw > 0 ? raw : fallback;
|
|
@@ -339,7 +329,7 @@ export const convertPage = Effect.fn("convert.page")(function* (deps, page) {
|
|
|
339
329
|
/**
|
|
340
330
|
* The common wiring of both conversion flows: metered seats (estimates-only
|
|
341
331
|
* accounting), the two workspaces (legacy read-only limits, target default),
|
|
342
|
-
* the pack (default `
|
|
332
|
+
* the pack (default `j2ee-nextjs-spa`, from the kit), and the pattern-card deck.
|
|
343
333
|
*/
|
|
344
334
|
export const setupConversion = Effect.fn("convert.setup")(function* (context, input, environment, flowDir) {
|
|
345
335
|
const legacyRaw = environment.LLM4TS_LEGACY_REPO;
|
|
@@ -362,14 +352,14 @@ export const setupConversion = Effect.fn("convert.setup")(function* (context, in
|
|
|
362
352
|
const opened = yield* stage(context.events, "pack", openPack({
|
|
363
353
|
environment: {
|
|
364
354
|
...environment,
|
|
365
|
-
LLM4TS_PACK: environment.LLM4TS_PACK ?? "
|
|
355
|
+
LLM4TS_PACK: environment.LLM4TS_PACK ?? "j2ee-nextjs-spa"
|
|
366
356
|
},
|
|
367
357
|
launchDir: input.workspace,
|
|
368
358
|
flowDir
|
|
369
359
|
}));
|
|
370
360
|
const cards = [
|
|
371
361
|
...(yield* loadPatternCards(opened.workspace, `${opened.dir}/patterns`)),
|
|
372
|
-
...(yield*
|
|
362
|
+
...(yield* loadKitPatternCards(opened))
|
|
373
363
|
];
|
|
374
364
|
return {
|
|
375
365
|
context: metered,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Pack: j2ee-nextjs-spa
|
|
2
2
|
|
|
3
3
|
source: jsp
|
|
4
|
-
scaffold: ../../
|
|
4
|
+
scaffold: ../../scaffolds/nextjs-spa
|
|
5
5
|
sources: .*\.(jsp|java|xml)
|
|
6
|
+
spec-schema: pagespec
|
|
6
7
|
programs: .*\.jsp
|
|
7
8
|
specs-dir: docs/modernization/specs
|
|
8
9
|
features-dir: docs/modernization/features
|
|
@@ -23,7 +23,11 @@ The spec markdown for a page has two mandatory parts:
|
|
|
23
23
|
"domainName", "type" }] }],
|
|
24
24
|
"apiCalls": [{ "operation": "<domain verb, e.g. listAccounts>",
|
|
25
25
|
"method", "path", "esbService", "request": [{ "legacyName",
|
|
26
|
-
"domainName", "type" }],
|
|
26
|
+
"domainName", "type" }],
|
|
27
|
+
"response": [{ "legacyName", "domainName", "type" }] // ad-hoc object, OR
|
|
28
|
+
"responseDto": "<domainName of one of the dtos>", // the DTO returned,
|
|
29
|
+
"responseShape": "single" | "list" // a table screen is a list
|
|
30
|
+
}],
|
|
27
31
|
"navigation": { "inbound": [], "outbound": [], "steps": [] },
|
|
28
32
|
"sessionState": ["<what the session carries and why>"],
|
|
29
33
|
"openQuestions": []
|