@openhands/extensions 0.0.1-alpha → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/custom-codereview-guide.md +25 -0
- package/.github/pull_request_template.md +38 -0
- package/.github/release.yml +14 -0
- package/.github/workflows/check-extensions.yml +72 -0
- package/.github/workflows/npm-publish.yml +89 -0
- package/.github/workflows/pr.yml +30 -0
- package/.github/workflows/release.yml +24 -0
- package/.github/workflows/tests.yml +25 -0
- package/.github/workflows/vulnerability-scan.yml +87 -0
- package/.release-please-manifest.json +3 -0
- package/AGENTS.md +132 -0
- package/README.md +10 -0
- package/analysis_results.md +162 -0
- package/marketplaces/large-codebase.json +66 -0
- package/marketplaces/openhands-extensions.json +682 -0
- package/package.json +4 -10
- package/plugins/README.md +30 -0
- package/plugins/city-weather/.plugin/plugin.json +13 -0
- package/plugins/city-weather/README.md +145 -0
- package/plugins/city-weather/commands/now.md +56 -0
- package/plugins/cobol-modernization/.plugin/plugin.json +19 -0
- package/plugins/cobol-modernization/README.md +201 -0
- package/plugins/cobol-modernization/references/troubleshooting.md +18 -0
- package/plugins/cobol-modernization/skills/build-setup/SKILL.md +78 -0
- package/plugins/cobol-modernization/skills/build-setup/scripts/install-gnucobol.sh +32 -0
- package/plugins/cobol-modernization/skills/cobol-modernization-overview/SKILL.md +113 -0
- package/plugins/cobol-modernization/skills/mainfraime-removal/SKILL.md +62 -0
- package/plugins/cobol-modernization/skills/mainfraime-removal/references/cics-transformation-examples.md +45 -0
- package/plugins/cobol-modernization/skills/mainframe-planning/SKILL.md +78 -0
- package/plugins/cobol-modernization/skills/to-java-migration/SKILL.md +59 -0
- package/plugins/cobol-modernization/skills/to-java-migration/references/cobol-to-java-example.md +58 -0
- package/plugins/cobol-modernization/skills/to-java-migration/references/datatype-mappings.md +19 -0
- package/plugins/issue-duplicate-checker/.plugin/plugin.json +13 -0
- package/plugins/issue-duplicate-checker/README.md +51 -0
- package/plugins/issue-duplicate-checker/action.yml +349 -0
- package/plugins/issue-duplicate-checker/scripts/auto_close_duplicate_issues.py +569 -0
- package/plugins/issue-duplicate-checker/scripts/issue_duplicate_check_openhands.py +681 -0
- package/plugins/issue-duplicate-checker/scripts/post_duplicate_notice.js +220 -0
- package/plugins/issue-duplicate-checker/scripts/remove_duplicate_candidate_label.js +27 -0
- package/plugins/magic-test/.plugin/plugin.json +13 -0
- package/plugins/magic-test/skills/magic-word/SKILL.md +33 -0
- package/plugins/migration-scoring/.plugin/plugin.json +19 -0
- package/plugins/migration-scoring/README.md +244 -0
- package/plugins/migration-scoring/skills/migration-mapping/SKILL.md +72 -0
- package/plugins/migration-scoring/skills/migration-report/SKILL.md +118 -0
- package/plugins/migration-scoring/skills/migration-scoring-overview/SKILL.md +126 -0
- package/plugins/migration-scoring/skills/score-quality/SKILL.md +54 -0
- package/plugins/migration-scoring/skills/score-quality/references/scoring-criteria.md +30 -0
- package/plugins/migration-scoring/skills/score-style/SKILL.md +106 -0
- package/plugins/onboarding/.plugin/plugin.json +20 -0
- package/plugins/onboarding/README.md +30 -0
- package/plugins/onboarding/references/criteria.md +144 -0
- package/plugins/onboarding/skills/agent-readiness-report/README.md +23 -0
- package/plugins/onboarding/skills/agent-readiness-report/SKILL.md +122 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_agent_instructions.sh +88 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_build_env.sh +114 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_feedback_loops.sh +133 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_policy.sh +113 -0
- package/plugins/onboarding/skills/agent-readiness-report/scripts/scan_workflows.sh +127 -0
- package/plugins/onboarding/skills/improve-agent-readiness/README.md +19 -0
- package/plugins/onboarding/skills/improve-agent-readiness/SKILL.md +167 -0
- package/plugins/onboarding/skills/setup-agents-md/README.md +15 -0
- package/plugins/onboarding/skills/setup-agents-md/SKILL.md +150 -0
- package/plugins/onboarding/skills/setup-openhands/README.md +20 -0
- package/plugins/onboarding/skills/setup-openhands/SKILL.md +56 -0
- package/plugins/onboarding/skills/setup-pr-review/README.md +23 -0
- package/plugins/onboarding/skills/setup-pr-review/SKILL.md +72 -0
- package/plugins/openhands/.plugin/plugin.json +13 -0
- package/plugins/openhands/README.md +52 -0
- package/plugins/openhands/SKILL.md +61 -0
- package/plugins/openhands/commands/create.md +55 -0
- package/plugins/openhands/commands/openhands-cloud.md +8 -0
- package/plugins/openhands/scripts/run.sh +69 -0
- package/plugins/pr-review/.plugin/plugin.json +13 -0
- package/plugins/pr-review/README.md +393 -0
- package/plugins/pr-review/action.yml +298 -0
- package/plugins/pr-review/scripts/agent_script.py +1282 -0
- package/plugins/pr-review/scripts/evaluate_review.py +655 -0
- package/plugins/pr-review/scripts/prompt.py +260 -0
- package/plugins/pr-review/workflows/pr-review-by-openhands.yml +51 -0
- package/plugins/pr-review/workflows/pr-review-evaluation.yml +85 -0
- package/plugins/qa-changes/.plugin/plugin.json +11 -0
- package/plugins/qa-changes/README.md +185 -0
- package/plugins/qa-changes/action.yml +181 -0
- package/plugins/qa-changes/scripts/agent_script.py +406 -0
- package/plugins/qa-changes/scripts/evaluate_qa_changes.py +385 -0
- package/plugins/qa-changes/scripts/prompt.py +174 -0
- package/plugins/qa-changes/workflows/qa-changes-by-openhands.yml +50 -0
- package/plugins/qa-changes/workflows/qa-changes-evaluation.yml +85 -0
- package/plugins/release-notes/.plugin/plugin.json +19 -0
- package/plugins/release-notes/README.md +283 -0
- package/plugins/release-notes/SKILL.md +83 -0
- package/plugins/release-notes/action.yml +117 -0
- package/plugins/release-notes/commands/release-notes.md +8 -0
- package/plugins/release-notes/scripts/agent_script.py +292 -0
- package/plugins/release-notes/scripts/generate_release_notes.py +733 -0
- package/plugins/release-notes/scripts/prompt.py +90 -0
- package/plugins/release-notes/scripts/validate_release_notes.py +328 -0
- package/plugins/release-notes/workflows/release-notes.yml +76 -0
- package/plugins/vulnerability-remediation/.plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/README.md +217 -0
- package/plugins/vulnerability-remediation/action.yml +187 -0
- package/plugins/vulnerability-remediation/scripts/scan_and_remediate.py +561 -0
- package/plugins/vulnerability-remediation/workflows/vulnerability-scan.yml +87 -0
- package/pyproject.toml +12 -0
- package/release-please-config.json +16 -0
- package/scripts/sync_extensions.py +494 -0
- package/scripts/sync_openhands_sdk_skill.py +264 -0
- package/skills/README.md +159 -0
- package/skills/add-javadoc/.plugin/plugin.json +18 -0
- package/skills/add-javadoc/README.md +40 -0
- package/skills/add-javadoc/SKILL.md +35 -0
- package/skills/add-javadoc/references/example.md +32 -0
- package/skills/add-skill/.plugin/plugin.json +18 -0
- package/skills/add-skill/README.md +67 -0
- package/skills/add-skill/SKILL.md +47 -0
- package/skills/add-skill/scripts/fetch_skill.py +259 -0
- package/skills/agent-creator/.plugin/plugin.json +20 -0
- package/skills/agent-creator/README.md +104 -0
- package/skills/agent-creator/SKILL.md +190 -0
- package/skills/agent-creator/commands/agent-creator.md +8 -0
- package/skills/agent-creator/references/fallback.md +117 -0
- package/skills/agent-memory/.plugin/plugin.json +18 -0
- package/skills/agent-memory/README.md +35 -0
- package/skills/agent-memory/SKILL.md +30 -0
- package/skills/agent-memory/commands/remember.md +8 -0
- package/skills/agent-sdk-builder/.plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/README.md +40 -0
- package/skills/agent-sdk-builder/SKILL.md +37 -0
- package/skills/agent-sdk-builder/commands/agent-builder.md +8 -0
- package/skills/azure-devops/.plugin/plugin.json +18 -0
- package/skills/azure-devops/README.md +55 -0
- package/skills/azure-devops/SKILL.md +50 -0
- package/skills/bitbucket/.plugin/plugin.json +17 -0
- package/skills/bitbucket/README.md +50 -0
- package/skills/bitbucket/SKILL.md +45 -0
- package/skills/code-review/.plugin/plugin.json +19 -0
- package/skills/code-review/README.md +18 -0
- package/skills/code-review/SKILL.md +208 -0
- package/skills/code-review/commands/codereview-roasted.md +8 -0
- package/skills/code-review/commands/codereview.md +8 -0
- package/skills/code-review/references/risk-evaluation.md +41 -0
- package/skills/code-review/references/supply-chain-security.md +31 -0
- package/skills/code-simplifier/.plugin/plugin.json +21 -0
- package/skills/code-simplifier/README.md +30 -0
- package/skills/code-simplifier/SKILL.md +91 -0
- package/skills/code-simplifier/commands/simplify.md +8 -0
- package/skills/code-simplifier/references/code-quality-review.md +86 -0
- package/skills/code-simplifier/references/code-reuse-review.md +63 -0
- package/skills/code-simplifier/references/efficiency-review.md +81 -0
- package/skills/datadog/.plugin/plugin.json +19 -0
- package/skills/datadog/README.md +100 -0
- package/skills/datadog/SKILL.md +95 -0
- package/skills/deno/.plugin/plugin.json +18 -0
- package/skills/deno/README.md +5 -0
- package/skills/deno/SKILL.md +99 -0
- package/skills/deno/references/README.md +6 -0
- package/skills/discord/.plugin/plugin.json +18 -0
- package/skills/discord/README.md +31 -0
- package/skills/discord/SKILL.md +109 -0
- package/skills/discord/__init__.py +0 -0
- package/skills/discord/references/REFERENCE.md +78 -0
- package/skills/discord/scripts/__init__.py +0 -0
- package/skills/discord/scripts/_http.py +127 -0
- package/skills/discord/scripts/post_webhook.py +106 -0
- package/skills/discord/scripts/send_message.py +102 -0
- package/skills/docker/.plugin/plugin.json +17 -0
- package/skills/docker/README.md +34 -0
- package/skills/docker/SKILL.md +29 -0
- package/skills/evidence-based-citations/.plugin/plugin.json +20 -0
- package/skills/evidence-based-citations/README.md +31 -0
- package/skills/evidence-based-citations/SKILL.md +59 -0
- package/skills/flarglebargle/.plugin/plugin.json +16 -0
- package/skills/flarglebargle/README.md +14 -0
- package/skills/flarglebargle/SKILL.md +9 -0
- package/skills/frontend-design/.plugin/plugin.json +21 -0
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/README.md +42 -0
- package/skills/frontend-design/SKILL.md +42 -0
- package/skills/github/.plugin/plugin.json +19 -0
- package/skills/github/README.md +42 -0
- package/skills/github/SKILL.md +106 -0
- package/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/skills/github-pr-review/README.md +145 -0
- package/skills/github-pr-review/SKILL.md +148 -0
- package/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/skills/github-pr-reviewer/.plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/README.md +34 -0
- package/skills/github-pr-reviewer/SKILL.md +89 -0
- package/skills/github-pr-reviewer/commands/pr-reviewer:setup.md +8 -0
- package/skills/github-repo-monitor/.plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/README.md +70 -0
- package/skills/github-repo-monitor/SKILL.md +316 -0
- package/skills/github-repo-monitor/commands/github-monitor:poll.md +8 -0
- package/skills/github-repo-monitor/references/github-api.md +241 -0
- package/skills/github-repo-monitor/references/state-schema.md +160 -0
- package/skills/github-repo-monitor/scripts/main.py +915 -0
- package/skills/github-repo-monitor/tests/test_main.py +400 -0
- package/skills/gitlab/.plugin/plugin.json +17 -0
- package/skills/gitlab/README.md +37 -0
- package/skills/gitlab/SKILL.md +32 -0
- package/skills/incident-retrospective/.plugin/plugin.json +21 -0
- package/skills/incident-retrospective/README.md +34 -0
- package/skills/incident-retrospective/SKILL.md +98 -0
- package/skills/incident-retrospective/commands/incident-retro:setup.md +8 -0
- package/skills/iterate/.plugin/plugin.json +13 -0
- package/skills/iterate/README.md +25 -0
- package/skills/iterate/SKILL.md +399 -0
- package/skills/iterate/commands/babysit.md +8 -0
- package/skills/iterate/commands/iterate.md +8 -0
- package/skills/iterate/commands/verify.md +8 -0
- package/skills/iterate/references/heuristics.md +58 -0
- package/skills/iterate/references/verification.md +96 -0
- package/skills/jupyter/.plugin/plugin.json +18 -0
- package/skills/jupyter/README.md +55 -0
- package/skills/jupyter/SKILL.md +50 -0
- package/skills/kubernetes/.plugin/plugin.json +18 -0
- package/skills/kubernetes/README.md +53 -0
- package/skills/kubernetes/SKILL.md +48 -0
- package/skills/learn-from-code-review/.plugin/plugin.json +19 -0
- package/skills/learn-from-code-review/README.md +64 -0
- package/skills/learn-from-code-review/SKILL.md +186 -0
- package/skills/learn-from-code-review/commands/learn-from-reviews.md +8 -0
- package/skills/linear/.plugin/plugin.json +19 -0
- package/skills/linear/README.md +58 -0
- package/skills/linear/SKILL.md +213 -0
- package/skills/linear-triage/.plugin/plugin.json +21 -0
- package/skills/linear-triage/README.md +34 -0
- package/skills/linear-triage/SKILL.md +91 -0
- package/skills/linear-triage/commands/linear-triage:setup.md +8 -0
- package/skills/notion/.plugin/plugin.json +17 -0
- package/skills/notion/README.md +114 -0
- package/skills/notion/SKILL.md +109 -0
- package/skills/npm/.plugin/plugin.json +17 -0
- package/skills/npm/README.md +14 -0
- package/skills/npm/SKILL.md +9 -0
- package/skills/openhands-api/.plugin/plugin.json +22 -0
- package/skills/openhands-api/README.md +48 -0
- package/skills/openhands-api/SKILL.md +399 -0
- package/skills/openhands-api/references/README.md +33 -0
- package/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
- package/skills/openhands-api/references/example_prompt.md +12 -0
- package/skills/openhands-api/scripts/openhands_api.py +606 -0
- package/skills/openhands-api/scripts/openhands_api.ts +252 -0
- package/skills/openhands-automation/.plugin/plugin.json +19 -0
- package/skills/openhands-automation/README.md +89 -0
- package/skills/openhands-automation/SKILL.md +875 -0
- package/skills/openhands-automation/commands/automation:create.md +8 -0
- package/skills/openhands-automation/references/ab-testing.md +185 -0
- package/skills/openhands-automation/references/custom-automation.md +644 -0
- package/skills/openhands-sdk/.plugin/plugin.json +20 -0
- package/skills/openhands-sdk/README.md +22 -0
- package/skills/openhands-sdk/SKILL.md +229 -0
- package/skills/openhands-sdk/commands/sdk.md +8 -0
- package/skills/pdflatex/.plugin/plugin.json +18 -0
- package/skills/pdflatex/README.md +39 -0
- package/skills/pdflatex/SKILL.md +34 -0
- package/skills/prd/.plugin/plugin.json +19 -0
- package/skills/prd/README.md +28 -0
- package/skills/prd/SKILL.md +237 -0
- package/skills/prd/commands/prd.md +8 -0
- package/skills/qa-changes/README.md +18 -0
- package/skills/qa-changes/SKILL.md +229 -0
- package/skills/qa-changes/commands/qa-changes.md +8 -0
- package/skills/release-notes/README.md +24 -0
- package/skills/release-notes/SKILL.md +19 -0
- package/skills/release-notes/commands/release-notes.md +8 -0
- package/skills/research-brief/.plugin/plugin.json +20 -0
- package/skills/research-brief/README.md +34 -0
- package/skills/research-brief/SKILL.md +99 -0
- package/skills/research-brief/commands/research-brief:setup.md +8 -0
- package/skills/security/.plugin/plugin.json +18 -0
- package/skills/security/README.md +38 -0
- package/skills/security/SKILL.md +33 -0
- package/skills/skill-creator/.plugin/plugin.json +17 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/README.md +182 -0
- package/skills/skill-creator/SKILL.md +545 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/slack-channel-monitor/.plugin/plugin.json +21 -0
- package/skills/slack-channel-monitor/README.md +91 -0
- package/skills/slack-channel-monitor/SKILL.md +276 -0
- package/skills/slack-channel-monitor/commands/slack-monitor:poll.md +8 -0
- package/skills/slack-channel-monitor/references/slack-api.md +207 -0
- package/skills/slack-channel-monitor/references/state-schema.md +180 -0
- package/skills/slack-channel-monitor/scripts/main.py +962 -0
- package/skills/slack-standup-digest/.plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/README.md +34 -0
- package/skills/slack-standup-digest/SKILL.md +92 -0
- package/skills/slack-standup-digest/commands/standup-digest:setup.md +8 -0
- package/skills/spark-version-upgrade/.plugin/plugin.json +20 -0
- package/skills/spark-version-upgrade/README.md +54 -0
- package/skills/spark-version-upgrade/SKILL.md +233 -0
- package/skills/ssh/.plugin/plugin.json +18 -0
- package/skills/ssh/README.md +140 -0
- package/skills/ssh/SKILL.md +135 -0
- package/skills/swift-linux/.plugin/plugin.json +17 -0
- package/skills/swift-linux/README.md +86 -0
- package/skills/swift-linux/SKILL.md +81 -0
- package/skills/theme-factory/.plugin/plugin.json +19 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/README.md +58 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/uv/.plugin/plugin.json +18 -0
- package/skills/uv/README.md +5 -0
- package/skills/uv/SKILL.md +95 -0
- package/skills/uv/references/README.md +5 -0
- package/skills/vercel/.plugin/plugin.json +18 -0
- package/skills/vercel/README.md +108 -0
- package/skills/vercel/SKILL.md +103 -0
- package/tests/test_add_skill_installs_to_agents_dir.py +42 -0
- package/tests/test_catalogs.py +109 -0
- package/tests/test_code_review_risk_evaluation.py +94 -0
- package/tests/test_issue_duplicate_checker.py +240 -0
- package/tests/test_openhands_api_python.py +152 -0
- package/tests/test_plugin_manifest.py +83 -0
- package/tests/test_pr_review_diff_payload.py +202 -0
- package/tests/test_pr_review_feedback.py +263 -0
- package/tests/test_pr_review_prompt.py +152 -0
- package/tests/test_pr_review_review_context.py +253 -0
- package/tests/test_qa_changes.py +232 -0
- package/tests/test_qa_changes_evaluation.py +259 -0
- package/tests/test_release_notes_generator.py +990 -0
- package/tests/test_sdk_loading.py +150 -0
- package/tests/test_skill_plugin_loading.py +149 -0
- package/tests/test_skills_have_readme.py +66 -0
- package/tests/test_sync_extensions.py +292 -0
- package/tests/test_workflow_sync.py +46 -0
- package/utils/analysis/README.md +7 -0
- package/utils/analysis/laminar_signals/README.md +211 -0
- package/utils/analysis/laminar_signals/analyze.py +780 -0
- package/utils/analysis/laminar_signals/templates/default.j2 +49 -0
- package/utils/analysis/laminar_signals/templates/pr_review.j2 +61 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openhands/extensions",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Public OpenHands extension catalogs for skills, plugins, integrations, and automation templates.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,15 +19,6 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
-
"files": [
|
|
23
|
-
"index.js",
|
|
24
|
-
"index.d.ts",
|
|
25
|
-
"automations",
|
|
26
|
-
"integrations",
|
|
27
|
-
"LICENSE",
|
|
28
|
-
"MIGRATION.md",
|
|
29
|
-
"README.md"
|
|
30
|
-
],
|
|
31
22
|
"exports": {
|
|
32
23
|
".": {
|
|
33
24
|
"types": "./index.d.ts",
|
|
@@ -51,6 +42,9 @@
|
|
|
51
42
|
"default": "./integrations/logos.js"
|
|
52
43
|
},
|
|
53
44
|
"./integrations/catalog/*.json": "./integrations/catalog/*.json",
|
|
45
|
+
"./skills/*": "./skills/*",
|
|
46
|
+
"./plugins/*": "./plugins/*",
|
|
47
|
+
"./marketplaces/*.json": "./marketplaces/*.json",
|
|
54
48
|
"./package.json": "./package.json"
|
|
55
49
|
}
|
|
56
50
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Plugins Directory
|
|
2
|
+
|
|
3
|
+
This directory contains OpenHands plugins - extensions with executable code components such as hooks and advanced scripts.
|
|
4
|
+
|
|
5
|
+
## What are Plugins?
|
|
6
|
+
|
|
7
|
+
Plugins differ from skills in that they include executable code that can hook into OpenHands workflows:
|
|
8
|
+
|
|
9
|
+
- **hooks/**: Scripts that run at specific points in the agent lifecycle
|
|
10
|
+
- **scripts/**: Executable utilities that extend agent capabilities
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
Each plugin follows the same structure as a skill but with additional executable components:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
plugins/
|
|
18
|
+
└── my-plugin/
|
|
19
|
+
├── SKILL.md # Plugin definition and documentation
|
|
20
|
+
├── hooks/ # Lifecycle hooks (optional)
|
|
21
|
+
│ ├── pre-task.sh
|
|
22
|
+
│ └── post-task.sh
|
|
23
|
+
└── scripts/ # Utility scripts (optional)
|
|
24
|
+
└── helper.py
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Contributing
|
|
28
|
+
|
|
29
|
+
See the main [README](../README.md) for contribution guidelines.
|
|
30
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "city-weather",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Get current weather, time, and precipitation forecast for any city",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "JP Shackelford",
|
|
7
|
+
"email": "jpshackelford@users.noreply.github.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/jpshackelford/openhands-sample-plugins",
|
|
10
|
+
"repository": "https://github.com/jpshackelford/openhands-sample-plugins",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["weather", "time", "forecast", "temperature", "precipitation"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# City Weather Plugin
|
|
2
|
+
|
|
3
|
+
Get current weather, time, and precipitation forecast for any city worldwide using the free [Open-Meteo API](https://open-meteo.com/).
|
|
4
|
+
|
|
5
|
+
This plugin is also useful for **testing plugin loading** in OpenHands Cloud and the Software Agent SDK.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Slash command**: `/city-weather:now <city>`
|
|
10
|
+
- **Temperature** in both Fahrenheit and Celsius
|
|
11
|
+
- **Current time** in the city's local timezone
|
|
12
|
+
- **Precipitation forecast** for the next 4 hours
|
|
13
|
+
- **No API key required** — uses the free Open-Meteo API
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/city-weather:now New York
|
|
19
|
+
/city-weather:now Tokyo
|
|
20
|
+
/city-weather:now London
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Example Output
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
City Weather Report for Tokyo, Japan
|
|
27
|
+
|
|
28
|
+
- Current Time: 2025-02-19 14:30 JST
|
|
29
|
+
- Temperature: 52°F / 11°C
|
|
30
|
+
- Current Precipitation: 0.0 mm
|
|
31
|
+
|
|
32
|
+
Precipitation Forecast (Next 4 Hours):
|
|
33
|
+
| Time | Probability |
|
|
34
|
+
|-------|-------------|
|
|
35
|
+
| 15:00 | 10% |
|
|
36
|
+
| 16:00 | 15% |
|
|
37
|
+
| 17:00 | 20% |
|
|
38
|
+
| 18:00 | 25% |
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Testing Plugin Loading
|
|
44
|
+
|
|
45
|
+
This plugin can be used to verify that plugin loading works correctly across different OpenHands platforms.
|
|
46
|
+
|
|
47
|
+
### OpenHands Cloud (app.all-hands.dev)
|
|
48
|
+
|
|
49
|
+
Test the plugin loading endpoint at [app.all-hands.dev](https://app.all-hands.dev):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
curl -X POST "https://app.all-hands.dev/api/v1/app-conversations" \
|
|
53
|
+
-H "Authorization: Bearer ${API_KEY}" \
|
|
54
|
+
-H "Content-Type: application/json" \
|
|
55
|
+
-d '{
|
|
56
|
+
"initial_message": {
|
|
57
|
+
"content": [{"type": "text", "text": "/city-weather:now Tokyo"}]
|
|
58
|
+
},
|
|
59
|
+
"plugins": [{
|
|
60
|
+
"source": "github:OpenHands/extensions",
|
|
61
|
+
"ref": "main",
|
|
62
|
+
"repo_path": "plugins/city-weather"
|
|
63
|
+
}]
|
|
64
|
+
}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The response includes a conversation ID. Poll `/api/v1/app-conversations/search` until `sandbox_status` is `"RUNNING"`, then view at:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
https://app.all-hands.dev/conversations/{conversation_id}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> **Note:** Sandbox startup typically takes 30-90 seconds.
|
|
74
|
+
|
|
75
|
+
### Software Agent SDK (1.10.0+)
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from openhands.sdk import Agent, Conversation, LLM
|
|
79
|
+
from openhands.sdk.plugin import PluginSource
|
|
80
|
+
from openhands.sdk.tool import Tool
|
|
81
|
+
from openhands.tools.terminal import TerminalTool
|
|
82
|
+
|
|
83
|
+
llm = LLM(model="anthropic/claude-sonnet-4-20250514", api_key=SecretStr("..."))
|
|
84
|
+
agent = Agent(llm=llm, tools=[Tool(name=TerminalTool.name)])
|
|
85
|
+
|
|
86
|
+
conversation = Conversation(
|
|
87
|
+
agent=agent,
|
|
88
|
+
plugins=[
|
|
89
|
+
PluginSource(
|
|
90
|
+
source="github:OpenHands/extensions",
|
|
91
|
+
ref="main",
|
|
92
|
+
repo_path="plugins/city-weather"
|
|
93
|
+
)
|
|
94
|
+
]
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
conversation.send_message("/city-weather:now Tokyo")
|
|
98
|
+
conversation.run()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Plugin Structure
|
|
104
|
+
|
|
105
|
+
This plugin follows the [Claude Code plugin marketplace format](https://code.claude.com/docs/en/plugin-marketplaces):
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
city-weather/
|
|
109
|
+
├── .claude-plugin/
|
|
110
|
+
│ └── plugin.json # Plugin manifest
|
|
111
|
+
├── commands/
|
|
112
|
+
│ └── now.md # Slash command definition
|
|
113
|
+
└── README.md
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### How It Works
|
|
117
|
+
|
|
118
|
+
1. The `/city-weather:now` slash command is converted to a `KeywordTrigger` skill
|
|
119
|
+
2. When triggered, the agent receives instructions to:
|
|
120
|
+
- Call the Open-Meteo Geocoding API to find city coordinates
|
|
121
|
+
- Call the Open-Meteo Weather API to fetch current conditions and forecast
|
|
122
|
+
- Format and present the results
|
|
123
|
+
|
|
124
|
+
The `$ARGUMENTS` placeholder in the command captures user input (e.g., "Tokyo").
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## API Reference
|
|
129
|
+
|
|
130
|
+
This plugin uses two Open-Meteo endpoints:
|
|
131
|
+
|
|
132
|
+
| Endpoint | Purpose |
|
|
133
|
+
|----------|---------|
|
|
134
|
+
| `geocoding-api.open-meteo.com/v1/search` | Convert city name to coordinates |
|
|
135
|
+
| `api.open-meteo.com/v1/forecast` | Fetch weather data |
|
|
136
|
+
|
|
137
|
+
Both APIs are free and require no authentication.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Related Resources
|
|
142
|
+
|
|
143
|
+
- [OpenHands SDK Plugin Documentation](https://docs.openhands.dev/sdk/guides/plugins)
|
|
144
|
+
- [OpenHands Cloud](https://app.all-hands.dev)
|
|
145
|
+
- [Open-Meteo API Documentation](https://open-meteo.com/en/docs)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash(curl:*)
|
|
3
|
+
argument-hint: <city>
|
|
4
|
+
description: Get current weather, time, and precipitation forecast for a city
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# City Weather Report
|
|
8
|
+
|
|
9
|
+
Get the current time, temperature (in both Fahrenheit and Celsius), and precipitation forecast for the next 4 hours for the specified city.
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
1. Parse the city name from the arguments: **$ARGUMENTS**
|
|
14
|
+
|
|
15
|
+
2. Use the Open-Meteo Geocoding API to find the city coordinates:
|
|
16
|
+
```bash
|
|
17
|
+
curl -s "https://geocoding-api.open-meteo.com/v1/search?name=CITY_NAME&count=1&language=en&format=json"
|
|
18
|
+
```
|
|
19
|
+
Replace `CITY_NAME` with the URL-encoded city name.
|
|
20
|
+
|
|
21
|
+
3. Extract the latitude, longitude, and timezone from the response.
|
|
22
|
+
|
|
23
|
+
4. Use the Open-Meteo Weather API to fetch current weather and hourly forecast:
|
|
24
|
+
```bash
|
|
25
|
+
curl -s "https://api.open-meteo.com/v1/forecast?latitude=LAT&longitude=LON¤t=temperature_2m,precipitation&hourly=temperature_2m,precipitation_probability&timezone=TIMEZONE&forecast_hours=4"
|
|
26
|
+
```
|
|
27
|
+
Replace `LAT`, `LON`, and `TIMEZONE` with the values from step 3.
|
|
28
|
+
|
|
29
|
+
5. Format and present the results in a clear report:
|
|
30
|
+
|
|
31
|
+
**City Weather Report for [City Name]**
|
|
32
|
+
|
|
33
|
+
- **Current Time:** [formatted local time in the city's timezone]
|
|
34
|
+
- **Temperature:** [X]°F / [Y]°C
|
|
35
|
+
- **Current Precipitation:** [amount] mm
|
|
36
|
+
|
|
37
|
+
**Precipitation Forecast (Next 4 Hours):**
|
|
38
|
+
| Time | Probability |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| [hour 1] | [X]% |
|
|
41
|
+
| [hour 2] | [Y]% |
|
|
42
|
+
| [hour 3] | [Z]% |
|
|
43
|
+
| [hour 4] | [W]% |
|
|
44
|
+
|
|
45
|
+
## Example Usage
|
|
46
|
+
|
|
47
|
+
`/city-weather:now New York`
|
|
48
|
+
`/city-weather:now Tokyo`
|
|
49
|
+
`/city-weather:now London`
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- Uses the free Open-Meteo API (no API key required)
|
|
54
|
+
- Temperature is provided in both Fahrenheit and Celsius
|
|
55
|
+
- Precipitation probability is shown for the next 4 hours
|
|
56
|
+
- Times are displayed in the city's local timezone
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cobol-modernization",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "End-to-end COBOL to Java migration workflow. Handles build setup, mainframe dependency removal, and code migration with test validation.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "OpenHands",
|
|
7
|
+
"email": "contact@all-hands.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/OpenHands/extensions",
|
|
10
|
+
"repository": "https://github.com/OpenHands/extensions",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"cobol",
|
|
14
|
+
"java",
|
|
15
|
+
"migration",
|
|
16
|
+
"mainframe",
|
|
17
|
+
"modernization"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# COBOL Modernization Plugin
|
|
2
|
+
|
|
3
|
+
End-to-end COBOL to Java migration workflow using OpenHands agents. This plugin orchestrates the complete modernization process from legacy COBOL codebases to modern Java applications, handling build setup, mainframe dependency removal, and code migration with test validation.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
export LLM_API_KEY="your-api-key"
|
|
9
|
+
export LLM_MODEL="anthropic/claude-3-5-sonnet-20241022"
|
|
10
|
+
|
|
11
|
+
uv run python -m lc_sdk_examples.cobol_modernization --src-path /path/to/cobol/project
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **Multi-Phase Migration** — Structured workflow from COBOL to Java in four phases
|
|
17
|
+
- **Build Environment Setup** — Configures both GnuCOBOL and Java compilation
|
|
18
|
+
- **Mainframe Independence** — Removes CICS/VSAM dependencies before migration
|
|
19
|
+
- **Test-Driven Migration** — Creates test fixtures from COBOL execution for Java validation
|
|
20
|
+
- **Idiomatic Java Output** — Produces proper Java conventions, not literal translations
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- GnuCOBOL compiler (`cobc`)
|
|
25
|
+
- Java 11+ with Maven or Gradle
|
|
26
|
+
- Python 3.13 with `uv`
|
|
27
|
+
- LLM API key
|
|
28
|
+
|
|
29
|
+
## Plugin Contents
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
plugins/cobol-modernization/
|
|
33
|
+
├── README.md # This file
|
|
34
|
+
├── references/ # Reference documentation
|
|
35
|
+
│ └── troubleshooting.md # Common issues and solutions
|
|
36
|
+
└── skills/ # Workflow phase skills
|
|
37
|
+
├── build-setup/ # Phase 1: Build environment
|
|
38
|
+
│ └── SKILL.md
|
|
39
|
+
├── cobol-modernization-overview/ # Plugin overview
|
|
40
|
+
│ └── SKILL.md
|
|
41
|
+
├── mainframe-planning/ # Phase 2: Transformation planning
|
|
42
|
+
│ └── SKILL.md
|
|
43
|
+
├── mainfraime-removal/ # Phase 3: Mainframe dependency removal
|
|
44
|
+
│ ├── SKILL.md
|
|
45
|
+
│ └── references/
|
|
46
|
+
│ └── cics-transformation-examples.md
|
|
47
|
+
└── to-java-migration/ # Phase 4: Java migration
|
|
48
|
+
├── SKILL.md
|
|
49
|
+
└── references/
|
|
50
|
+
├── cobol-to-java-example.md
|
|
51
|
+
└── datatype-mappings.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Workflow Phases
|
|
55
|
+
|
|
56
|
+
### Phase 1: Build Setup
|
|
57
|
+
|
|
58
|
+
Creates the foundation for the migration:
|
|
59
|
+
|
|
60
|
+
- COBOL compilation environment using GnuCOBOL
|
|
61
|
+
- Java project structure with Maven/Gradle and JUnit 5
|
|
62
|
+
- Test fixtures with golden outputs from COBOL execution
|
|
63
|
+
|
|
64
|
+
**Outputs:**
|
|
65
|
+
- `build_notes.md` — Build instructions
|
|
66
|
+
- `test-fixtures/` — Input/output test data
|
|
67
|
+
- `test_manifest.json` — Test case mapping
|
|
68
|
+
|
|
69
|
+
### Phase 2: Mainframe Planning
|
|
70
|
+
|
|
71
|
+
Creates a transformation guide without modifying code:
|
|
72
|
+
|
|
73
|
+
- Maps CICS/VSAM constructs to standard COBOL equivalents
|
|
74
|
+
- Documents error handling replacements
|
|
75
|
+
- Identifies UI operations to stub
|
|
76
|
+
|
|
77
|
+
**Output:** `mainframe_dependency_removal_plan.md`
|
|
78
|
+
|
|
79
|
+
### Phase 3: Mainframe Removal
|
|
80
|
+
|
|
81
|
+
Applies the transformation guide:
|
|
82
|
+
|
|
83
|
+
- Replaces `EXEC CICS` commands with file I/O
|
|
84
|
+
- Adds `FILE STATUS` checking
|
|
85
|
+
- Stubs BMS/screen operations
|
|
86
|
+
|
|
87
|
+
**Verification:**
|
|
88
|
+
- Code compiles with GnuCOBOL
|
|
89
|
+
- Runs with test fixtures
|
|
90
|
+
|
|
91
|
+
### Phase 4: Java Migration
|
|
92
|
+
|
|
93
|
+
Translates to idiomatic Java:
|
|
94
|
+
|
|
95
|
+
- Proper Java conventions (not literal translations)
|
|
96
|
+
- JUnit tests using golden outputs
|
|
97
|
+
- COBOL references in comments
|
|
98
|
+
|
|
99
|
+
**Done when:**
|
|
100
|
+
- All code compiles
|
|
101
|
+
- All JUnit tests pass
|
|
102
|
+
- No TODOs or stubs remain
|
|
103
|
+
|
|
104
|
+
## Output Structure
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
your-project/
|
|
108
|
+
├── .lc-sdk/
|
|
109
|
+
│ ├── initial_batch_graph.json
|
|
110
|
+
│ ├── fixed_batch_graph.json
|
|
111
|
+
│ └── mainframe_dependency_removal_plan.md
|
|
112
|
+
├── test-fixtures/
|
|
113
|
+
│ ├── inputs/
|
|
114
|
+
│ └── expected_outputs/
|
|
115
|
+
├── test_manifest.json
|
|
116
|
+
├── src/main/java/
|
|
117
|
+
└── src/test/java/
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Usage
|
|
121
|
+
|
|
122
|
+
### Running the Migration
|
|
123
|
+
|
|
124
|
+
1. **Prepare your COBOL project**: Ensure all source files are accessible
|
|
125
|
+
2. **Set environment variables**:
|
|
126
|
+
```bash
|
|
127
|
+
export LLM_API_KEY="your-api-key"
|
|
128
|
+
export LLM_MODEL="anthropic/claude-3-5-sonnet-20241022"
|
|
129
|
+
```
|
|
130
|
+
3. **Run the migration**:
|
|
131
|
+
```bash
|
|
132
|
+
uv run python -m lc_sdk_examples.cobol_modernization --src-path /path/to/cobol/project
|
|
133
|
+
```
|
|
134
|
+
4. **Review outputs**: Check generated Java code and run tests
|
|
135
|
+
|
|
136
|
+
### Phase-by-Phase Execution
|
|
137
|
+
|
|
138
|
+
You can also run individual phases by using the specific skill definitions:
|
|
139
|
+
|
|
140
|
+
- See [skills/build-setup/SKILL.md](skills/build-setup/SKILL.md) for build setup only
|
|
141
|
+
- See [skills/mainframe-planning/SKILL.md](skills/mainframe-planning/SKILL.md) for planning
|
|
142
|
+
- See [skills/mainfraime-removal/SKILL.md](skills/mainfraime-removal/SKILL.md) for mainframe removal
|
|
143
|
+
- See [skills/to-java-migration/SKILL.md](skills/to-java-migration/SKILL.md) for Java translation
|
|
144
|
+
|
|
145
|
+
## Troubleshooting
|
|
146
|
+
|
|
147
|
+
### GnuCOBOL Not Found
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Install on Debian/Ubuntu
|
|
151
|
+
sudo apt-get install gnucobol
|
|
152
|
+
|
|
153
|
+
# Install on macOS
|
|
154
|
+
brew install gnucobol
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### COBOL Compilation Errors
|
|
158
|
+
|
|
159
|
+
1. Check that all copybooks are in the include path
|
|
160
|
+
2. Verify file encoding (COBOL often uses EBCDIC)
|
|
161
|
+
3. See [references/troubleshooting.md](references/troubleshooting.md) for common issues
|
|
162
|
+
|
|
163
|
+
### Java Tests Failing
|
|
164
|
+
|
|
165
|
+
1. Compare test outputs with golden outputs in `test-fixtures/`
|
|
166
|
+
2. Check for numeric precision differences (COBOL vs Java)
|
|
167
|
+
3. Verify date/time handling conversions
|
|
168
|
+
|
|
169
|
+
### Mainframe Dependencies Remaining
|
|
170
|
+
|
|
171
|
+
1. Review `mainframe_dependency_removal_plan.md`
|
|
172
|
+
2. Check for indirect CICS calls through subroutines
|
|
173
|
+
3. Verify all VSAM file accesses are converted
|
|
174
|
+
|
|
175
|
+
## Supported COBOL Features
|
|
176
|
+
|
|
177
|
+
- Standard COBOL-85 and COBOL-2002 syntax
|
|
178
|
+
- CICS command-level programs
|
|
179
|
+
- VSAM file operations
|
|
180
|
+
- Common mainframe utilities (SORT, IDCAMS)
|
|
181
|
+
- COPY/COPYBOOK statements
|
|
182
|
+
- Nested programs and subprograms
|
|
183
|
+
|
|
184
|
+
## Limitations
|
|
185
|
+
|
|
186
|
+
- Does not support assembler programs called from COBOL
|
|
187
|
+
- IMS/DB2 support is limited
|
|
188
|
+
- Screen handling (BMS) is stubbed, not fully migrated
|
|
189
|
+
- Some proprietary extensions may require manual intervention
|
|
190
|
+
|
|
191
|
+
## Related Resources
|
|
192
|
+
|
|
193
|
+
- **Blog Post**: [COBOL to Java Refactoring with OpenHands](https://openhands.dev/blog/20251218-cobol-to-java-refactoring) — Detailed walkthrough of the migration process
|
|
194
|
+
|
|
195
|
+
## Contributing
|
|
196
|
+
|
|
197
|
+
See the main [extensions repository](https://github.com/OpenHands/extensions) for contribution guidelines.
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
This plugin is part of the OpenHands extensions repository. See [LICENSE](../../LICENSE) for details.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
## COBOL doesn't compile after mainframe removal
|
|
4
|
+
|
|
5
|
+
- Check FILE STATUS is declared for all files
|
|
6
|
+
- Ensure CLOSE statements in all code paths
|
|
7
|
+
- Verify paragraph names match PERFORM statements
|
|
8
|
+
|
|
9
|
+
## Java tests fail
|
|
10
|
+
|
|
11
|
+
- Compare output byte-by-byte with golden files
|
|
12
|
+
- Check decimal precision (use BigDecimal)
|
|
13
|
+
- Verify character encoding matches COBOL
|
|
14
|
+
|
|
15
|
+
## Missing functionality
|
|
16
|
+
|
|
17
|
+
- Check the migration mapping for coverage gaps
|
|
18
|
+
- Review `mainframe_dependency_removal_plan.md` for skipped items
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-setup
|
|
3
|
+
description: Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages and generates golden test data.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires GnuCOBOL (cobc), Java 11+, Maven or Gradle
|
|
6
|
+
triggers:
|
|
7
|
+
- cobol build
|
|
8
|
+
- cobol test fixtures
|
|
9
|
+
- migration build setup
|
|
10
|
+
- gnucobol
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Set up a build environment and create test fixtures for validating COBOL-to-Java migrations.
|
|
14
|
+
|
|
15
|
+
To install GnuCOBOL, run: `./scripts/install-gnucobol.sh`
|
|
16
|
+
|
|
17
|
+
## Phase 1: Build Setup
|
|
18
|
+
|
|
19
|
+
### COBOL Build
|
|
20
|
+
|
|
21
|
+
- Find a way to compile and run the COBOL code (e.g., GnuCOBOL)
|
|
22
|
+
- Verify at least one program compiles and executes
|
|
23
|
+
- Note any dependencies or setup required
|
|
24
|
+
|
|
25
|
+
### Java Build
|
|
26
|
+
|
|
27
|
+
- Initialize a Java project alongside the COBOL code (Maven or Gradle)
|
|
28
|
+
- Set up standard directory structure: `src/main/java`, `src/test/java`
|
|
29
|
+
- Include JUnit 5 as a test dependency
|
|
30
|
+
- Verify the project builds (even if empty)
|
|
31
|
+
|
|
32
|
+
## Phase 2: Test Fixture Generation
|
|
33
|
+
|
|
34
|
+
For each major COBOL program:
|
|
35
|
+
|
|
36
|
+
### Create Synthetic Test Inputs
|
|
37
|
+
|
|
38
|
+
- Save to: `test-fixtures/inputs/{PROGRAM_NAME}/`
|
|
39
|
+
- Create 3-5 test cases per program covering:
|
|
40
|
+
- Normal/happy path (valid, typical data)
|
|
41
|
+
- Edge cases (empty input, maximum values, boundary conditions)
|
|
42
|
+
- Error cases (invalid formats, missing required fields)
|
|
43
|
+
|
|
44
|
+
### Generate Golden Outputs
|
|
45
|
+
|
|
46
|
+
- Run each COBOL program with each test input
|
|
47
|
+
- Save COBOL output to: `test-fixtures/expected_outputs/{PROGRAM_NAME}/`
|
|
48
|
+
- These become the "golden" outputs that Java must match
|
|
49
|
+
|
|
50
|
+
### Create Test Manifest
|
|
51
|
+
|
|
52
|
+
Save to `test_manifest.json`:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"PROGRAM1": {
|
|
57
|
+
"description": "Brief description of what this program does",
|
|
58
|
+
"test_cases": [
|
|
59
|
+
{
|
|
60
|
+
"name": "normal_invoice",
|
|
61
|
+
"input": "inputs/PROGRAM1/test_001.dat",
|
|
62
|
+
"expected": "expected_outputs/PROGRAM1/test_001.out",
|
|
63
|
+
"description": "Happy path"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Deliverables
|
|
71
|
+
|
|
72
|
+
1. **build_notes.md** — Build instructions for COBOL and Java
|
|
73
|
+
2. **test-fixtures/** — Directory with `inputs/` and `expected_outputs/`
|
|
74
|
+
3. **test_manifest.json** — JSON manifest of all test cases
|
|
75
|
+
|
|
76
|
+
## Priority
|
|
77
|
+
|
|
78
|
+
Focus on programs with core business logic (transactions, calculations, data processing). UI-heavy programs (menu screens, reports) are lower priority.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Install GnuCOBOL compiler for COBOL-to-Java migration projects
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
echo "Installing GnuCOBOL..."
|
|
7
|
+
|
|
8
|
+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
9
|
+
if command -v apt-get &> /dev/null; then
|
|
10
|
+
sudo apt-get update
|
|
11
|
+
sudo apt-get install -y gnucobol
|
|
12
|
+
elif command -v yum &> /dev/null; then
|
|
13
|
+
sudo yum install -y gnucobol
|
|
14
|
+
else
|
|
15
|
+
echo "Error: Unsupported Linux package manager"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
19
|
+
if command -v brew &> /dev/null; then
|
|
20
|
+
brew install gnucobol
|
|
21
|
+
else
|
|
22
|
+
echo "Error: Homebrew not found. Install from https://brew.sh"
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
else
|
|
26
|
+
echo "Error: Unsupported OS: $OSTYPE"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
echo "Verifying installation..."
|
|
31
|
+
cobc --version
|
|
32
|
+
echo "GnuCOBOL installed successfully!"
|