Migrate more StrataMain commands to SimpleAPI#733
Merged
Conversation
Add to SimpleAPI: - readLaurelTextFile: parse Laurel source files (replaces 4x duplicated boilerplate in laurelParse, laurelAnalyze, laurelAnalyzeToGoto, laurelToCore commands) - readLaurelIonFiles / readLaurelIonProgram: deserialize Laurel Ion bytes (replaces local deserializeIonToLaurelFiles helper) - readPythonIon / pythonDirectToCore: Python direct-to-Core pipeline (replaces local readPythonStrata helper) - Laurel.verifyProgram / Laurel.analyzeToDiagnosticModels: Laurel analysis wrappers - Use Core.verifyProgram in pyAnalyzeCommand instead of manually managing temp directories Clean up 7 imports from StrataMain that are now provided via SimpleAPI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded exit code 1 with appropriate ExitCode constants in verifyCommand: userError for parse/type-check errors, failuresFound for verification failures, internalError for unexpected exceptions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The verifyCommand now exits with ExitCode.failuresFound (2) for verification failures instead of 1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
atomb
previously approved these changes
Apr 1, 2026
MikaelMayer
reviewed
Apr 2, 2026
Contributor
MikaelMayer
left a comment
There was a problem hiding this comment.
A few comments below
- Fix docstring for Core.verifyProgram: "Analyze" → "Verify" - Extract parseLaurelText helper from readLaurelTextFile so callers with already-read content avoid a redundant file read - Use parseLaurelText in laurelAnalyzeToGotoCommand to eliminate the double read of the input file - Fix indentation of if/for/match block in laurelAnalyzeCommand (was 6-space as if inside a match arm, should be 4-space) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MikaelMayer
approved these changes
Apr 2, 2026
atomb
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
readLaurelTextFileto SimpleAPI, replacing duplicated 8-lineLaurel parsing boilerplate in 4 commands (laurelParse, laurelAnalyze,
laurelAnalyzeToGoto, laurelToCore)
readLaurelIonFiles/readLaurelIonProgramto SimpleAPI,replacing the local
deserializeIonToLaurelFileshelperreadPythonIon/pythonDirectToCoreto SimpleAPI, replacingthe local
readPythonStratahelper used by 3 commandsLaurel.verifyProgram/Laurel.analyzeToDiagnosticModelstoSimpleAPI for Laurel analysis
pyAnalyzeCommandthroughCore.verifyPrograminstead ofmanually managing temp directories
🤖 Generated with Claude Code