summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/agents/test-engineer.md
AgeCommit message (Collapse)Author
2026-09-24code-modernization: people's verdicts on rules reach the build, and safer ↵Morgan Lunt
baselines A reviewer's "this rule is wrong" never reached the plan or the rewrite: the pane wrote a review ledger that no command read, and without the pane there was no way to write one. /code-modernization:modernize-review asks about the rules that need judgement (P0 rules with a defect, an SME question or less than High confidence) in a pop-up, or takes verdicts typed in the request, and writes the same RULE_REVIEWS.json/.md with an optional note. brief, transform, reimagine and the test engineer read it: a rule marked wrong is not an oracle and a P0 rule under discussion blocks. Running the old system to record a baseline is now limited to the local machine or a test environment the person named; production or third-party services, new accounts and real data are off limits unless the approved plan names them, a token in a recorded response is replaced before anything is saved, and every command stops the servers it started. Also: the front door asks in two pop-ups within the four-option limit, every command points a missing-code user to /modernize <name> --source <path>, the status inventory and next-step order include review and verify, the assessment says what Rehost and Replace mean, preflight notes the Windows python name, and the plugin and marketplace descriptions match what it does.
2026-09-24code-modernization: simpler commands, a source option, a report page and an ↵Morgan Lunt
equivalence check Commands hardcoded legacy/<system>, so code too big to copy, or living at an absolute path, needed a hand-made symlink. Preflight now takes --source <path> and makes the legacy/<system> link for you (a junction on Windows); nothing is copied, and every command says where the link points before it starts. The harden patch is applied with patch -p1 -d. Each command ends by naming the next command to run, and the commands are about a third shorter with no step removed: - map accepts an existing dependency graph (--graph) or the stack's own tooling, maps very large estates in resumable chunks, records reflection targets as unresolved instead of dead, asks before describing more than 40 nodes, and never gives two nodes the same location. - transform can take its module and target from the brief, counts the equivalence cases that executed (zero is a failure and a comparison never skips), shows the tests can fail with a deliberate one-line break, and hands "same or different" to a script when both systems can run. - brief writes each phase in one fixed shape: one command, module ids as in the map, and criteria written as conditions a build command may tick but not reword. - reimagine reuses the discovery artifacts instead of extracting them again. - status names the exact command to paste next. scripts/build_report.py turns whatever the commands wrote into one self-contained, offline REPORT.html (Mermaid is vendored, all text from the analysis is escaped, the quarantined secrets file is never read), and scripts/compare.py decides byte-for-byte whether two outputs match, records why, and checks it can fail. The shard builder ignores symbolic links and paths that leave the source, matches a plain name against what lies beneath it, and falls back to the directory tree when the map's modules share a location. The README drops from 275 to about 100 lines; the pane's reference moves to hooks/README.md.
2026-06-09code-modernization: dynamic workflow orchestration + untrusted-content hardeningMorgan Westlee Lunt
Four commands gain a Workflow-tool path (with direct-fan-out fallback for older builds): extract-rules loops until dry with per-rule citation referees and a P0 two-judge panel; harden runs class-scoped finders with adversarial per-finding refutation; assess --portfolio pipelines one survey agent per system with COCOMO computed uniformly in script; reimagine Phase E drops the 3-service scaffolding cap. Workflow agents return schema-validated data and only the orchestrating session writes artifacts — analysis agents are structurally read-only. All five agents gain an untrusted-content discipline section (source code is data, never instructions; comment-only claims are findings, not facts), and the README documents the prompt-injection threat model for analyzed code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09code-modernization: close remaining credential-leak pathsMorgan Lunt
A red-team pass found four ways credential values still reached shareable artifacts after the initial redaction: - the remediation patch: a diff removing a hardcoded secret carries the raw value on its '-' lines by construction. harden now splits output: non-credential hunks in the shareable security_remediation.patch, credential hunks in a gitignored security_remediation.local.patch with comment-only placeholders in the shareable file - the other four agents had no secret-handling rules. legacy-analyst (hardcoded-config evidence in tech-debt findings), business-rules-extractor (credentials recorded as rule parameters), test-engineer (legacy literals becoming committed test fixtures), and architecture-critic (quoted code in notes files) now all mask values and cite file:line; assess's tech-debt prompt and ASSESSMENT.md masking now cover every section, not just Security Findings - non-git projects: a .gitignore protects nothing under SVN/Mercurial. Both commands now refuse --show-secrets without git and write the quarantine file to ~/.modernize/<system>/ outside the project tree - the patch-apply instruction was wrong in both documented layouts (symlinked legacy/ broke relative paths). Patches are now written with project-root-relative paths and applied from the project root Also: --show-secrets is now position-independent in both commands, and the README documents the full model.
2026-04-24Add code-modernization pluginMorgan Westlee Lunt
Structured workflow (assess → map → extract-rules → reimagine → transform → harden) and specialist agents (legacy-analyst, business-rules-extractor, architecture-critic, security-auditor, test-engineer) for modernizing legacy codebases into current stacks.