Syngen Feature Implementation
Vocabulary
Use the names defined in docs/agent-harness/glossary.md (business / product, plus the metadata-YAML keys). If a draft uses an undefined term, add it to the glossary in the same change rather than inventing a synonym.
Workflow
- Bootstrap check. If pytest fails to collect or any
python -m …command reportsModuleNotFoundError, invoke thesyngen-bootstrapskill before continuing. The harness fixed a structural collection break on 2026-05-27 by addingsrc/tests/__init__.pyand a[tool.pytest.ini_options]block inpyproject.toml; runtime deps declared inpyproject.tomlmay still be missing locally. - Frame the change. Restate the requested change and identify affected workflows: [[training run]], [[inference run]], [[metadata YAML]], [[reports]].
- Research. Inspect relevant source under
src/syngen/, tests undersrc/tests/unit/, examples inexamples/, demo notebooks, CI configuration. - Identify public-surface impact. [[CLI entry points]] (
train,infer,syngen— note these are the binary names;launch_train/launch_inferare the function names), [[SDK]] (Syngenclass insrc/syngen/sdk.py), [[metadata YAML]] schema, or serialization format. Any break is an [[escalation trigger]]. - Downstream impact. Every public-surface change propagates to [[tdm_syngen]] (enterprise edition) and external PyPI users. Flag and escalate per CLAUDE.md "Approval contract" before implementing.
- Plan. Draft a minimal implementation plan listing files to touch, schemas/models to add or update, tests to add (
src/tests/unit/, plus integration tests if CLI / file I/O / metadata execution is affected). - Implement. Smallest viable change aligned with existing patterns in
syngen.ml. - Version bump. Update
src/syngen/VERSION— semver patch by default; minor when public API or CLI changes; major requiresAPPROVAL REQUIRED:and explicitapprovedper the contract. - Test. Per
testing-contract.md:
- Unit test for every new branch / validator rule.
- Positive and negative [[validation schema]] tests for every marshmallow schema change.
- [[Regression test]] for every bug fix.
- Validate locally, all from the repo root (
cd "$(git rev-parse --show-toplevel)"):
```bash
PY="${REPO_ROOT}/.venv/bin/python"; test -x "${PY}" || PY="$(command -v python)"
"${PY}" -m pytest src/tests/unit/<touched_subpath> -q
"${PY}" -m flake8 --max-line-length 99 src/syngen/<touched_subpath>
"${PY}" -m pytest src/tests/unit/ -q # full unit suite before handoff
```
If any reports ModuleNotFoundError, run syngen-bootstrap once and retry.
- Subagents. Invoke
syngen-code-reviewerfor non-trivial code changes;syngen-test-engineerif test coverage needs review;syngen-security-reviewerfor any change touching encryption, credentials, data flow, or logging. - Handoff. State: changed files, tests run, lint results, downstream-impact assessment, documentation updated (glossary, README, examples).