

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345## Context67This instruction file applies to legacy system modernisation work: COBOL-to-Java migration, RPG IV / RPGLE to Java conversion, Spring Framework 4/5 to Spring Boot 3.x upgrades, and `javax.*` to `jakarta.*` namespace migrations. The guiding principle is **controlled, incremental migration** using the Strangler Fig pattern — never a big-bang rewrite. All legacy behaviour must be preserved exactly; the Anti-Corruption Layer (ACL) isolates modern code from legacy data models.89---1011## Coding Standards1213- **Strangler Fig only:** Migrate by route/feature, running old and new code simultaneously; switch traffic via feature flag14- **Anti-Corruption Layer (ACL):** Always introduce an ACL adapter when modern code calls legacy systems; never expose legacy data models to the domain layer15- **Parallel run first:** Run new implementation in shadow mode (write-only, no traffic served) before switching; compare outputs16- **javax → jakarta:** In Spring Boot 3.x, every `javax.*` import must be `jakarta.*`; use `spring-boot-migration` or IDE migration tool17- **No big-bang rewrites:** Never attempt to migrate an entire COBOL program in a single step; decompose into functions18- **Preserve business rules exactly:** Copy business logic verbatim before optimising; document every deliberate deviation19- **Feature flags for cutover:** Use LaunchDarkly or Spring `@ConditionalOnProperty` to control legacy/modern routing20- **Data migration is separate:** Schema migrations run independently of code changes; use Flyway with phased scripts2122---2324## Preferred Patterns2526### Strangler Fig Router2728```java29// ✅ CORRECT — feature-flagged routing to legacy or modern implementation30@Service31@RequiredArgsConstructor32public class OrderServiceRouter {3334 private final LegacyOrderService legacyOrderService;35 private final ModernOrderService modernOrderService;36 private final FeatureFlags flags;3738 public Order placeOrder(PlaceOrderCommand cmd) {39 if (flags.isEnabled("modern-order-service", cmd.customerId())) {40 return modernOrderService.placeOrder(cmd);41 }42 return legacyOrderService.placeOrder(cmd);43 }44}45```4647### Anti-Corruption Layer4849```java50// ✅ CORRECT — ACL translates legacy COBOL copybook structure to domain model51@Component52public class LegacyOrderAdapter implements OrderPort {5354 private final LegacyOrderServiceClient legacyClient;5556 @Override57 public Order findById(OrderId orderId) {58 LegacyCustRec legacyRecord = legacyClient.fetchOrder(orderId.value());59 return Order.builder()60 .id(OrderId.of(legacyRecord.getOrdId().trim()))61 .customerId(legacyRecord.getCustId().trim())62 .totalAmount(new BigDecimal(legacyRecord.getTotalAmt()).movePointLeft(2))63 .status(mapLegacyStatus(legacyRecord.getOrdSts()))64 .build();65 }6667 private OrderStatus mapLegacyStatus(String legacyCode) {68 return switch (legacyCode.trim()) {69 case "OP" -> OrderStatus.OPEN;70 case "CL" -> OrderStatus.CLOSED;71 case "CA" -> OrderStatus.CANCELLED;72 default -> throw new UnknownLegacyStatusException(legacyCode);73 };74 }75}7677// ❌ WRONG — leaking legacy model into the domain layer78public Order findById(String id) {79 LegacyCustRec rec = legacyClient.fetchOrder(id);80 return rec; // LegacyCustRec used as domain object — coupling81}82```8384### javax → jakarta Migration8586```java87// ✅ CORRECT — Spring Boot 3.x uses jakarta.*88import jakarta.persistence.Entity;89import jakarta.persistence.Id;90import jakarta.validation.constraints.NotNull;91import jakarta.servlet.http.HttpServletRequest;92import jakarta.transaction.Transactional;9394// ❌ WRONG — javax.* in Spring Boot 3.x [BLOCKER]95import javax.persistence.Entity;96import javax.persistence.Id;97import javax.validation.constraints.NotNull;98import javax.servlet.http.HttpServletRequest;99import javax.transaction.Transactional;100```101102### COBOL Field Mapping (PIC clause → Java type)103104```java105// COBOL: 05 CUST-ID PIC X(10).106// Java: String customerId; // trim() required — fixed-width padded with spaces107108// COBOL: 05 ORDER-AMT PIC 9(7)V99.109// Java: BigDecimal amount = new BigDecimal(raw).movePointLeft(2);110111// COBOL: 05 ORDER-DATE PIC 9(8). (YYYYMMDD)112// Java: LocalDate date = LocalDate.parse(raw, DateTimeFormatter.BASIC_ISO_DATE);113114// COBOL: 05 STATUS-FLAG PIC X(1). ('Y'/'N')115// Java: boolean active = "Y".equals(raw.trim());116```117118---119120## Anti-Patterns — Do NOT Generate121122```java123// WRONG: big-bang rewrite — replace all legacy code at once [BLOCKER]124// Never migrate 50,000 lines of COBOL in a single sprint125126// WRONG: javax.* in Spring Boot 3.x [BLOCKER]127import javax.persistence.Entity;128129// WRONG: legacy model leaking into domain [MAJOR]130public LegacyCustRec getOrder(String id) {131 return legacyClient.fetchOrder(id); // legacy type in public API132}133134// WRONG: silent field truncation [MAJOR]135String customerId = legacyRecord.getOrdId(); // missing .trim() — trailing spaces cause lookup failures136137// WRONG: direct DB join across legacy and modern schemas [MAJOR]138// SELECT o.order_id, c.email FROM legacy_orders o JOIN modern_customers c ON o.cust_id = c.id139// Cross-schema joins tightly couple two bounded contexts140141// WRONG: hardcoded feature flag value [MINOR]142if (true) { // should be flags.isEnabled("feature-name")143 return modernService.process(cmd);144}145```146147---148149## Dependencies & Versions150151| Technology | Version | Notes |152|-----------|---------|-------|153| Spring Boot | 3.x | Requires Java 17+; `jakarta.*` namespace exclusively |154| spring-boot-properties-migrator | 3.x | Auto-migrates deprecated property names on startup |155| openrewrite | 8.x | Automated refactoring; `UpgradeSpringBoot_3_2` recipe |156| LaunchDarkly Java SDK | 7.x | Feature flags for Strangler Fig routing |157| spring-cloud-config | 4.x | Externalise feature flag config for phased rollout |158159---160161## Migration Verification162163After each migration phase:1641651. **Functional equivalence:** Run the legacy and modern implementations in parallel with identical inputs; assert output equality1662. **Data mapping:** Verify every COBOL PIC clause maps to the correct Java type (trim strings, scale decimals, parse dates)1673. **javax → jakarta:** Run `grep -r "import javax\." src/main/java/` — must return zero results in Spring Boot 3.x modules1684. **No cross-context joins:** Run `grep -r "legacy_\|LEGACY_" src/main/java/` in modern service modules — must return zero results1695. **Feature flag coverage:** Every cutover point has a named feature flag; no hardcoded `if (true)` routing170
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/python.mdc · 1 | Cursor rules | lint-formatstyletypesapi+1 | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-github-instructions-modernization-patterns-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.