From fb6e6a55a5d22c542070412aaf96a6c09f3a95c8 Mon Sep 17 00:00:00 2001 From: sknampally Date: Sat, 28 Nov 2026 16:37:43 -0700 Subject: [PATCH] Spec: AWS Transform's code analyses on non-mainframe stacks docs/aws-transform-other-stacks.md looks at whether AWS Transform custom's continuous modernization analyses (atx ct) could add a second opinion for Java, .NET and PHP codebases, from the user guide only. It keeps the NOT_MAINFRAME refusal, since no analysis writes business rules and a custom definition would follow Reframe's own instructions, and proposes a low-priority spike (AX-01) and a held story (AX-02) for a debt and security second opinion on Claude-only runs. any-legacy.md section 8 links to it. Prepared with AI assistance. --- docs/any-legacy.md | 2 +- docs/aws-transform-other-stacks.md | 100 +++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 docs/aws-transform-other-stacks.md diff --git a/docs/any-legacy.md b/docs/any-legacy.md index fdad205..6f016fd 100644 --- a/docs/any-legacy.md +++ b/docs/any-legacy.md @@ -128,7 +128,7 @@ The profile is shown by `reframe status`, carried into the reports' About sectio ## 8. Not in 1.1 -- **AWS Transform for other stacks.** It transforms code rather than documenting it, so there is nothing to reconcile yet. Revisit if AWS adds requirements for them. +- **AWS Transform for other stacks.** It transforms code rather than documenting it, so there is nothing to reconcile yet. Revisit if AWS adds requirements for them. Whether its code analyses could give a second opinion on debt and security is looked at in [aws-transform-other-stacks.md](aws-transform-other-stacks.md). - **Exact readers beyond the mainframe** (ASP.NET, JSP and Struts, Spring MVC). The general reader comes first; an exact one is added where the live runs show it pays. - **PL/I exact readers and the DSF codebase** ([SC-01](spikes/sc-01-larger-codebase.md)): a story of their own. PL/I is a mainframe language, so it already gets the profile and the general readers. - **Proving the `4gl` family.** It runs on the general readers, unproven, until a codebase with a licence that allows testing is found. diff --git a/docs/aws-transform-other-stacks.md b/docs/aws-transform-other-stacks.md new file mode 100644 index 0000000..6e43503 --- /dev/null +++ b/docs/aws-transform-other-stacks.md @@ -0,0 +1,100 @@ +# AWS Transform on other stacks: a second opinion? + +The owner's question (28 November 2026): why does AWS Transform not work for a codebase that is not a mainframe, and could it still add something? + +Status: **proposed**, for the owner. Docs only: nothing here was run, and no AWS call was made to write it. + +## 1. Where Reframe stands + +Reframe refuses AWS Transform outside the mainframe. `reframe run --tools both` or `--tools aws` stops before anything is made in AWS when the stack profile's family is not `mainframe` (`NOT_MAINFRAME` in `src/reframe/core/pipeline.py`; [any-legacy.md](any-legacy.md) sections 2, 5.1 and 8). The reason is AWS's design. AWS Transform writes requirements and business rules only for mainframe code, and pipeline 3 reconciles those against Claude's. + +That has not changed. The user guide's [document history](https://docs.aws.amazon.com/transform/latest/userguide/doc-history.html), up to its latest entry on 20 November 2026, adds no business-rule or requirements output for any other stack. Its page on [custom transformations](https://docs.aws.amazon.com/transform/latest/userguide/custom.html) sends COBOL and mainframe code to AWS Transform for mainframe, and .NET Framework upgrades to AWS Transform for Windows. + +What is new is **continuous modernization** in AWS Transform custom (`atx ct`, first in the document history on 3 June 2026). It runs analyses on any repository and reports each issue as a finding. This document asks whether those findings could check or add to what Reframe writes for Java, .NET and PHP. + +Sources, all from the AWS Transform user guide: + +- [Continuous modernization](https://docs.aws.amazon.com/transform/latest/userguide/continuous-modernization.html) (CM below) +- [Working with continuous modernization](https://docs.aws.amazon.com/transform/latest/userguide/ct-working-with.html) (CW) +- [Developer tools for continuous modernization](https://docs.aws.amazon.com/transform/latest/userguide/ct-developer-tools.html) (DT) +- [AWS Transform custom](https://docs.aws.amazon.com/transform/latest/userguide/custom.html) (CU) +- [Setting up](https://docs.aws.amazon.com/transform/latest/userguide/transform-setup.html) (SU) +- [Document history](https://docs.aws.amazon.com/transform/latest/userguide/doc-history.html) (DH) + +## 2. What each analysis gives, and what in Reframe it meets + +**Every analysis gives findings** (CM, "Findings"; CW, "Managing findings"): + +- a **severity:** `high`, `medium` or `low`; +- a **status:** `open`, `dismissed` (with a reason), `obsolete` (set when a re-analysis finds the issue resolved; it cannot be reopened) or `change_ready` (set when a remediation succeeds); +- a `recommendation` describing the change; +- where one matches, a fix transformation (`fix.transform_name` in `atx ct findings get` and `atx ct findings list --json`). + +CM's reporting feature makes HTML reports of findings by severity, repository and analysis type. The pages do not give the full field list of a finding, where reports are written, or their file names. + +| `--type` | What the pages say it reports | What in Reframe it could check or add to | +|---|---|---| +| `rapid-techdebt-analysis` | Outdated dependencies and easy wins, from package manifests (`pom.xml`, `package.json`, `requirements.txt`). It does not read source code (CM) | **Adds** a dependency list, which the plugin's `ASSESSMENT.md` covers only as part of its debt. CW's concurrency table calls this type `tech-debt-quick`; the pages disagree on its name | +| `tech-debt-comprehensive` | AI analysis of the code: dependency, security, pattern, performance, maintainability, architecture, code-quality and infrastructure findings (CW) | **Checks** the technical debt in the plugin's `ASSESSMENT.md` ([pipeline 2](pipeline-2.md), stage C5): a second reading of the same code by another agent | +| `security` | Static analysis by AWS Security Agent for insecure coding patterns, such as SQL injection, hardcoded secrets and unsafe deserialization. It needs a one-time setup, and is not offered in three Regions (CM) | **Checks** the security findings in `ASSESSMENT.md`. A finding inside a capability's cited lines could also inform its `security` risk ([pipeline 3](pipeline-3.md) section 8.9) | +| `modernization-readiness` | Infrastructure, application, data, security and operations; candidates for containers, serverless and platform upgrades (CM) | **Adds** to the replacement order ([pipeline 4](pipeline-4.md) D11, P4-12, held for later) and to the target-stack choice. It rates applications, not capabilities, so it cannot set the order itself | +| `agentic-readiness` | 56 criteria in five categories: infrastructure and platform, application architecture, data foundations, identity, security and governance, and operations and observability (CM) | Nothing Reframe writes today | +| `graviton-readiness` | Java only: native libraries, dependencies, Dockerfiles, build configuration and JVM flags, each with a recommended fix (CM) | Nothing: it is about where the new system runs, not what the old one does | +| `aws-health-readiness` | Lambda runtimes, EKS versions and Elastic Beanstalk PHP platforms that are deprecated or reach a lifecycle date within 180 days (CW; DH, 20 November 2026) | Nothing for a legacy codebase that does not already run on AWS | +| `custom` | "Run one of your own transformation definitions as an analysis where each issue described is reported as a finding" (CM) | Section 3 | + +**None of them writes business rules or requirements.** So none of them can take pipeline 1's place in the reconciliation. At most, three of them (`tech-debt-comprehensive`, `security`, `modernization-readiness`) give a second opinion on the debt, the security findings and the order of replacement. + +**Which stacks they cover is not stated.** CM names Java only for `graviton-readiness`, and PHP only through Elastic Beanstalk platforms. No page says how well `tech-debt-comprehensive` or `security` reads .NET or PHP. + +## 3. Could a `custom` analysis report business rules? + +**What the pages allow.** A custom definition is a directory with a `SKILL.md` (Markdown with YAML frontmatter, `name` and `description`) and, optionally, `references/` (text files, 10 MB in all) and `scripts/`, with nothing else in it (CU). CU suggests these sections: Introduction, Entry Criteria, Scope, What to Report, Categories, Severity Criteria and Exit Criteria, and asks for one finding per issue with its file path and line number. Category names and severity rules are free text. It is published with `atx custom def publish -n --description "..." --sd --category analysis` (CU), and run with `atx ct analysis run --type custom --transformation-name --source --repo :: --wait` (CW). + +So a definition could say, in What to Report: "report each business rule as one finding, with the file and lines that implement it, in the category of its rule kind". Nothing in the pages forbids that. Nothing in them shows it either. + +**Why it would not be a second independent assessment, as pipeline 1 is:** + +1. **The definition would be Reframe's own.** Pipeline 1 is worth reconciling because AWS's product decides what a requirement and a business rule are, with its own method, and Reframe only reads the result. In a custom analysis, Reframe would write the instructions for what a rule is and how to report it. The second opinion would be another agent following Reframe's own prompt. That is closer to running Claude's extraction twice than to a second product's assessment. +2. **A finding is an issue, not a rule.** Its fields are a severity, a status meant for triage (`dismissed`, `obsolete`, `change_ready`), a recommended change and a matching fix transformation. A business rule has none of these. Each rule's condition, outcome, parameters and the capability it belongs to would have to go in free text, and the pages say nothing about how much text a finding holds or how it is returned. +3. **There is no hierarchy.** Pipeline 3 lines rules up through AWS Transform's domain, function, capability and requirement. Findings come by repository and analysis type only, so Reframe would have to match each one to Claude's rules by its file and lines alone. +4. **The output is not documented.** CU's example shows a finding with a severity, a category and a matched transformation, but no page gives a custom finding's fields, any limit on how many findings an analysis makes, or the JSON of `atx ct findings list --json`. A reader built on that today would be built on a guess. +5. **The pages warn against long definitions.** "An analysis first reads only the beginning of each definition to decide which ones to consider" (CU). A definition that explains a rule's form well would be long. + +**What it could still be worth.** The evidence check works for a custom finding: if it gives a file and lines, Reframe can check they exist in the snapshot. Rules that a second agent also finds at the same lines are some support for Claude's rules. Rules that only one of them finds show where to look. That is a *coverage* check, weaker than the reconciliation, and it should be described as such. Whether it is worth its cost can only be known from a run. + +## 4. What it would need + +**The `atx` CLI.** The pages read give no install command. DT offers it through the AWS Transform Kiro Power, or the `aws-transform` plugin in `awslabs/agent-plugins` for Claude Code, Codex or Cursor. The skills format for definitions needs CLI 2.0 or later (CU; DH, 11 May 2026). Reframe's preflight would check the CLI and its version the way it checks its other tools (P1-18), and install it only on a yes. + +**Sign-in.** Continuous modernization needs IAM credentials. CW says it does not appear when you sign in with IAM Identity Center credentials, and the console has a setting to turn on access to AWS Transform with IAM credentials (CW; SU calls it "Enable IAM access"). How the `atx` CLI itself takes credentials is not stated on the pages read. The permissions come from AWS's managed policy `AWSTransformCustomFullAccess` (CW). The `security` analysis's one-time setup also needs rights to create CloudFormation stacks, IAM roles and S3 buckets (CM). This is the sign-in detail least certain from the pages, and it must be confirmed before anything is built. + +**Cost.** No page read gives a price for continuous modernization or its analyses. Reframe's rule holds: an estimate and the owner's yes before each live run, and the real cost recorded afterwards. + +**What it makes, and how each is deleted.** Reframe would run analyses locally only: `atx ct source add --provider local --path ` then `atx ct analysis run ... --wait`. It would never use `remote`, `schedule` or `remote network`: those make CloudFormation stacks, EC2 or AWS Batch, EventBridge schedules, and a VPC with a NAT gateway (CW). The pages read give no command to delete that network. + +| Made | Recorded from | Deleted by (CW, CM, DT) | +|---|---|---| +| The local source | The name Reframe gives it | `atx ct source remove --name ` | +| Each analysis and its findings | The analysis ID in the reply | `atx ct analysis delete --id --cascade-findings` | +| A custom definition (account- and Region-wide, CW) | The name Reframe gives it | **Not documented** on the pages read | +| The `security` setup: a CloudFormation stack, an S3 bucket and an IAM role (CM) | `atx ct setup security-agent --status` before and after | `atx ct setup security-agent --delete`, **only** if the status before showed no setup: it is shared by the account, not the run | + +A token for a Git provider would go to AWS Secrets Manager (CW). Reframe would not need one: it would run on its local snapshot. + +Teardown would work as it does for pipeline 1 (P1-11): every item listed at once from the run's own records, consent recorded, then deletion by recorded name or ID, never by search. Two things block that today: no documented way to delete a custom definition, and a `security` setup shared by the account. + +## 5. Recommendation + +**Keep the refusal.** AWS Transform still writes no business rules outside the mainframe. A custom analysis would follow Reframe's own instructions, so it would not be the independent assessment that pipeline 3 reconciles. `NOT_MAINFRAME` and [any-legacy.md](any-legacy.md) section 8 stay as they are. + +**A second opinion on debt and security may be worth a spike, held for later and low priority.** `tech-debt-comprehensive` and `security` meet what the plugin's `ASSESSMENT.md` already says, and a custom rule-coverage analysis could be tried in the same run. Too much is undocumented to build anything yet: the finding's fields, the cost, the CLI's sign-in, and how a definition is deleted. A spike would find out on one of release 1.1's public codebases, run locally, on the owner's yes with an estimate first. + +If the owner agrees, these rows go into [the plan](plan.md) in a new section, "AWS Transform on other stacks": + +| Story | Title | Specification | Done when | +|---|---|---|---| +| AX-01 | Spike: AWS Transform's code analyses on a non-mainframe codebase (low priority) | [§2 to §4](aws-transform-other-stacks.md) | **Later.** On the owner's yes, with an estimate first: `tech-debt-comprehensive`, `security` and one `custom` analysis that reports business rules run locally on JPetStore 6, and on eShopModernizing if Java works. The spike records how the CLI signs in, the JSON fields of a finding, how many findings come and how long they can be, the time and cost, every resource made, and how each was deleted by recorded name or ID, including the definition. It compares the debt and security findings with the plugin's `ASSESSMENT.md`, and checks the rule findings' lines in the snapshot and against Claude's rules. Nothing from the codebase or any identifier is committed. It ends with a yes or no on AX-02 | +| AX-02 | Debt and security second opinion, Claude-only runs | to be written after AX-01 | **Held on AX-01.** `reframe run --tools claude --aws-analyses` on a non-mainframe codebase adds AWS's debt and security findings beside the plugin's, each citing lines checked in the snapshot, with agreement and disagreement shown in the report. Business rules still come from Claude only. Every resource is deleted at teardown by recorded ID | + +The refusal for `--tools both` and `--tools aws` stays even if AX-02 is built. AX-02 is an extra step on a Claude-only run, not pipeline 1. Revisit pipeline 1 for other stacks only if AWS documents requirements or business rules for them.