DEFINE PACKAGE "miranda"
CREATE FILE "miranda/init.py" // optional initializer; can be empty or contain a brief docstring
CREATE FILE "miranda/miranda.py"
CREATE FILE "miranda/cli.py"
// Content for miranda/miranda.py
MODULE miranda.py
// Expose a simple, importable component
DEFINE CONSTANT SIMPLE_CONSTANT = "miranda"
DEFINE FUNCTION sample_function() RETURNS integer
RETURN 1
END FUNCTION
END MODULE
// Content for miranda/cli.py
MODULE cli.py
IMPORT library "click"
// CLI entry point
DEFINE FUNCTION main() AS Click command
DECORATE with @click.command()
DOCUMENTATION_STRING: "CLI entry point for miranda"
BODY:
CALL click.echo("miranda.cli.main")
END BODY
END FUNCTION
// Ensure main is importable as a module attribute
SET all = ["main"]
END MODULE
// Import exposure requirements
ASSERT that "from miranda import miranda" succeeds // miranda/miranda.py exists
ASSERT that "from miranda import cli" succeeds // miranda/cli.py exists
// CLI behavior expectations
SPECIFY main() when invoked with no arguments
OUTPUT a line exactly "miranda.cli.main"
EXIT with code 0
SPECIFY help behavior
ON invocation with --help
DISPLAY standard Click help output
INCLUDE line "--help Show this message and exit." in the help text
END
// Tests compatibility
USE minimal, self-contained implementation
DO NOT rely on external state beyond standard libraries and Click
PROVIDE brief docstrings/comments describing purpose of components