luigidemasi opened a new issue, #66: URL: https://github.com/apache/camel-kit/issues/66
> Imported from [luigidemasi/camel-kit#117](https://github.com/luigidemasi/camel-kit/issues/117), opened by [luigidemasi](https://github.com/luigidemasi) on 2026-06-26. > Closed by [luigidemasi/camel-kit#118](https://github.com/luigidemasi/camel-kit/pull/118), merged on 2026-06-26. --- ## Description The agent traits feature currently has a few correctness and coverage gaps that should be fixed before adding any more complexity to trait injection. During review of the trait application flow, three issues stood out: 1. Guide-level trait application is hardcoded to a fixed list in `TraitApplicator`. - Some shipped guide trait files under `templates/traits/{agent}/{skill}/` are not applied unless their guide name is included in `GUIDE_TRAIT_NAMES`. - Example shipped files such as Claude `environment-probe.append.md` and `re-plan-loop.append.md` are structurally present but not covered by the hardcoded list. 2. Bob trait application order appears incorrect. - `BobGenerator` calls the default generation path, which applies traits. - It then replaces several `SKILL.md` files with Bob gate templates via `replaceSkillsWithGates`. - As a result, Bob skill-level traits can be applied and then overwritten in production Bob output. - This should either be fixed by moving trait application after Bob gate replacement, or by removing/merging redundant Bob skill-level trait content into the Bob gate templates. 3. Existing tests validate that trait files target existing skill/guide assets, but they do not assert that shipped traits actually appear in generated output for each production generator. - This allows structurally valid but unapplied traits to slip through. ## Expected Behavior - All shipped `.append.md` trait files under `templates/traits/{agent}/{skill}/` are either applied or intentionally excluded with explicit test coverage. - Bob generated skills include the intended Bob-specific trait behavior, without traits being overwritten after application. - Tests verify generated output for each production generator, not only resource structure. - Documentation explains how skill-level and guide-level traits are discovered, applied, and tested. ## Proposed Fix - Make guide trait application discover actual `.append.md` files under `templates/traits/{agent}/{skill}/`, or expand the hardcoded list to include all shipped guide trait files. - Move Bob trait application after `replaceSkillsWithGates`, or remove/merge redundant Bob skill-level traits into the gate templates. - Add generated-output tests asserting shipped trait files are present in generated output for every production generator. - Update documentation for the agent traits mechanism, including discovery rules, Bob-specific behavior, and test expectations. ## Additional Context This issue is separate from positional trait injection. The current evidence suggests append-only traits are mostly sufficient today; these fixes address correctness and coverage gaps in the current model. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
