Quickstart: Existing Codebase¶
~1 min read
Add verified behavior to a project that already has source code. Crucis is an autonomy scaffold for code-generating agents — it detects existing Python files and scaffolds accordingly.
1. Initialize in your project¶
2. Configure the objective¶
name: my_feature
description: >-
Parse configuration from YAML files and return validated settings.
signature: "load_config(path: str) -> dict"
behaviors:
- "Parses YAML config files into validated dictionaries"
- "Returns empty dict for missing files instead of raising"
tests_constraint_profile: recommended
implementation_constraint_profile: default
target_files:
- "myproject/config.py"
context_files:
- "myproject/models.py"
- "myproject/defaults.py"
existing_tests:
- "tests/test_models.py"
examples:
- input: "('config.yaml',)"
output: "{'debug': False, 'port': 8080}"
- input: "('missing.yaml',)"
output: "{}"
tasks:
- name: my_feature
description: Load and validate config from a YAML file path.
signature: "load_config(path: str) -> dict"
target_files:
- "myproject/config.py"
context_files:
- "myproject/models.py"
examples:
- input: "('config.yaml',)"
output: "{'debug': False, 'port': 8080}"
- input: "('missing.yaml',)"
output: "{}"