feat(cli): plan submit accepts JSON and YAML (D2) - #35
Merged
Conversation
acc-cli plan submit previously called json.loads() directly, which rejected the YAML scenario plans documented under examples/coding_split_skills/. YAML is the natural pair for the role.md authoring format (PR #28); plan files should not require an extra json-conversion step. acc/cli/plan_cmd.py: * New _parse_plan_text(raw, path_hint) helper. * Files ending .yaml / .yml parse via PyYAML; YAML errors are loud (a yaml-extension file should always be valid YAML). * Other paths attempt JSON first and fall back to YAML on JSONDecodeError so stdin can carry either dialect. * PyYAML is already a project dep (used everywhere else in acc/); no new requirement. 7 new tests in tests/test_cli_plan_yaml.py: * JSON plan parses (back-compat). * YAML plan parses (.yaml + .yml extensions). * Broken .yaml fails loudly with 'invalid YAML' in stderr. * Stdin-style YAML body parses via JSON-fallback. * Malformed input returns None with 'invalid JSON' diagnostic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Lets acc-cli plan submit accept both .json and .yaml/.yml plan files. Required for the runnable persona-cluster scenario (examples/coding_split_skills/). 7 tests pin both formats + the malformed-input contract.