-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Description
Summary
Track non-PR-specific technical debt in skill/command rendering paths. These issues were identified during review of #1971 but are not introduced by #1971 and should be handled separately.
Why this issue exists
Current behavior works for most paths, but rendering/parsing responsibilities are duplicated across modules (agents.py, presets.py, init-time skill generation). This increases drift risk and makes edge-case handling inconsistent.
Scope (non-blocking for #1971)
src/specify_cli/agents.py— TOML prompt rendering should safely handle triple-quotes in body
render_toml_command()uses TOML multiline strings with"""delimiters.- If body includes
""", output can become invalid TOML. - Add escaping or safer serialization strategy.
src/specify_cli/agents.py— avoid in-place mutation in_adjust_script_paths
- Method currently mutates passed
frontmatterobject. - Consider defensive copy to reduce side-effect risk during future refactors.
src/specify_cli/presets.py— deduplicate frontmatter parsing logic
_register_skills()and_unregister_skills()each manually parse frontmatter.- Prefer shared parser (
CommandRegistrar.parse_frontmatter) or a shared utility.
- Consolidate skill rendering logic across code paths
- Skill generation currently exists in multiple places (init conversion, extensions, presets, packaging scripts).
- Define one canonical renderer contract and re-use it to prevent behavior drift.
Notes
- This is a follow-up technical-debt item.
- Unify Kimi/Codex skill naming and migrate legacy dotted Kimi dirs #1971 should remain focused on its scoped migration/compatibility fixes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.