refactor(templates): use consistent naming scheme and align hello world template. - #2170
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Changes requested
Nice, well-scoped rename. Test snapshots and shortcut mappings all line up with the new template layout, and merging hello-world-python-container into the agent-python template + a --build Container filter reads cleanly (the CodeZip snapshot at src/core/project/__snapshots__/manager.test.ts.snap confirms Dockerfile/.dockerignore are filtered out of the non-container flow).
One thing to fix before merge:
Stale template name in a user-facing error
src/core/project/templates/runtime.ts:201 still references the old template name in the InputValidationError message thrown by the strands/TypeScript/HTTP resolver:
"the strands-ts template does not support short-term-only memory; ..."That template is now agent-typescript-strands — the sibling throw two lines above (line 193) was already updated. Please update this message to say agent-typescript-strands for consistency (users following the error text won't recognize strands-ts anymore since it's no longer in RUNTIME_TEMPLATE_SHORTCUTS).
Not blocking, just a heads-up
The template shortcut names in src/handlers/project/shortcuts.ts are user-facing surface area (they're the values of --template). Renaming them all in one PR breaks anyone with a script pinned to hello-world-python / strands-python / strands-ts / py-mcp / strands-py-a2a. If you want to be gentle you could keep the old names as aliases for a release; if that's already been decided as an acceptable break, no action needed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2170 +/- ##
============================================
- Coverage 97.14% 97.14% -0.01%
============================================
Files 535 535
Lines 36837 36827 -10
============================================
- Hits 35785 35775 -10
Misses 1052 1052 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude Security Review: no high-confidence findings. (run) |
|
addressed the harness reviewer by updating the error message. |
35468c0 to
b5d6e88
Compare
|
Claude Security Review: no high-confidence findings. (run) |
b5d6e88 to
1425fec
Compare
|
Claude Security Review: no high-confidence findings. (run) |
Problem
The template naming scheme is fairly inconsistent . See
agentcore-cli/src/handlers/project/shortcuts.ts
Lines 52 to 107 in 6357f2e
Solution
agent-[language]-[framework]. Ex.agent-python-strands.mcp-[language]-[framework]Ex.mcp-python-fastmcp.a2a-[language]-[framework]Ex.a2a-python-strands.agent-python. The container case is combined into the same template for consistency. The asset code is simplified to an http agent with no strands dependency that always returns hello world text.Verification