codeplain 0.3.5__tar.gz → 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codeplain-0.3.7/.claude/settings.local.json +66 -0
- codeplain-0.3.7/.zed/settings.json +46 -0
- codeplain-0.3.7/PKG-INFO +144 -0
- codeplain-0.3.7/README.md +114 -0
- codeplain-0.3.7/_version.py +1 -0
- codeplain-0.3.7/docs/plain2code_cli.md +133 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/file_utils.py +1 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/install/bash/examples.sh +23 -12
- codeplain-0.3.7/install/bash/install.sh +445 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/install/bash/walkthrough.sh +62 -69
- {codeplain-0.3.5 → codeplain-0.3.7}/install/powershell/examples.ps1 +24 -14
- codeplain-0.3.7/install/powershell/install.ps1 +480 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/install/powershell/walkthrough.ps1 +58 -70
- {codeplain-0.3.5 → codeplain-0.3.7}/module_renderer.py +3 -2
- codeplain-0.3.7/path_resolution.py +64 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code.py +11 -11
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_arguments.py +200 -99
- codeplain-0.3.7/plain2code_cli.md +78 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_console.py +2 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_exceptions.py +17 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_logger.py +17 -15
- {codeplain-0.3.5 → codeplain-0.3.7}/plain_file.py +102 -42
- {codeplain-0.3.5 → codeplain-0.3.7}/pyproject.toml +4 -4
- {codeplain-0.3.5 → codeplain-0.3.7}/requirements.txt +3 -3
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_cypress.ps1 +30 -19
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_cypress.sh +6 -2
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_golang.ps1 +14 -5
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_golang.sh +6 -6
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_python.ps1 +11 -2
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_conformance_tests_python.sh +3 -3
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_flutter.ps1 +4 -1
- codeplain-0.3.7/test_scripts/run_unittests_flutter.sh +55 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_golang.ps1 +4 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_golang.sh +3 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_python.ps1 +4 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_python.sh +3 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_react.ps1 +4 -1
- {codeplain-0.3.5 → codeplain-0.3.7}/test_scripts/run_unittests_react.sh +3 -1
- codeplain-0.3.7/tests/data/imports/import_with_functionalities.plain +7 -0
- codeplain-0.3.7/tests/data/imports/imports_module_with_functionalities.plain +12 -0
- codeplain-0.3.7/tests/data/plainfile/empty_functional_specs_section.plain +4 -0
- codeplain-0.3.7/tests/data/plainfile/no_functional_specs_section.plain +5 -0
- codeplain-0.3.7/tests/test_arg_provenance.py +89 -0
- codeplain-0.3.7/tests/test_folder_path_resolution.py +165 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_imports.py +11 -0
- codeplain-0.3.7/tests/test_log_file_name_resolution.py +89 -0
- codeplain-0.3.7/tests/test_logging_config_path_resolution.py +67 -0
- codeplain-0.3.7/tests/test_path_resolution.py +65 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_plainfileparser.py +43 -5
- codeplain-0.3.7/tests/test_script_path_resolution.py +107 -0
- codeplain-0.3.5/.claude/settings.local.json +0 -10
- codeplain-0.3.5/PKG-INFO +0 -149
- codeplain-0.3.5/README.md +0 -119
- codeplain-0.3.5/_version.py +0 -1
- codeplain-0.3.5/docs/plain2code_cli.md +0 -85
- codeplain-0.3.5/install/bash/install.sh +0 -266
- codeplain-0.3.5/install/powershell/install.ps1 +0 -294
- {codeplain-0.3.5 → codeplain-0.3.7}/.claude/settings.json +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.flake8 +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/dependabot.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/workflows/e2e.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/workflows/lint-and-test.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/workflows/nofity-slack-on-main-merge.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/workflows/publish-install-script.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.github/workflows/publish-to-pypi.yml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.gitignore +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.vscode/launch.json +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/.vscode/settings.json +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/CLAUDE.md +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/LICENSE +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/change_detection.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/cli_output/__init__.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/cli_output/dry_run.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/cli_output/render_summary.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/cli_output/status.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/codeplain_REST_api.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/concept_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/config/__init__.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/config/system_config.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/diff_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/docs/generate_cli.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/docs/starting_a_plain_project_from_scratch.md +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/event_bus.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_golang/config.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_golang/harness_tests/hello_world_test.go +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_golang/hello_world_golang.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_golang/run.sh +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_python/config.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_python/harness_tests/hello_world_display/test_hello_world.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_python/hello_world_python.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_python/run.sh +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/config.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress/e2e/hello_world.cy.ts +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress/support/e2e.ts +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress.config.ts +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/harness_tests/hello_world_display/package.json +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/harness_tests/hello_world_display/tsconfig.json +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/hello_world_react.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/example_hello_world_react/run.sh +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/examples/run.sh +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/git_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/memory_management.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/partial_rendering.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_events.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_nodes.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_read_config.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_state.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_telemetry.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain2code_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain_modules.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/plain_spec.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/pytest.ini +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/__init__.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/analyze_specification_ambiguity.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/base_action.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/commit_conformance_tests_changes.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/commit_implementation_code_changes.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/create_dist.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/exit_with_error.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/finish_functional_requirement.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/fix_conformance_test.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/fix_unit_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/prepare_repositories.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/prepare_testing_environment.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/refactor_code.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/render_conformance_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/render_functional_requirement.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/run_conformance_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/run_unit_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/actions/summarize_conformance_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/code_renderer.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/conformance_tests.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/implementation_code_helpers.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/render_context.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/render_types.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/render_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/state_machine_config.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/states.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/render_machine/triggers.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/resources/codeplain_overview.png +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/resources/plain_example.png +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/standard_template_library/golang-console-app-template.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/standard_template_library/python-console-app-template.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/standard_template_library/typescript-react-app-boilerplate.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/standard_template_library/typescript-react-app-template.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/system_config.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/__init__.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/conftest.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/acceptance_tests_warning/main_requiring_acceptance_tests.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/acceptance_tests_warning/required_with_acceptance_tests.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/circular_imports_1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/circular_imports_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/circular_imports_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/diamond_import_1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/diamond_import_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/diamond_import_common.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/diamond_imports_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/imports/non_existent_import.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_code_var.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_implement.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_leaf.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_middle.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_root.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/partial_rendering/pr_solo.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/add_new_task_modal_specification.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/duplicate_specification_heading.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/invalid_specification_order.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/missing_non_functional_requirements.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/plain_source_with_absolute_link.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/plain_source_with_url_link.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/task_list_ui_specification.yaml +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/task_manager_with_reference_links.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfile/without_non_functional_requirement.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_acceptance_tests.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_acceptance_tests_nondefined.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_defined_nondefined.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_defined_nondefined_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_definition.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_noconcepts.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_nonconcept.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_nondefined.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_redefinition.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_several_concepts.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/concept_validation_valid.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_base.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_example.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_missing.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_missing_example.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_nested.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_nested_example.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_transitive_example.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_transitive_l1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/exported_concepts_transitive_l2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/plain_file_parser_with_comments.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/plain_file_with_comments_indented.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/regular_plain_source.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_defs.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_example.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_l1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_l2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_missing.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_module.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_partial.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/required_concepts_partial_duplicate.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/topological_sort.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/plainfileparser/topological_sort_not_referenced.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/circular_requires_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/circular_requires_sub.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/diamond_requires_1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/diamond_requires_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/diamond_requires_common.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/diamond_requires_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/independent_requires_1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/independent_requires_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/independent_requires_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/non_existent_require.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/normal_requires_1.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/normal_requires_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/normal_requires_common.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/requires/normal_requires_main.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/sample_base64_image.txt +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/simple.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/block_level_include.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/code_variables.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/header.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/implement.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/implement_2.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/template_include.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/data/templates/test_hardest_problem.plain +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/e2e/Dockerfile +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/e2e/conftest.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/e2e/test_hello_world_python.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/e2e/test_hello_world_python_windows.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_change_detection.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_cli_output.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_file_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_git_utils.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_partial_rendering.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_plain2code.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_plain_modules.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_plainfile.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_plainspec.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_requires.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_resolve_config_file.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tests/test_telemetry.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/__init__.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/components.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/models.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/plain2code_tui.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/plain_module_render_choice_tui.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/spinner.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/state_handlers.py +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/styles.css +0 -0
- {codeplain-0.3.5 → codeplain-0.3.7}/tui/widget_helpers.py +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(gh pr:*)",
|
|
5
|
+
"Bash(git diff *)",
|
|
6
|
+
"Bash(mypy . --check-untyped-defs)",
|
|
7
|
+
"Bash(flake8 .)",
|
|
8
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/test_git_utils.py -v --no-header)",
|
|
9
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key python *)",
|
|
10
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/_sandbox_check.py -v -s)",
|
|
11
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/test_partial_rendering.py -v)",
|
|
12
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/test_plain_modules.py -v)",
|
|
13
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/ -v)",
|
|
14
|
+
"Bash(flake8 tests/)",
|
|
15
|
+
"Bash(git stash *)",
|
|
16
|
+
"Bash(flake8 tests/test_git_utils.py)",
|
|
17
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key coverage run -m pytest tests/ -v)",
|
|
18
|
+
"Bash(.venv/bin/coverage run *)",
|
|
19
|
+
"Bash(.venv/bin/coverage report *)",
|
|
20
|
+
"Bash(.venv/bin/python -m coverage run -m pytest tests/)",
|
|
21
|
+
"Bash(.venv/bin/python -m coverage report)",
|
|
22
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/)",
|
|
23
|
+
"Bash(flake8 tests/test_partial_rendering.py tests/test_plain_modules.py)",
|
|
24
|
+
"Bash(MASTER_KEY=test-master-key GOOGLE_API_KEY=test-google-api-key pytest tests/test_partial_rendering.py tests/test_plain_modules.py tests/test_git_utils.py)",
|
|
25
|
+
"Bash(pytest tests *)",
|
|
26
|
+
"Bash(pytest tests/test_git_utils.py::test_diff_without_previous_frid_and_no_base_folder -x -v)",
|
|
27
|
+
"Bash(git checkout *)",
|
|
28
|
+
"Bash(python -c ' *)",
|
|
29
|
+
"Bash(python3 -c ' *)",
|
|
30
|
+
"Bash(/opt/homebrew/opt/python@3.11/bin/python3.11 -c ' *)",
|
|
31
|
+
"Bash(pytest tests/test_git_utils.py -x -v)",
|
|
32
|
+
"Bash(pytest tests/test_git_utils.py -v)",
|
|
33
|
+
"Bash(pytest -x -v)",
|
|
34
|
+
"Bash(pytest tests/test_partial_rendering.py -v)",
|
|
35
|
+
"Bash(pytest -v)",
|
|
36
|
+
"Bash(pytest)",
|
|
37
|
+
"Bash(python -m pytest tests/test_partial_rendering.py -x -v)",
|
|
38
|
+
"Bash(python -m pytest -x -v)",
|
|
39
|
+
"Bash(python -m pytest tests/test_partial_rendering.py -v)",
|
|
40
|
+
"Bash(python -m pytest)",
|
|
41
|
+
"Bash(python -m pytest tests/test_plain_modules.py -q)",
|
|
42
|
+
"Bash(python3 -m pytest tests/test_plain_modules.py -q)",
|
|
43
|
+
"Bash(.venv/bin/pytest tests/test_plain_modules.py -q)",
|
|
44
|
+
"Bash(git -C /Users/zanjonke/Work/codeplain/codeplain log --oneline -5)",
|
|
45
|
+
"Bash(git -C /Users/zanjonke/Work/codeplain/codeplain branch --show-current)",
|
|
46
|
+
"Bash(python -m pytest tests/test_git_utils.py::test_get_last_finished_frid_empty_repo -x)",
|
|
47
|
+
"Bash(python3 -m pytest tests/test_git_utils.py::test_get_last_finished_frid_empty_repo -x)",
|
|
48
|
+
"Bash(.venv/bin/python -m pytest tests/test_git_utils.py::test_get_last_finished_frid_empty_repo -x)",
|
|
49
|
+
"Bash(.venv/bin/python -m pytest tests/test_git_utils.py::test_get_last_finished_frid_without_module_name tests/test_git_utils.py::test_get_last_finished_frid_empty_repo -x)",
|
|
50
|
+
"Bash(.venv/bin/python -m pytest tests/test_git_utils.py)",
|
|
51
|
+
"Bash(python -m pytest tests/test_partial_rendering.py -x)",
|
|
52
|
+
"Bash(python3 -m pytest tests/test_partial_rendering.py)",
|
|
53
|
+
"Bash(/Users/zanjonke/Work/codeplain/codeplain/.venv/bin/python -m pytest tests/test_partial_rendering.py)",
|
|
54
|
+
"Bash(/Users/zanjonke/Work/codeplain/codeplain/.venv/bin/python -m pytest tests/test_plain_modules.py tests/test_partial_rendering.py)",
|
|
55
|
+
"Bash(git *)",
|
|
56
|
+
"Bash(python -m pytest tests/test_plain_modules.py -x --tb=short)",
|
|
57
|
+
"Bash(python3 -m pytest tests/test_plain_modules.py -x --tb=short)",
|
|
58
|
+
"Bash(/Users/zanjonke/Work/codeplain/codeplain/venv/bin/python -m pytest tests/test_plain_modules.py --tb=short)",
|
|
59
|
+
"Bash(/Users/zanjonke/Work/codeplain/codeplain/.venv/bin/python -m pytest tests/test_plain_modules.py --tb=short)",
|
|
60
|
+
"Bash(/Users/zanjonke/Work/codeplain/codeplain/.venv/bin/python -m pytest tests/test_partial_rendering.py tests/test_git_utils.py --tb=short)",
|
|
61
|
+
"Bash(.venv/bin/python *)",
|
|
62
|
+
"Bash(python *)",
|
|
63
|
+
"Bash(python3 *)"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Zed project-local settings, converted from .vscode/settings.json.
|
|
2
|
+
// Docs: https://zed.dev/docs/configuring-zed
|
|
3
|
+
{
|
|
4
|
+
"format_on_save": "on",
|
|
5
|
+
"languages": {
|
|
6
|
+
"Python": {
|
|
7
|
+
"tab_size": 4,
|
|
8
|
+
"hard_tabs": false,
|
|
9
|
+
"preferred_line_length": 120,
|
|
10
|
+
"wrap_guides": [120],
|
|
11
|
+
"format_on_save": "on",
|
|
12
|
+
// Run isort first (organize imports), then black (format).
|
|
13
|
+
// Matches `source.organizeImports: explicit` + black-formatter from VS Code.
|
|
14
|
+
"formatter": [
|
|
15
|
+
{
|
|
16
|
+
"external": {
|
|
17
|
+
"command": "isort",
|
|
18
|
+
"arguments": ["--profile", "black", "--filename", "{buffer_path}", "-"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"external": {
|
|
23
|
+
"command": "black",
|
|
24
|
+
"arguments": ["--quiet", "--stdin-filename", "{buffer_path}", "-"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
// Treat fixture files under tests/data as plain text (matches files.associations).
|
|
31
|
+
"file_types": {
|
|
32
|
+
"Plain Text": ["tests/data/**"]
|
|
33
|
+
},
|
|
34
|
+
// python.analysis.extraPaths -> Pyright (Zed's default Python LSP).
|
|
35
|
+
"lsp": {
|
|
36
|
+
"pyright": {
|
|
37
|
+
"settings": {
|
|
38
|
+
"python": {
|
|
39
|
+
"analysis": {
|
|
40
|
+
"extraPaths": ["."]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
codeplain-0.3.7/PKG-INFO
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codeplain
|
|
3
|
+
Version: 0.3.7
|
|
4
|
+
Summary: Transform plain language specifications into working code
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Classifier: Environment :: Console
|
|
7
|
+
Classifier: Intended Audience :: Developers
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
10
|
+
Requires-Python: ==3.11.*
|
|
11
|
+
Requires-Dist: gitpython==3.1.50
|
|
12
|
+
Requires-Dist: mistletoe==1.5.1
|
|
13
|
+
Requires-Dist: networkx==3.6.1
|
|
14
|
+
Requires-Dist: python-frontmatter==1.3.0
|
|
15
|
+
Requires-Dist: python-liquid2==0.4.0
|
|
16
|
+
Requires-Dist: pyyaml==6.0.3
|
|
17
|
+
Requires-Dist: requests==2.34.2
|
|
18
|
+
Requires-Dist: rich==15.0.0
|
|
19
|
+
Requires-Dist: sentry-sdk==2.63.0
|
|
20
|
+
Requires-Dist: textual>=7.5.0
|
|
21
|
+
Requires-Dist: tiktoken==0.13.0
|
|
22
|
+
Requires-Dist: transitions==0.9.3
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: black==26.5.1; extra == 'dev'
|
|
25
|
+
Requires-Dist: flake8==7.3.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: isort==8.0.1; extra == 'dev'
|
|
27
|
+
Requires-Dist: mypy==2.1.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest==9.1.1; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# *codeplain renderer
|
|
32
|
+
|
|
33
|
+
## What is \*codeplain?
|
|
34
|
+
|
|
35
|
+
\*codeplain platform makes coding agents better by having them write and maintain specifications instead of code. It extends coding agents with agentic skills for working at the specification layer, and with tools that convert specifications into tested and validated implementation code.
|
|
36
|
+
|
|
37
|
+
This repository is the renderer that powers that last step, turning \*\*\*plain specs into software using the *codeplain API.
|
|
38
|
+
|
|
39
|
+
The result is a software development workflow centered on specifications, which are faster and more efficient for AI to produce and easier for developers to review and maintain than raw code.
|
|
40
|
+
|
|
41
|
+
Schematic overview of the *codeplain's code rendering:
|
|
42
|
+
|
|
43
|
+
<img src="https://raw.githubusercontent.com/Codeplain-ai/plain2code_client/main/resources/codeplain_overview.png">
|
|
44
|
+
|
|
45
|
+
## Getting started
|
|
46
|
+
|
|
47
|
+
Get started in 15 minutes.
|
|
48
|
+
|
|
49
|
+
### 1. Install \*codeplain in the terminal
|
|
50
|
+
|
|
51
|
+
macOS and Linux:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
curl -fsSL https://codeplain.ai/install.sh | bash
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Windows PowerShell:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
irm https://codeplain.ai/install.ps1 | iex
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Windows users:** Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.
|
|
64
|
+
|
|
65
|
+
Follow the installation instructions to complete setup. The installer installs the `codeplain` CLI, walks you through setting your `CODEPLAIN_API_KEY`, and offers to set up [plain-forge](#2-let-your-agent-work-in-specs-not-code) and the [plyn editor extension](#vs-code--cursor-extension) for you in the same session.
|
|
66
|
+
|
|
67
|
+
If you'd rather not run the installer, sign up at [platform.codeplain.ai](https://platform.codeplain.ai) to get your API key and export it yourself:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
export CODEPLAIN_API_KEY="your_actual_api_key_here"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 2. Let your agent work in specs, not code
|
|
74
|
+
|
|
75
|
+
You describe what you want in plain English, an agent helps you write a spec in \*\*\*plain language, and \*codeplain renders the actual code. This is what [plain-forge](https://github.com/Codeplain-ai/plain-forge) sets up: a toolkit of skills, rules, and docs that plugs into your AI coding agent of choice — Claude Code, Codex, ForgeCode, OpenCode, or any other agent that reads from a standard skills directory — and turns a conversation into a complete `.plain` spec, then keeps maintaining it across the lifetime of the project.
|
|
76
|
+
|
|
77
|
+
If you didn't install it during step 1, run it any time:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx plain-forge install
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 3. Convert specs into tested and validated code
|
|
84
|
+
|
|
85
|
+
\*codeplain extends coding agents with agentic skills for working at the specification layer, and with tools that convert specifications into tested and validated implementation code.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
codeplain your-project.plain
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Try it now
|
|
92
|
+
|
|
93
|
+
You can immediately test the system with a simple "Hello World" example:
|
|
94
|
+
|
|
95
|
+
- Change to the example folder and run the example:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cd examples/example_hello_world_python
|
|
99
|
+
codeplain hello_world_python.plain
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
_Note: Rendering will take a few minutes to complete._
|
|
103
|
+
|
|
104
|
+
- The system will generate a Python application in the `build` directory. You can run it with:
|
|
105
|
+
```bash
|
|
106
|
+
cd build
|
|
107
|
+
python hello_world.py
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### VS Code / Cursor extension
|
|
111
|
+
|
|
112
|
+
If you're using Visual Studio Code or Cursor IDE, we also recommend installing the [plyn extension](https://marketplace.visualstudio.com/items?itemName=Codeplain.plyn) for `***plain` syntax highlighting. The installer in step 1 offers to install it automatically if it detects `code` or `cursor` on your `PATH`.
|
|
113
|
+
|
|
114
|
+
### Community and support
|
|
115
|
+
|
|
116
|
+
Share what you're building! Join the [\*codeplain Discord](https://discord.gg/cgbynb9hFq) if you have questions, ideas, or want to share what you built.
|
|
117
|
+
|
|
118
|
+
Hit an edge case or have feedback? Reach us at [support@codeplain.ai](mailto:support@codeplain.ai).
|
|
119
|
+
|
|
120
|
+
## Abstracting Away Code Generation Complexity with \*\*\*plain
|
|
121
|
+
|
|
122
|
+
\*\*\*plain is the language of spec-driven development — a specification language that combines the efficiency of natural language with the control and precision of code.
|
|
123
|
+
|
|
124
|
+
Structured sections for definitions, functional specs, implementation requirements, test requirements, and acceptance tests let your specs (not scattered docs or ad hoc prompts) become the source of truth for your software's behavior, abstracting away the complexity of using large language models for code generation.
|
|
125
|
+
|
|
126
|
+
Specs are plain text, so they fit into the workflows you already use — version control, pull requests, and code review.
|
|
127
|
+
|
|
128
|
+
See the [\*\*\*plain language guide](https://www.plainlang.org/docs/language-guide/) to learn the full syntax.
|
|
129
|
+
|
|
130
|
+
An example application in \*\*\*plain
|
|
131
|
+
|
|
132
|
+
<img src="resources/plain_example.png" width="70%" height="70%">
|
|
133
|
+
|
|
134
|
+
## Additional Resources
|
|
135
|
+
|
|
136
|
+
### Examples and Sample Projects
|
|
137
|
+
|
|
138
|
+
- See the [examples](examples) folder for sample projects in Golang, Python, React, and Flutter.
|
|
139
|
+
- For an example of how to implement Pong in \*\*\*plain, see the [pong](https://github.com/Codeplain-ai/plainlang-examples/tree/main/pong) example.
|
|
140
|
+
- For an example of how to implement a task manager in \*\*\*plain, see the [task-manager](https://github.com/Codeplain-ai/plainlang-examples/tree/main/task-manager) example.
|
|
141
|
+
|
|
142
|
+
### Documentation
|
|
143
|
+
|
|
144
|
+
- For more details on the ***plain format, see the [***plain language specification](https://www.plainlang.org/docs/).
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# *codeplain renderer
|
|
2
|
+
|
|
3
|
+
## What is \*codeplain?
|
|
4
|
+
|
|
5
|
+
\*codeplain platform makes coding agents better by having them write and maintain specifications instead of code. It extends coding agents with agentic skills for working at the specification layer, and with tools that convert specifications into tested and validated implementation code.
|
|
6
|
+
|
|
7
|
+
This repository is the renderer that powers that last step, turning \*\*\*plain specs into software using the *codeplain API.
|
|
8
|
+
|
|
9
|
+
The result is a software development workflow centered on specifications, which are faster and more efficient for AI to produce and easier for developers to review and maintain than raw code.
|
|
10
|
+
|
|
11
|
+
Schematic overview of the *codeplain's code rendering:
|
|
12
|
+
|
|
13
|
+
<img src="https://raw.githubusercontent.com/Codeplain-ai/plain2code_client/main/resources/codeplain_overview.png">
|
|
14
|
+
|
|
15
|
+
## Getting started
|
|
16
|
+
|
|
17
|
+
Get started in 15 minutes.
|
|
18
|
+
|
|
19
|
+
### 1. Install \*codeplain in the terminal
|
|
20
|
+
|
|
21
|
+
macOS and Linux:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -fsSL https://codeplain.ai/install.sh | bash
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Windows PowerShell:
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
irm https://codeplain.ai/install.ps1 | iex
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Windows users:** Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.
|
|
34
|
+
|
|
35
|
+
Follow the installation instructions to complete setup. The installer installs the `codeplain` CLI, walks you through setting your `CODEPLAIN_API_KEY`, and offers to set up [plain-forge](#2-let-your-agent-work-in-specs-not-code) and the [plyn editor extension](#vs-code--cursor-extension) for you in the same session.
|
|
36
|
+
|
|
37
|
+
If you'd rather not run the installer, sign up at [platform.codeplain.ai](https://platform.codeplain.ai) to get your API key and export it yourself:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
export CODEPLAIN_API_KEY="your_actual_api_key_here"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Let your agent work in specs, not code
|
|
44
|
+
|
|
45
|
+
You describe what you want in plain English, an agent helps you write a spec in \*\*\*plain language, and \*codeplain renders the actual code. This is what [plain-forge](https://github.com/Codeplain-ai/plain-forge) sets up: a toolkit of skills, rules, and docs that plugs into your AI coding agent of choice — Claude Code, Codex, ForgeCode, OpenCode, or any other agent that reads from a standard skills directory — and turns a conversation into a complete `.plain` spec, then keeps maintaining it across the lifetime of the project.
|
|
46
|
+
|
|
47
|
+
If you didn't install it during step 1, run it any time:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx plain-forge install
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Convert specs into tested and validated code
|
|
54
|
+
|
|
55
|
+
\*codeplain extends coding agents with agentic skills for working at the specification layer, and with tools that convert specifications into tested and validated implementation code.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
codeplain your-project.plain
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Try it now
|
|
62
|
+
|
|
63
|
+
You can immediately test the system with a simple "Hello World" example:
|
|
64
|
+
|
|
65
|
+
- Change to the example folder and run the example:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd examples/example_hello_world_python
|
|
69
|
+
codeplain hello_world_python.plain
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
_Note: Rendering will take a few minutes to complete._
|
|
73
|
+
|
|
74
|
+
- The system will generate a Python application in the `build` directory. You can run it with:
|
|
75
|
+
```bash
|
|
76
|
+
cd build
|
|
77
|
+
python hello_world.py
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### VS Code / Cursor extension
|
|
81
|
+
|
|
82
|
+
If you're using Visual Studio Code or Cursor IDE, we also recommend installing the [plyn extension](https://marketplace.visualstudio.com/items?itemName=Codeplain.plyn) for `***plain` syntax highlighting. The installer in step 1 offers to install it automatically if it detects `code` or `cursor` on your `PATH`.
|
|
83
|
+
|
|
84
|
+
### Community and support
|
|
85
|
+
|
|
86
|
+
Share what you're building! Join the [\*codeplain Discord](https://discord.gg/cgbynb9hFq) if you have questions, ideas, or want to share what you built.
|
|
87
|
+
|
|
88
|
+
Hit an edge case or have feedback? Reach us at [support@codeplain.ai](mailto:support@codeplain.ai).
|
|
89
|
+
|
|
90
|
+
## Abstracting Away Code Generation Complexity with \*\*\*plain
|
|
91
|
+
|
|
92
|
+
\*\*\*plain is the language of spec-driven development — a specification language that combines the efficiency of natural language with the control and precision of code.
|
|
93
|
+
|
|
94
|
+
Structured sections for definitions, functional specs, implementation requirements, test requirements, and acceptance tests let your specs (not scattered docs or ad hoc prompts) become the source of truth for your software's behavior, abstracting away the complexity of using large language models for code generation.
|
|
95
|
+
|
|
96
|
+
Specs are plain text, so they fit into the workflows you already use — version control, pull requests, and code review.
|
|
97
|
+
|
|
98
|
+
See the [\*\*\*plain language guide](https://www.plainlang.org/docs/language-guide/) to learn the full syntax.
|
|
99
|
+
|
|
100
|
+
An example application in \*\*\*plain
|
|
101
|
+
|
|
102
|
+
<img src="resources/plain_example.png" width="70%" height="70%">
|
|
103
|
+
|
|
104
|
+
## Additional Resources
|
|
105
|
+
|
|
106
|
+
### Examples and Sample Projects
|
|
107
|
+
|
|
108
|
+
- See the [examples](examples) folder for sample projects in Golang, Python, React, and Flutter.
|
|
109
|
+
- For an example of how to implement Pong in \*\*\*plain, see the [pong](https://github.com/Codeplain-ai/plainlang-examples/tree/main/pong) example.
|
|
110
|
+
- For an example of how to implement a task manager in \*\*\*plain, see the [task-manager](https://github.com/Codeplain-ai/plainlang-examples/tree/main/task-manager) example.
|
|
111
|
+
|
|
112
|
+
### Documentation
|
|
113
|
+
|
|
114
|
+
- For more details on the ***plain format, see the [***plain language specification](https://www.plainlang.org/docs/).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.7"
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Plain2Code CLI Reference
|
|
2
|
+
|
|
3
|
+
```text
|
|
4
|
+
usage: generate_cli.py [-h] [--verbose] [--base-folder BASE_FOLDER]
|
|
5
|
+
[--build-folder BUILD_FOLDER]
|
|
6
|
+
[--log-to-file | --no-log-to-file]
|
|
7
|
+
[--log-file-name LOG_FILE_NAME]
|
|
8
|
+
[--config-name CONFIG_NAME]
|
|
9
|
+
[--render-range RENDER_RANGE |
|
|
10
|
+
--render-from RENDER_FROM] [--force-render]
|
|
11
|
+
[--unittests-script UNITTESTS_SCRIPT]
|
|
12
|
+
[--conformance-tests-folder CONFORMANCE_TESTS_FOLDER]
|
|
13
|
+
[--conformance-tests-script CONFORMANCE_TESTS_SCRIPT]
|
|
14
|
+
[--prepare-environment-script PREPARE_ENVIRONMENT_SCRIPT]
|
|
15
|
+
[--test-script-timeout TEST_SCRIPT_TIMEOUT]
|
|
16
|
+
[--api [API]] [--api-key API_KEY] [--full-plain]
|
|
17
|
+
[--dry-run] [--replay-with REPLAY_WITH]
|
|
18
|
+
[--template-dir TEMPLATE_DIR] [--copy-build]
|
|
19
|
+
[--build-dest BUILD_DEST] [--copy-conformance-tests]
|
|
20
|
+
[--conformance-tests-dest CONFORMANCE_TESTS_DEST]
|
|
21
|
+
[--render-machine-graph]
|
|
22
|
+
[--logging-config-path LOGGING_CONFIG_PATH]
|
|
23
|
+
[--headless]
|
|
24
|
+
filename
|
|
25
|
+
|
|
26
|
+
Render plain code to target code. Path arguments resolve based on where they
|
|
27
|
+
were written: values given on the command line are resolved against the
|
|
28
|
+
current working directory, values read from config.yaml are resolved against
|
|
29
|
+
the config file's directory, and defaults are resolved against the directory
|
|
30
|
+
containing the plain file. Absolute paths (and paths starting with '~') are
|
|
31
|
+
used as-is.
|
|
32
|
+
|
|
33
|
+
positional arguments:
|
|
34
|
+
filename Path to the plain file to render. The directory
|
|
35
|
+
containing this file has highest precedence for
|
|
36
|
+
template loading, so you can place custom templates
|
|
37
|
+
here to override the defaults. See --template-dir for
|
|
38
|
+
more details about template loading.
|
|
39
|
+
|
|
40
|
+
options:
|
|
41
|
+
-h, --help show this help message and exit
|
|
42
|
+
--verbose, -v Enable verbose output
|
|
43
|
+
--base-folder BASE_FOLDER
|
|
44
|
+
Base folder for the build files
|
|
45
|
+
--build-folder BUILD_FOLDER
|
|
46
|
+
Folder for build files
|
|
47
|
+
--log-to-file, --no-log-to-file
|
|
48
|
+
Enable logging to a file. Defaults to True. Set to
|
|
49
|
+
False to disable.
|
|
50
|
+
--log-file-name LOG_FILE_NAME
|
|
51
|
+
Name of the log file. Defaults to 'codeplain.log'. If
|
|
52
|
+
a file already exists at the resolved path, it will be
|
|
53
|
+
overwritten by the current logs.
|
|
54
|
+
--render-range RENDER_RANGE
|
|
55
|
+
Specify a range of functionalities to render (e.g. `1`
|
|
56
|
+
, `2`, `3`). Use comma to separate start and end IDs.
|
|
57
|
+
If only one functionality ID is provided, only that
|
|
58
|
+
functionality is rendered. Range is inclusive of both
|
|
59
|
+
start and end IDs.
|
|
60
|
+
--render-from RENDER_FROM
|
|
61
|
+
Continue generation starting from this specific
|
|
62
|
+
functionality (e.g. `2`). The functionality with this
|
|
63
|
+
ID will be included in the output. The functionality
|
|
64
|
+
ID must match one of the functionalities in your plain
|
|
65
|
+
file.
|
|
66
|
+
--force-render Force re-render of all the required modules.
|
|
67
|
+
--unittests-script UNITTESTS_SCRIPT
|
|
68
|
+
Shell script to run unit tests on generated code.
|
|
69
|
+
Receives the build folder path as its first argument
|
|
70
|
+
(default: 'plain_modules').
|
|
71
|
+
--conformance-tests-folder CONFORMANCE_TESTS_FOLDER
|
|
72
|
+
Folder for conformance test files
|
|
73
|
+
--conformance-tests-script CONFORMANCE_TESTS_SCRIPT
|
|
74
|
+
Path to conformance tests shell script. Every
|
|
75
|
+
conformance test script should accept two arguments:
|
|
76
|
+
1) Path to a folder (e.g. `plain_modules/module_name`)
|
|
77
|
+
containing generated source code, 2) Path to a
|
|
78
|
+
subfolder of the conformance tests folder (e.g.
|
|
79
|
+
`conformance_tests/subfoldername`) containing test
|
|
80
|
+
files.
|
|
81
|
+
--prepare-environment-script PREPARE_ENVIRONMENT_SCRIPT
|
|
82
|
+
Path to a shell script that prepares the testing
|
|
83
|
+
environment. The script should accept the source code
|
|
84
|
+
folder path as its first argument.
|
|
85
|
+
--test-script-timeout TEST_SCRIPT_TIMEOUT
|
|
86
|
+
Timeout for test scripts in seconds. If not provided,
|
|
87
|
+
the default timeout of 120 seconds is used.
|
|
88
|
+
--api [API] Alternative base URL for the API. Default:
|
|
89
|
+
`https://api.codeplain.ai`
|
|
90
|
+
--api-key API_KEY API key used to access the API. If not provided, the
|
|
91
|
+
`CODEPLAIN_API_KEY` environment variable is used.
|
|
92
|
+
--full-plain Full preview ***plain specification before code
|
|
93
|
+
generation.Use when you want to preview context of all
|
|
94
|
+
***plain primitives that are going to be included in
|
|
95
|
+
order to render the given module.
|
|
96
|
+
--dry-run Dry run preview of the code generation (without
|
|
97
|
+
actually making any changes).
|
|
98
|
+
--replay-with REPLAY_WITH
|
|
99
|
+
--template-dir TEMPLATE_DIR
|
|
100
|
+
Path to a custom template directory. Templates are
|
|
101
|
+
searched in the following order: 1) Directory
|
|
102
|
+
containing the plain file, 2) Custom template
|
|
103
|
+
directory (if provided through this argument), 3)
|
|
104
|
+
Built-in standard_template_library directory
|
|
105
|
+
--copy-build If set, copy the rendered contents of code in `--base-
|
|
106
|
+
folder` folder to `--build-dest` folder after
|
|
107
|
+
successful rendering.
|
|
108
|
+
--build-dest BUILD_DEST
|
|
109
|
+
Target folder to copy rendered contents of code to
|
|
110
|
+
(used only if --copy-build is set).
|
|
111
|
+
--copy-conformance-tests
|
|
112
|
+
If set, copy the conformance tests of code in
|
|
113
|
+
`--conformance-tests-folder` folder to `--conformance-
|
|
114
|
+
tests-dest` folder successful rendering. Requires
|
|
115
|
+
--conformance-tests-script.
|
|
116
|
+
--conformance-tests-dest CONFORMANCE_TESTS_DEST
|
|
117
|
+
Target folder to copy conformance tests of code to
|
|
118
|
+
(used only if --copy-conformance-tests is set).
|
|
119
|
+
--render-machine-graph
|
|
120
|
+
If set, render the state machine graph.
|
|
121
|
+
--logging-config-path LOGGING_CONFIG_PATH
|
|
122
|
+
Path to the logging configuration file.
|
|
123
|
+
--headless Run in headless mode: no TUI, no terminal output
|
|
124
|
+
except a single render-started message. All logs are
|
|
125
|
+
written to the log file.
|
|
126
|
+
|
|
127
|
+
configuration:
|
|
128
|
+
--config-name CONFIG_NAME
|
|
129
|
+
Name of the config file to look for. Looked up in the
|
|
130
|
+
plain file directory and the current working
|
|
131
|
+
directory. Defaults to config.yaml.
|
|
132
|
+
|
|
133
|
+
```
|
|
@@ -293,7 +293,7 @@ def get_template_directories(plain_file_path, custom_template_dir=None, default_
|
|
|
293
293
|
3. Default template directory - for standard/fallback templates
|
|
294
294
|
"""
|
|
295
295
|
template_dirs = [
|
|
296
|
-
os.path.dirname(plain_file_path), # Highest precedence - directory containing plain file
|
|
296
|
+
os.path.dirname(os.path.abspath(plain_file_path)), # Highest precedence - directory containing plain file
|
|
297
297
|
]
|
|
298
298
|
|
|
299
299
|
if custom_template_dir:
|
|
@@ -5,6 +5,7 @@ set -euo pipefail
|
|
|
5
5
|
# Brand Colors (use exported colors if available, otherwise define them)
|
|
6
6
|
YELLOW="${YELLOW:-\033[38;2;224;255;110m}"
|
|
7
7
|
GREEN="${GREEN:-\033[38;2;121;252;150m}"
|
|
8
|
+
WHITE="${WHITE:-\033[38;2;255;255;255m}"
|
|
8
9
|
RED="${RED:-\033[38;2;239;68;68m}"
|
|
9
10
|
GRAY="${GRAY:-\033[38;2;128;128;128m}"
|
|
10
11
|
BOLD="${BOLD:-\033[1m}"
|
|
@@ -16,9 +17,9 @@ EXAMPLES_DOWNLOAD_URL="https://github.com/Codeplain-ai/plainlang-examples/archiv
|
|
|
16
17
|
|
|
17
18
|
# Show current directory and ask for extraction path
|
|
18
19
|
CURRENT_DIR=$(pwd)
|
|
19
|
-
echo -e "
|
|
20
|
+
echo -e " Current folder: ${WHITE}${CURRENT_DIR}${NC}"
|
|
20
21
|
echo ""
|
|
21
|
-
echo -e "
|
|
22
|
+
echo -e " Extract examples here, or enter a different path:"
|
|
22
23
|
echo ""
|
|
23
24
|
read -r -p " [Enter for current, or type path]: " EXTRACT_PATH < /dev/tty
|
|
24
25
|
echo ""
|
|
@@ -35,24 +36,24 @@ SKIP_DOWNLOAD=false
|
|
|
35
36
|
|
|
36
37
|
# Check if directory exists, create if not
|
|
37
38
|
if [ ! -d "$EXTRACT_PATH" ]; then
|
|
38
|
-
echo -e " ${GRAY}
|
|
39
|
+
echo -e " ${GRAY}Creating directory...${NC}"
|
|
39
40
|
mkdir -p "$EXTRACT_PATH" 2>/dev/null
|
|
40
41
|
if [ $? -ne 0 ]; then
|
|
41
|
-
echo -e " ${RED}
|
|
42
|
-
echo -e " ${GRAY}
|
|
42
|
+
echo -e " ${RED}✗ Failed to create directory: ${EXTRACT_PATH}${NC}"
|
|
43
|
+
echo -e " ${GRAY}Skipping example download.${NC}"
|
|
43
44
|
SKIP_DOWNLOAD=true
|
|
44
45
|
fi
|
|
45
46
|
fi
|
|
46
47
|
|
|
47
48
|
if [ "$SKIP_DOWNLOAD" = false ]; then
|
|
48
|
-
echo -e " ${GRAY}
|
|
49
|
+
echo -e " ${GRAY}Downloading examples...${NC}"
|
|
49
50
|
|
|
50
51
|
# Download the zip file
|
|
51
52
|
TEMP_ZIP=$(mktemp)
|
|
52
53
|
curl -L -s -o "$TEMP_ZIP" "$EXAMPLES_DOWNLOAD_URL"
|
|
53
54
|
|
|
54
55
|
if [ $? -eq 0 ] && [ -s "$TEMP_ZIP" ]; then
|
|
55
|
-
echo -e " ${GRAY}
|
|
56
|
+
echo -e " ${GRAY}Extracting to ${EXTRACT_PATH}...${NC}"
|
|
56
57
|
|
|
57
58
|
# Extract the zip file
|
|
58
59
|
unzip -q -o "$TEMP_ZIP" -d "$EXTRACT_PATH" 2>/dev/null
|
|
@@ -71,22 +72,32 @@ if [ "$SKIP_DOWNLOAD" = false ]; then
|
|
|
71
72
|
rm -f "${EXTRACTED_DIR}/.gitignore"
|
|
72
73
|
fi
|
|
73
74
|
|
|
75
|
+
clear
|
|
74
76
|
echo ""
|
|
75
|
-
echo -e " ${GREEN}
|
|
77
|
+
echo -e " ${GREEN}✓ Examples downloaded successfully!${NC}"
|
|
76
78
|
echo ""
|
|
77
|
-
echo -e "
|
|
79
|
+
echo -e " ${GRAY}Examples are in: ${EXTRACTED_DIR}${NC}"
|
|
80
|
+
echo ""
|
|
81
|
+
echo -e " ${WHITE}${BOLD}Try the hello, world example:${NC}"
|
|
82
|
+
echo ""
|
|
83
|
+
echo -e " ${GRAY}Example folder:${NC} ${WHITE}cd ${EXTRACTED_DIR}/hello-world/python${NC}"
|
|
84
|
+
echo ""
|
|
85
|
+
echo -e " ${GRAY}Render the example:${NC} ${WHITE}codeplain hello-world-python.plain${NC}"
|
|
86
|
+
echo ""
|
|
87
|
+
echo -e " ${GRAY}See hello-world/python/README.md for details.${NC}"
|
|
78
88
|
echo ""
|
|
79
89
|
else
|
|
80
|
-
echo -e " ${RED}
|
|
90
|
+
echo -e " ${RED}✗ Failed to extract examples.${NC}"
|
|
81
91
|
fi
|
|
82
92
|
|
|
83
93
|
# Clean up temp file
|
|
84
94
|
rm -f "$TEMP_ZIP"
|
|
85
95
|
else
|
|
86
|
-
echo -e " ${RED}
|
|
96
|
+
echo -e " ${RED}✗ Failed to download examples.${NC}"
|
|
87
97
|
rm -f "$TEMP_ZIP"
|
|
88
98
|
fi
|
|
89
99
|
|
|
90
100
|
echo ""
|
|
91
|
-
|
|
101
|
+
PROMPT=$(printf '%b' " Press ${WHITE}[Enter]${NC} to continue...")
|
|
102
|
+
read -r -p "$PROMPT" < /dev/tty
|
|
92
103
|
fi
|