Commit bc061b0
authored
feat: add generation metadata to pyproject.toml (#584)
* feat: add generation metadata to pyproject.toml (R12)
Store generation metadata in [tool.agent-starter-pack] section so CLI
commands can understand project context. This enables:
- enhance command to know original config
- extract command to know what to strip
- upgrade command to re-template old version for diffing
- recommend command to suggest based on current setup
- Any generated project to work as a remote template
Metadata includes:
- Remote template fields: name, description, base_template, agent_directory
- Generation context: generated_at, asp_version, deployment_target,
session_type, cicd_runner, include_data_ingestion, datastore, frontend_type
Includes end-to-end validation tests that create projects, extract metadata,
recreate using only metadata, and verify identical scaffolding.
* fix: address review feedback for generation metadata
- Improve _compare_scaffolding_files to iterate through all
SCAFFOLDING_PATTERNS and compare file contents
- Use TOML parsing for pyproject.toml comparison instead of line-by-line
- Simplify data_ingestion Jinja2 template using | lower filter
- Use conditional import pattern for datetime.UTC to support Python 3.10+
instead of globally ignoring UP017 lint rule
* refactor: always include all metadata fields with 'none' for unset values
Make metadata more consistent and predictable by always including all
fields. Fields that are not applicable use 'none' as the value instead
of being omitted. This simplifies parsing in CLI commands.1 parent f268a7f commit bc061b0
File tree
3 files changed
+626
-0
lines changed- agent_starter_pack
- base_template
- cli/utils
- tests/cli/utils
3 files changed
+626
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
1022 | 1030 | | |
1023 | 1031 | | |
1024 | 1032 | | |
| 1033 | + | |
1025 | 1034 | | |
1026 | 1035 | | |
1027 | 1036 | | |
| |||
0 commit comments